From 1e4bc9adfedbd0246f2d0d66c0c1d41db364d72c Mon Sep 17 00:00:00 2001 From: Gerkiz Date: Thu, 26 Feb 2026 18:56:59 +0100 Subject: [PATCH 1/2] Fix maps Make maps compatible with 2.0 --- control.lua | 16 +- maps/anarchy.lua | 74 - maps/atoll.lua | 101 - maps/biter_battles/biter_battles.lua | 245 +- maps/biter_battles/biter_battles_terrain.lua | 230 +- .../biter_battles_terrain_neko.lua | 696 -- maps/biter_battles_v2/ai.lua | 20 +- maps/biter_battles_v2/biter_raffle.lua | 17 +- maps/biter_battles_v2/commands.lua | 1 - maps/biter_battles_v2/difficulty_vote.lua | 14 +- maps/biter_battles_v2/feeding.lua | 26 +- maps/biter_battles_v2/functions.lua | 18 +- maps/biter_battles_v2/game_over.lua | 37 +- maps/biter_battles_v2/gui.lua | 76 +- maps/biter_battles_v2/init.lua | 33 +- maps/biter_battles_v2/main.lua | 11 +- maps/biter_battles_v2/mirror_terrain.lua | 23 +- maps/biter_battles_v2/sciencelogs_tab.lua | 49 +- maps/biter_battles_v2/spec_spy.lua | 11 +- maps/biter_battles_v2/tables.lua | 73 +- maps/biter_battles_v2/team_manager.lua | 29 +- maps/biter_battles_v2/terrain.lua | 56 +- maps/biter_hatchery/main.lua | 33 +- maps/blue_beach.lua | 250 - maps/cave_choppy/cave_miner_market_items.lua | 63 +- maps/cave_choppy/forest_world.lua | 127 +- maps/cave_choppy/infinity_chest.lua | 64 +- maps/cave_choppy/main.lua | 479 +- maps/cave_choppy/player_elevator.lua | 53 +- maps/cave_miner.lua | 468 +- maps/cave_miner_market_items.lua | 62 +- maps/cave_miner_v2/constants.lua | 115 +- maps/cave_miner_v2/functions.lua | 71 +- maps/cave_miner_v2/main.lua | 22 +- maps/cave_miner_v2/market.lua | 49 +- maps/cave_miner_v2/rocks_yield_ore.lua | 16 +- maps/choppy.lua | 68 +- maps/choppy_dx.lua | 64 +- maps/chronosphere/gui.lua | 3 +- maps/crab_defender/main.lua | 4 + maps/cratewood_forest.lua | 114 - maps/crossing.lua | 14 +- maps/cube.lua | 176 - maps/deep_jungle/main.lua | 7 +- maps/deep_jungle/terrain.lua | 97 +- maps/desert_oasis.lua | 139 +- maps/fish_defender/boss_biters.lua | 99 - maps/fish_defender/bouncy_shells.lua | 71 - maps/fish_defender/combat_balance.lua | 63 - maps/fish_defender/commands.lua | 93 - maps/fish_defender/crumbly_walls.lua | 25 - maps/fish_defender/explosive_gun_bullets.lua | 42 - maps/fish_defender/flame_boots.lua | 52 - maps/fish_defender/laser_pointer.lua | 37 - maps/fish_defender/main.lua | 1371 ---- maps/fish_defender/market.lua | 328 - maps/fish_defender/on_entity_damaged.lua | 65 - maps/fish_defender/railgun_enhancer.lua | 152 - maps/fish_defender/table.lua | 83 - maps/fish_defender/terrain.lua | 500 -- maps/fish_defender/trapped_capsules.lua | 61 - maps/fish_defender/ultra_mines.lua | 51 - maps/fish_defender/vehicle_nanobots.lua | 29 - maps/fish_defender_v1/boss_biters.lua | 84 - maps/fish_defender_v1/bouncy_shells.lua | 71 - maps/fish_defender_v1/crumbly_walls.lua | 23 - .../explosive_gun_bullets.lua | 42 - maps/fish_defender_v1/fish_defender.lua | 1760 ----- maps/fish_defender_v1/flame_boots.lua | 57 - maps/fish_defender_v1/laser_pointer.lua | 35 - maps/fish_defender_v1/map_intro.lua | 112 - maps/fish_defender_v1/market.lua | 284 - maps/fish_defender_v1/on_entity_damaged.lua | 62 - maps/fish_defender_v1/railgun_enhancer.lua | 116 - maps/fish_defender_v1/shotgun_buff.lua | 28 - maps/fish_defender_v1/trapped_capsules.lua | 54 - maps/fish_defender_v1/ultra_mines.lua | 42 - maps/fish_defender_v1/vehicle_nanobots.lua | 26 - maps/fish_defender_v2/main.lua | 4 + maps/fish_defender_v2/market.lua | 109 +- maps/hedge_maze.lua | 547 -- maps/island_troopers/enemies.lua | 196 - maps/island_troopers/main.lua | 330 - maps/island_troopers/map_intro.lua | 113 - maps/island_troopers/terrain.lua | 383 -- maps/junkyard_pvp/gui.lua | 92 - maps/junkyard_pvp/main.lua | 251 - maps/junkyard_pvp/share_chat.lua | 30 - maps/junkyard_pvp/surrounded_by_worms.lua | 45 - maps/junkyard_pvp/team.lua | 108 - maps/junkyard_pvp/terrain.lua | 356 - maps/junkyard_pvp/treasure.lua | 174 - maps/labyrinth.lua | 397 +- maps/minesweeper/main.lua | 44 +- maps/mountain_fortress.lua | 517 -- maps/mountain_fortress_v2/collapse.lua | 247 - .../flamethrower_nerf.lua | 22 - maps/mountain_fortress_v2/locomotive.lua | 167 - maps/mountain_fortress_v2/main.lua | 612 -- maps/mountain_fortress_v2/terrain.lua | 1249 ---- maps/mountain_fortress_v2/treasure.lua | 222 - maps/mountain_fortress_v3/functions.lua | 2 +- maps/mountain_race/gui.lua | 53 - maps/mountain_race/main.lua | 318 - maps/mountain_race/team.lua | 103 - maps/mountain_race/terrain.lua | 196 - maps/native_war/gui.lua | 488 -- maps/native_war/init.lua | 255 - maps/native_war/main.lua | 636 -- maps/native_war/map_info.lua | 59 - .../mineable_wreckage_yields_scrap.lua | 148 - maps/native_war/settings.lua | 59 - maps/native_war/share_chat.lua | 32 - maps/native_war/team.lua | 243 - maps/native_war/team_manager.lua | 843 --- maps/native_war/terrain.lua | 758 --- maps/native_war/xp.lua | 297 - maps/overgrowth.lua | 85 +- maps/pitch_black/blood_moon.lua | 33 - maps/pitch_black/difficulty.lua | 99 - maps/pitch_black/gui.lua | 48 - maps/pitch_black/main.lua | 49 - maps/planet_prison.lua | 4 + maps/quarters.lua | 66 +- maps/railway_troopers/main.lua | 24 +- maps/railway_troopers_v2/main.lua | 20 +- maps/spooky_forest.lua | 176 +- maps/spooky_forest_changelog.txt | 35 - maps/stone_maze/global_functions.lua | 263 +- maps/stone_maze/main.lua | 68 +- maps/tank_battles_old.lua | 609 -- .../tank_conquest/blueprint_poi_base_json.lua | 1 - .../tank_conquest/blueprint_poi_fire_json.lua | 1 - .../blueprint_poi_laser_json.lua | 1 - .../blueprint_poi_spot_one_json.lua | 1 - .../blueprint_poi_spot_three_json.lua | 1 - .../blueprint_poi_spot_two_json.lua | 1 - maps/tank_conquest/tank_conquest.lua | 1914 ------ maps/territorial_control.lua | 170 +- maps/tetris/bricks.lua | 137 - maps/tetris/main.lua | 515 -- maps/tetris/unused.lua | 16 - maps/wave_of_death/WoD.lua | 231 - maps/wave_of_death/ai.lua | 156 - maps/wave_of_death/biter_waves.lua | 44 - maps/wave_of_death/game_status.lua | 93 - maps/wave_of_death/init.lua | 109 - maps/wave_of_death/intro.lua | 97 - maps/wave_of_death/logo.lua | 6013 ----------------- maps/wave_of_death/spectate.lua | 8 - maps/wave_of_death/terrain.lua | 250 - modules/immersive_cargo_wagons/functions.lua | 43 +- modules/mobs_drop_loot.lua | 13 +- modules/portable_chest.lua | 2 +- modules/rocks_yield_ore.lua | 29 +- modules/shopping_chests.lua | 11 +- modules/turret_filler.lua | 101 +- utils/functions/loot_raffle.lua | 13 +- utils/undo_actions.lua | 82 +- 159 files changed, 2508 insertions(+), 30161 deletions(-) delete mode 100644 maps/anarchy.lua delete mode 100644 maps/atoll.lua delete mode 100644 maps/biter_battles/biter_battles_terrain_neko.lua delete mode 100644 maps/blue_beach.lua delete mode 100644 maps/cratewood_forest.lua delete mode 100644 maps/cube.lua delete mode 100644 maps/fish_defender/boss_biters.lua delete mode 100644 maps/fish_defender/bouncy_shells.lua delete mode 100644 maps/fish_defender/combat_balance.lua delete mode 100644 maps/fish_defender/commands.lua delete mode 100644 maps/fish_defender/crumbly_walls.lua delete mode 100644 maps/fish_defender/explosive_gun_bullets.lua delete mode 100644 maps/fish_defender/flame_boots.lua delete mode 100644 maps/fish_defender/laser_pointer.lua delete mode 100644 maps/fish_defender/main.lua delete mode 100644 maps/fish_defender/market.lua delete mode 100644 maps/fish_defender/on_entity_damaged.lua delete mode 100644 maps/fish_defender/railgun_enhancer.lua delete mode 100644 maps/fish_defender/table.lua delete mode 100644 maps/fish_defender/terrain.lua delete mode 100644 maps/fish_defender/trapped_capsules.lua delete mode 100644 maps/fish_defender/ultra_mines.lua delete mode 100644 maps/fish_defender/vehicle_nanobots.lua delete mode 100644 maps/fish_defender_v1/boss_biters.lua delete mode 100644 maps/fish_defender_v1/bouncy_shells.lua delete mode 100644 maps/fish_defender_v1/crumbly_walls.lua delete mode 100644 maps/fish_defender_v1/explosive_gun_bullets.lua delete mode 100644 maps/fish_defender_v1/fish_defender.lua delete mode 100644 maps/fish_defender_v1/flame_boots.lua delete mode 100644 maps/fish_defender_v1/laser_pointer.lua delete mode 100644 maps/fish_defender_v1/map_intro.lua delete mode 100644 maps/fish_defender_v1/market.lua delete mode 100644 maps/fish_defender_v1/on_entity_damaged.lua delete mode 100644 maps/fish_defender_v1/railgun_enhancer.lua delete mode 100644 maps/fish_defender_v1/shotgun_buff.lua delete mode 100644 maps/fish_defender_v1/trapped_capsules.lua delete mode 100644 maps/fish_defender_v1/ultra_mines.lua delete mode 100644 maps/fish_defender_v1/vehicle_nanobots.lua delete mode 100644 maps/hedge_maze.lua delete mode 100644 maps/island_troopers/enemies.lua delete mode 100644 maps/island_troopers/main.lua delete mode 100644 maps/island_troopers/map_intro.lua delete mode 100644 maps/island_troopers/terrain.lua delete mode 100644 maps/junkyard_pvp/gui.lua delete mode 100644 maps/junkyard_pvp/main.lua delete mode 100644 maps/junkyard_pvp/share_chat.lua delete mode 100644 maps/junkyard_pvp/surrounded_by_worms.lua delete mode 100644 maps/junkyard_pvp/team.lua delete mode 100644 maps/junkyard_pvp/terrain.lua delete mode 100644 maps/junkyard_pvp/treasure.lua delete mode 100644 maps/mountain_fortress.lua delete mode 100644 maps/mountain_fortress_v2/collapse.lua delete mode 100644 maps/mountain_fortress_v2/flamethrower_nerf.lua delete mode 100644 maps/mountain_fortress_v2/locomotive.lua delete mode 100644 maps/mountain_fortress_v2/main.lua delete mode 100644 maps/mountain_fortress_v2/terrain.lua delete mode 100644 maps/mountain_fortress_v2/treasure.lua delete mode 100644 maps/mountain_race/gui.lua delete mode 100644 maps/mountain_race/main.lua delete mode 100644 maps/mountain_race/team.lua delete mode 100644 maps/mountain_race/terrain.lua delete mode 100644 maps/native_war/gui.lua delete mode 100644 maps/native_war/init.lua delete mode 100644 maps/native_war/main.lua delete mode 100644 maps/native_war/map_info.lua delete mode 100644 maps/native_war/mineable_wreckage_yields_scrap.lua delete mode 100644 maps/native_war/settings.lua delete mode 100644 maps/native_war/share_chat.lua delete mode 100644 maps/native_war/team.lua delete mode 100644 maps/native_war/team_manager.lua delete mode 100644 maps/native_war/terrain.lua delete mode 100644 maps/native_war/xp.lua delete mode 100644 maps/pitch_black/blood_moon.lua delete mode 100644 maps/pitch_black/difficulty.lua delete mode 100644 maps/pitch_black/gui.lua delete mode 100644 maps/pitch_black/main.lua delete mode 100644 maps/spooky_forest_changelog.txt delete mode 100644 maps/tank_battles_old.lua delete mode 100644 maps/tank_conquest/blueprint_poi_base_json.lua delete mode 100644 maps/tank_conquest/blueprint_poi_fire_json.lua delete mode 100644 maps/tank_conquest/blueprint_poi_laser_json.lua delete mode 100644 maps/tank_conquest/blueprint_poi_spot_one_json.lua delete mode 100644 maps/tank_conquest/blueprint_poi_spot_three_json.lua delete mode 100644 maps/tank_conquest/blueprint_poi_spot_two_json.lua delete mode 100644 maps/tank_conquest/tank_conquest.lua delete mode 100644 maps/tetris/bricks.lua delete mode 100644 maps/tetris/main.lua delete mode 100644 maps/tetris/unused.lua delete mode 100644 maps/wave_of_death/WoD.lua delete mode 100644 maps/wave_of_death/ai.lua delete mode 100644 maps/wave_of_death/biter_waves.lua delete mode 100644 maps/wave_of_death/game_status.lua delete mode 100644 maps/wave_of_death/init.lua delete mode 100644 maps/wave_of_death/intro.lua delete mode 100644 maps/wave_of_death/logo.lua delete mode 100644 maps/wave_of_death/spectate.lua delete mode 100644 maps/wave_of_death/terrain.lua diff --git a/control.lua b/control.lua index 1d43ca59f..5cccf3051 100644 --- a/control.lua +++ b/control.lua @@ -47,8 +47,6 @@ end --![[Guide a Train through rough terrain, while defending it from the biters]]-- -- require 'utils.templates.Mountain_Fortress_v3_BP.map_loader' --require 'maps.mountain_fortress_v3.main' ---require 'maps.mountain_fortress_v2.main' ---require 'maps.mountain_fortress' --![[Launch rockets in increasingly harder getting worlds.]]-- --require 'maps.journey.main' @@ -62,8 +60,6 @@ end --![[Defend the market against waves of biters]]-- --require 'maps.fish_defender_v2.main' --require 'maps.crab_defender.main' ---require 'maps.fish_defender_v1.fish_defender' ---require 'maps.fish_defender.main' --![[Adventure as a crew of pirates]]-- --require 'maps.pirates.main' @@ -81,16 +77,13 @@ end --![[Minesweeper?]]-- --require 'maps.minesweeper.main' ---![[Tower defense system]]-- ---require 'maps.tower_defense.main' +--![[A map where you build towns and fight against other towns and the biters.]]-- +--require 'maps.scrap_towny_ffa.main' --![[North VS South Survival PVP, feed the opposing team's biters with science flasks. Disable Autostash, Group and Poll modules.]]-- --require 'maps.biter_battles_v2.main' --require 'maps.biter_battles.biter_battles' ---![[Randomly generating Islands that have to be beaten in levels to gain credits]]-- ---require 'maps.island_troopers.main' - --![[Infinitely expanding mazes]]-- --require 'maps.stone_maze.main' --require 'maps.labyrinth' @@ -106,8 +99,6 @@ end --![[Flee from the collapsing map with portable base inside train]]-- --require 'maps.railway_troopers_v2.main' - ---![[Another simliar version without collapsing terrain]]-- --require 'maps.railway_troopers.main' --![[Territorial Control - reveal the map as you walk through the mist]]-- @@ -130,6 +121,9 @@ end --![[Defeat the biters and unlock new areas]]-- --require 'maps.spiral_troopers' +--![[A map where you cross a river and fight against the biters.]]-- +--require 'maps.crossing' + --![[Test map spawns all entities for testing]]-- --require 'maps.test_map.main' diff --git a/maps/anarchy.lua b/maps/anarchy.lua deleted file mode 100644 index ed623d9d4..000000000 --- a/maps/anarchy.lua +++ /dev/null @@ -1,74 +0,0 @@ ---anarchy mode map -- by mewmew -- - -require 'maps.hunger_games_map_intro' -require 'modules.hunger_games' -require 'modules.dynamic_player_spawn' - -local Event = require 'utils.event' -local math_random = math.random -local map_functions = require 'utils.tools.map_functions' - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - if not storage.map_init_done then - game.map_settings.enemy_expansion.enabled = false - game.map_settings.enemy_evolution.time_factor = 0 - game.map_settings.enemy_evolution.pollution_factor = 0 - --game.map_settings.pollution.enabled = false - storage.map_init_done = true - end - - if player.online_time == 0 then - player.insert { name = 'iron-plate', count = 32 } - end -end - -local function on_chunk_generated(event) - local surface = event.surface - local left_top = event.area.left_top - - --[[ - local entities = surface.find_entities_filtered({area = event.area, force = "enemy"}) - for _, entity in pairs(entities) do - entity.destroy() - end - local entities = {} - ]] - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - if math_random(1, 60000) == 1 then - map_functions.draw_entity_circle(pos, 'stone', surface, 6, true, 1000000) - map_functions.draw_entity_circle(pos, 'coal', surface, 12, true, 1000000) - map_functions.draw_entity_circle(pos, 'copper-ore', surface, 18, true, 1000000) - map_functions.draw_entity_circle(pos, 'iron-ore', surface, 24, true, 1000000) - map_functions.draw_noise_tile_circle(pos, 'water', surface, 4) - end - --[[ - if math_random(1, 75000) == 1 and pos.x^2 + pos.y^2 > 60000 then - if surface.can_place_entity({name = "biter-spawner", position = pos}) then - if math_random(1, 4) == 1 then - table_insert(entities, {name = "spitter-spawner", position = pos}) - else - table_insert(entities, {name = "biter-spawner", position = pos}) - end - end - end - ]] - end - end - - --[[ - for _, entity in pairs(entities) do - surface.create_entity(entity) - end - ]] - if not storage.spawn_generated and left_top.x <= -96 then - map_functions.draw_noise_tile_circle({ x = 0, y = 0 }, 'stone-path', surface, 21) - map_functions.draw_noise_tile_circle({ x = 0, y = 0 }, 'concrete', surface, 7) - storage.spawn_generated = true - end -end - -Event.add(defines.events.on_player_joined_game, on_player_joined_game) -Event.add(defines.events.on_chunk_generated, on_chunk_generated) diff --git a/maps/atoll.lua b/maps/atoll.lua deleted file mode 100644 index 1665de126..000000000 --- a/maps/atoll.lua +++ /dev/null @@ -1,101 +0,0 @@ ---atoll-- mewmew made this -- - -require 'modules.spawners_contain_biters' -require 'modules.surrounded_by_worms' - -local simplex_noise = require 'utils.math.simplex_noise' -simplex_noise = simplex_noise.d2 -local Event = require 'utils.event' -local table_insert = table.insert -local math_random = math.random - -local function get_noise(name, pos) - local seed = game.surfaces[1].map_gen_settings.seed - local noise_seed_add = 25000 - seed = seed + noise_seed_add - if name == 'ocean' then - local noise = {} - noise[1] = simplex_noise(pos.x * 0.005, pos.y * 0.005, seed) - seed = seed + noise_seed_add - noise[2] = simplex_noise(pos.x * 0.01, pos.y * 0.01, seed) - seed = seed + noise_seed_add - noise[3] = simplex_noise(pos.x * 0.05, pos.y * 0.05, seed) - seed = seed + noise_seed_add - noise[4] = simplex_noise(pos.x * 0.1, pos.y * 0.1, seed) - noise = noise[1] + noise[2] * 0.3 + noise[3] * 0.2 + noise[4] * 0.1 - --noise = noise * 0.5 - return noise - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - if not storage.map_init_done then - game.forces['player'].technologies['landfill'].researched = true - storage.average_worm_amount_per_chunk = 6 - storage.map_init_done = true - end - - if player.online_time == 0 then - --player.insert{name = 'iron-axe', count = 1} - player.insert { name = 'landfill', count = 200 } - player.insert { name = 'iron-plate', count = 32 } - player.insert { name = 'iron-gear-wheel', count = 16 } - end -end - -local function on_marked_for_deconstruction(event) - if event.entity.name == 'fish' then - event.entity.cancel_deconstruction(game.players[event.player_index].force.name) - end -end - -local types = { 'resource', 'simple-entity', 'player' } -local function on_chunk_generated(event) - local surface = event.surface - local left_top = event.area.left_top - local tiles = {} - local entities = {} - - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local tile_to_insert = false - local pos = { x = left_top.x + x, y = left_top.y + y } - local ocean_noise = get_noise('ocean', pos) - if ocean_noise > -0.5 then - tile_to_insert = 'water' - if ocean_noise > -0.25 then - tile_to_insert = 'deepwater' - end - end - if tile_to_insert then - local count = surface.count_entities_filtered({ area = { { pos.x - 1, pos.y - 1 }, { pos.x + 1.99, pos.y + 1.99 } }, limit = 1, type = types }) - if count == 0 then - table_insert(tiles, { name = tile_to_insert, position = pos }) - if math_random(1, 128) == 1 then - table_insert(entities, { name = 'fish', position = pos }) - end - end - end - end - end - surface.set_tiles(tiles, true) - - for _, entity in pairs(entities) do - surface.create_entity(entity) - end - - if not storage.spawn_generated and left_top.x <= -64 then - --map_functions.draw_noise_tile_circle({x = 0, y = 0}, "concrete", surface, 5) - --map_functions.draw_smoothed_out_ore_circle({x = -32, y = -32}, "copper-ore", surface, 15, 2500) - --map_functions.draw_smoothed_out_ore_circle({x = -32, y = 32}, "iron-ore", surface, 15, 2500) - --map_functions.draw_smoothed_out_ore_circle({x = 32, y = 32}, "coal", surface, 15, 2500) - --map_functions.draw_smoothed_out_ore_circle({x = 32, y = -32}, "stone", surface, 15, 2500) - --map_functions.draw_oil_circle({x = 0, y = 0}, "crude-oil", surface, 5, 200000) - storage.spawn_generated = true - end -end - -Event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction) -Event.add(defines.events.on_player_joined_game, on_player_joined_game) -Event.add(defines.events.on_chunk_generated, on_chunk_generated) diff --git a/maps/biter_battles/biter_battles.lua b/maps/biter_battles/biter_battles.lua index 2dcba2577..800e02273 100644 --- a/maps/biter_battles/biter_battles.lua +++ b/maps/biter_battles/biter_battles.lua @@ -1,5 +1,10 @@ -- Biter Battles -- mewmew made this -- --luacheck:ignore + +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + local Server = require 'utils.server' local Score = require 'utils.gui.score' local Global = require 'utils.global' @@ -8,8 +13,8 @@ require 'modules.explosive_biters' require 'modules.spawners_contain_biters' require 'modules.custom_death_messages' -local biter_battles_terrain = require 'maps.biter_battles.biter_battles_terrain' -local event = require 'utils.event' +local BiterBattleTerrain = require 'maps.biter_battles.biter_battles_terrain' +local Event = require 'utils.event' local math_random = math.random local insert = table.insert @@ -22,7 +27,8 @@ Global.register( end ) -local food_names = { +local food_names = +{ ['automation-science-pack'] = 'automation science', ['logistic-science-pack'] = 'logistic science', ['military-science-pack'] = 'military science', @@ -32,7 +38,8 @@ local food_names = { ['space-science-pack'] = 'space science' } -local food_values = { +local food_values = +{ ['automation-science-pack'] = 0.00000100, ['logistic-science-pack'] = 0.00000292, ['military-science-pack'] = 0.00001225, @@ -91,7 +98,7 @@ local function create_biter_battle_sprite_button(player) end local function get_sorted_list(column_name, score_list) - for x = 1, #score_list, 1 do + for _ = 1, #score_list, 1 do for y = 1, #score_list, 1 do if not score_list[y + 1] then break @@ -160,24 +167,24 @@ local function show_mvps(player) local t = frame.add({ type = 'table', column_count = 2 }) local mvp = get_mvps('north') if mvp then - local l = t.add({ type = 'label', caption = 'Defender >> ' }) + l = t.add({ type = 'label', caption = 'Defender >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score }) + l = t.add({ type = 'label', caption = mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - local l = t.add({ type = 'label', caption = 'Builder >> ' }) + l = t.add({ type = 'label', caption = 'Builder >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things' }) + l = t.add({ type = 'label', caption = mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things' }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - local l = t.add({ type = 'label', caption = 'Deaths >> ' }) + l = t.add({ type = 'label', caption = 'Deaths >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times' }) + l = t.add({ type = 'label', caption = mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times' }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } @@ -198,31 +205,31 @@ local function show_mvps(player) end end - local l = frame.add({ type = 'label', caption = 'MVPs - South:' }) + l = frame.add({ type = 'label', caption = 'MVPs - South:' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.99, g = 0.33, b = 0.33 } - local t = frame.add({ type = 'table', column_count = 2 }) - local mvp = get_mvps('south') + t = frame.add({ type = 'table', column_count = 2 }) + mvp = get_mvps('south') if mvp then - local l = t.add({ type = 'label', caption = 'Defender >> ' }) + l = t.add({ type = 'label', caption = 'Defender >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score }) + l = t.add({ type = 'label', caption = mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - local l = t.add({ type = 'label', caption = 'Builder >> ' }) + l = t.add({ type = 'label', caption = 'Builder >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things' }) + l = t.add({ type = 'label', caption = mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things' }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - local l = t.add({ type = 'label', caption = 'Deaths >> ' }) + l = t.add({ type = 'label', caption = 'Deaths >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times' }) + l = t.add({ type = 'label', caption = mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times' }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } @@ -267,7 +274,8 @@ local function create_biter_battle_menu(player) if player.force.name == 'north' or player.force.name == 'south' then frame.add { type = 'table', name = 'biter_battle_table', column_count = 4 } local t = frame.biter_battle_table - local foods = { + local foods = + { 'automation-science-pack', 'logistic-science-pack', 'military-science-pack', @@ -289,7 +297,7 @@ local function create_biter_battle_menu(player) local b = frame.add { type = 'label', caption = 'Defend your team´s rocket silo!' } b.style.font = 'default-bold' b.style.font_color = { r = 0.98, g = 0.66, b = 0.22 } - local b = frame.add { type = 'label', caption = 'Feed the enemy team´s biters to gain advantage!' } + b = frame.add { type = 'label', caption = 'Feed the enemy team´s biters to gain advantage!' } b.style.font = 'default-bold' b.style.font_color = { r = 0.98, g = 0.66, b = 0.22 } frame.add { type = 'label', caption = '-----------------------------------------------------------' } @@ -299,13 +307,13 @@ local function create_biter_battle_menu(player) local l = t.add { type = 'label', caption = 'Team North' } l.style.font = 'default-bold' l.style.font_color = { r = 0.55, g = 0.55, b = 0.99 } - local l = t.add { type = 'label', caption = ' - ' } - local l = t.add { type = 'label', caption = #game.forces['north'].connected_players .. ' Players ' } + l = t.add { type = 'label', caption = ' - ' } + l = t.add { type = 'label', caption = #game.forces['north'].connected_players .. ' Players ' } l.style.font_color = { r = 0.22, g = 0.88, b = 0.22 } if player.force.name ~= 'player' then if storage.biter_battle_view_players[player.name] == true then - local t = frame.add { type = 'table', column_count = 4 } + t = frame.add { type = 'table', column_count = 4 } for _, p in pairs(game.forces.north.connected_players) do local color = {} color = p.color @@ -313,23 +321,23 @@ local function create_biter_battle_menu(player) color.g = color.g * 0.6 + 0.4 color.b = color.b * 0.6 + 0.4 color.a = 1 - local l = t.add { type = 'label', caption = p.name } + l = t.add { type = 'label', caption = p.name } l.style.font_color = color end end - local t = frame.add { type = 'table', column_count = 4 } - local l = t.add { type = 'label', caption = 'Nerf: ' } + t = frame.add { type = 'table', column_count = 4 } + l = t.add { type = 'label', caption = 'Nerf: ' } l.style.minimal_width = 25 l.tooltip = 'Damage nerf of the team.' - local l = t.add { type = 'label', caption = math.round(storage.team_nerf['north'] * 100, 1) .. ' ' } + l = t.add { type = 'label', caption = math.round(storage.team_nerf['north'] * 100, 1) .. ' ' } l.style.minimal_width = 40 l.style.font_color = { r = 0.66, g = 0.66, b = 0.99 } l.style.font = 'default-bold' - local l = t.add { type = 'label', caption = ' Biter Rage: ' } + l = t.add { type = 'label', caption = ' Biter Rage: ' } l.style.minimal_width = 25 l.tooltip = 'Increases damage and the amount of angry biters.' - local l = t.add { type = 'label', caption = math.round(storage.biter_rage['north'], 0) } + l = t.add { type = 'label', caption = math.round(storage.biter_rage['north'], 0) } l.style.font_color = { r = 0.66, g = 0.66, b = 0.99 } l.style.font = 'default-bold' l.style.minimal_width = 25 @@ -344,7 +352,7 @@ local function create_biter_battle_menu(player) c = c .. math.round((storage.game_lobby_timeout - game.tick) / 60, 0) c = c .. ')' end - local t = frame.add { type = 'table', column_count = 4 } + t = frame.add { type = 'table', column_count = 4 } for _, p in pairs(game.forces.north.connected_players) do local color = {} color = p.color @@ -352,7 +360,7 @@ local function create_biter_battle_menu(player) color.g = color.g * 0.6 + 0.4 color.b = color.b * 0.6 + 0.4 color.a = 1 - local l = t.add { type = 'label', caption = p.name } + l = t.add { type = 'label', caption = p.name } l.style.font_color = color end local b = frame.add { type = 'sprite-button', name = 'join_north_button', caption = c } @@ -364,17 +372,17 @@ local function create_biter_battle_menu(player) frame.add { type = 'label', caption = '--------------------------' } end - local t = frame.add { type = 'table', column_count = 3 } - local l = t.add { type = 'label', caption = 'Team South' } + t = frame.add { type = 'table', column_count = 3 } + l = t.add { type = 'label', caption = 'Team South' } l.style.font = 'default-bold' l.style.font_color = { r = 0.99, g = 0.33, b = 0.33 } - local l = t.add { type = 'label', caption = ' - ' } - local l = t.add { type = 'label', caption = #game.forces['south'].connected_players .. ' Players ' } + l = t.add { type = 'label', caption = ' - ' } + l = t.add { type = 'label', caption = #game.forces['south'].connected_players .. ' Players ' } l.style.font_color = { r = 0.22, g = 0.88, b = 0.22 } if player.force.name ~= 'player' then if storage.biter_battle_view_players[player.name] == true then - local t = frame.add { type = 'table', column_count = 4 } + t = frame.add { type = 'table', column_count = 4 } for _, p in pairs(game.forces.south.connected_players) do local color = {} color = p.color @@ -382,23 +390,23 @@ local function create_biter_battle_menu(player) color.g = color.g * 0.6 + 0.4 color.b = color.b * 0.6 + 0.4 color.a = 1 - local l = t.add { type = 'label', caption = p.name } + l = t.add { type = 'label', caption = p.name } l.style.font_color = color end end - local t = frame.add { type = 'table', column_count = 4 } - local l = t.add { type = 'label', caption = 'Nerf: ' } + t = frame.add { type = 'table', column_count = 4 } + l = t.add { type = 'label', caption = 'Nerf: ' } l.tooltip = 'Damage nerf of the team.' l.style.minimal_width = 25 - local l = t.add { type = 'label', caption = math.round(storage.team_nerf['south'] * 100, 1) .. ' ' } + l = t.add { type = 'label', caption = math.round(storage.team_nerf['south'] * 100, 1) .. ' ' } l.style.minimal_width = 40 l.style.font_color = { r = 0.99, g = 0.44, b = 0.44 } l.style.font = 'default-bold' - local l = t.add { type = 'label', caption = ' Biter Rage: ' } + l = t.add { type = 'label', caption = ' Biter Rage: ' } l.style.minimal_width = 25 l.tooltip = 'Increases damage and the amount of angry biters.' - local l = t.add { type = 'label', caption = math.round(storage.biter_rage['south'], 0) } + l = t.add { type = 'label', caption = math.round(storage.biter_rage['south'], 0) } l.style.font_color = { r = 0.99, g = 0.44, b = 0.44 } l.style.font = 'default-bold' l.style.minimal_width = 25 @@ -413,7 +421,7 @@ local function create_biter_battle_menu(player) c = c .. math.round((storage.game_lobby_timeout - game.tick) / 60, 0) c = c .. ')' end - local t = frame.add { type = 'table', column_count = 4 } + t = frame.add { type = 'table', column_count = 4 } for _, p in pairs(game.forces.south.connected_players) do local color = {} color = p.color @@ -421,7 +429,7 @@ local function create_biter_battle_menu(player) color.g = color.g * 0.6 + 0.4 color.b = color.b * 0.6 + 0.4 color.a = 1 - local l = t.add { type = 'label', caption = p.name } + l = t.add { type = 'label', caption = p.name } l.style.font_color = color end local b = frame.add { type = 'sprite-button', name = 'join_south_button', caption = c } @@ -431,17 +439,17 @@ local function create_biter_battle_menu(player) end if storage.team_chosen[player.name] then - local t = frame.add { type = 'table', column_count = 2 } + t = frame.add { type = 'table', column_count = 2 } if player.force.name == 'spectator' then - local b = t.add { type = 'sprite-button', name = 'biter_battle_leave_spectate', caption = 'Join Team' } + t.add { type = 'sprite-button', name = 'biter_battle_leave_spectate', caption = 'Join Team' } else - local b = t.add { type = 'sprite-button', name = 'biter_battle_spectate', caption = 'Spectate' } + t.add { type = 'sprite-button', name = 'biter_battle_spectate', caption = 'Spectate' } end if storage.biter_battle_view_players[player.name] == true then - local b = t.add { type = 'sprite-button', name = 'biter_battle_hide_players', caption = 'Playerlist' } + t.add { type = 'sprite-button', name = 'biter_battle_hide_players', caption = 'Playerlist' } else - local b = t.add { type = 'sprite-button', name = 'biter_battle_view_players', caption = 'Playerlist' } + t.add { type = 'sprite-button', name = 'biter_battle_view_players', caption = 'Playerlist' } end for _, b in pairs(t.children) do b.style.font = 'default-bold' @@ -485,7 +493,6 @@ local function join_team(player, team) game.print('Team ' .. player.force.name .. ' player ' .. player.name .. ' is no longer spectating.', { r = 0.98, g = 0.66, b = 0.22 }) else game.print(player.name .. ' has joined team ' .. player.force.name .. '!', { r = 0.98, g = 0.66, b = 0.22 }) - local i = player.get_inventory(defines.inventory.character_main) player.insert { name = 'pistol', count = 1 } player.insert { name = 'raw-fish', count = 3 } player.insert { name = 'firearm-magazine', count = 16 } @@ -541,7 +548,8 @@ local function on_player_joined_game(event) map_gen_settings.water = 'none' map_gen_settings.starting_area = '5' map_gen_settings.cliff_settings = { cliff_elevation_interval = 12, cliff_elevation_0 = 32 } - map_gen_settings.autoplace_controls = { + map_gen_settings.autoplace_controls = + { ['coal'] = { frequency = '0.8', size = '1', richness = '0.3' }, ['stone'] = { frequency = '0.8', size = '1', richness = '0.3' }, ['copper-ore'] = { frequency = '0.8', size = '2', richness = '0.3' }, @@ -595,8 +603,6 @@ local function on_player_joined_game(event) game.forces[name].set_turret_attack_modifier('flamethrower-turret', -0.5) --game.forces[name].set_ammo_damage_modifier("artillery-shell", -0.95) game.forces[name].set_ammo_damage_modifier('shotgun-shell', 0.5) - - game.forces[name].research_queue_enabled = true end game.forces['spectator'].technologies['toolbelt'].researched = true @@ -606,16 +612,16 @@ local function on_player_joined_game(event) f.set_friend('spectator', true) f.share_chart = true f.set_spawn_position({ 0, -26 }, surface) - local f = game.forces['south'] + f = game.forces['south'] f.set_cease_fire('player', true) f.set_friend('spectator', true) f.share_chart = true f.set_spawn_position({ 0, 26 }, surface) - local f = game.forces['spectator'] + f = game.forces['spectator'] f.set_spawn_position({ 0, 0 }, surface) f.set_friend('north', true) f.set_friend('south', true) - local f = game.forces['player'] + f = game.forces['player'] f.set_spawn_position({ 0, 0 }, surface) storage.biter_battles_init_done = true @@ -640,11 +646,11 @@ local function on_player_joined_game(event) refresh_gui() end -local function on_player_created(event) +local function on_player_created() refresh_gui() end -local function on_player_left_game(event) +local function on_player_left_game() if game.connected_players == 1 and storage.game_lobby_active == true then storage.game_lobby_timeout = game.tick + 599940 end @@ -686,7 +692,6 @@ local function feed_the_biters(food_type, player) return end - local surface = game.surfaces['surface'] local enemy_team = '' if player.force.name == 'south' then enemy_team = 'north' @@ -730,7 +735,6 @@ local function feed_the_biters(food_type, player) end local nerf_gain = 0 - local rage_gain = 0 if food_amount > 0 then nerf_gain = food_values[food_type] * food_amount @@ -738,7 +742,7 @@ local function feed_the_biters(food_type, player) local nerf_multiplier = 1 local rage_food_value = food_values[food_type] * 12500000 --10000000 --biter rage calculation - for x = 0, food_amount, 1 do + for _ = 0, food_amount, 1 do local rage_diminish_multiplier = 1 / (((storage.biter_rage[enemy_team] ^ 2.9) + 8000) / 500) storage.biter_rage[enemy_team] = storage.biter_rage[enemy_team] + (rage_food_value * rage_diminish_multiplier) end @@ -770,7 +774,7 @@ local function feed_the_biters(food_type, player) x = x + 1 end - local x = 1 + x = 1 for _, w in pairs(turret_types) do if f.get_turret_attack_modifier(w) - (nerf_gain * ammo_modifier[x]) < lowest_possible_modifier then m = lowest_possible_modifier @@ -781,7 +785,7 @@ local function feed_the_biters(food_type, player) x = x + 1 end - local x = 1 + x = 1 for _, w in pairs(ammo_speed) do if f.get_gun_speed_modifier(w) - (nerf_gain * ammo_speed_modifier[x]) < lowest_possible_modifier then m = lowest_possible_modifier @@ -892,7 +896,7 @@ local function create_fireworks_rocket(surface, position) local m = math_random(16, 36) local m2 = m * 0.005 - for i = 1, 80, 1 do + for _ = 1, 80, 1 do surface.create_entity( { name = particle, @@ -930,8 +934,9 @@ local function on_entity_died(event) if not traps[game.tick + t] then traps[game.tick + t] = {} end - for x = 1, 4, 1 do - traps[game.tick + t][#traps[game.tick + t] + 1] = { + for _ = 1, 4, 1 do + traps[game.tick + t][#traps[game.tick + t] + 1] = + { callback = 'create_fireworks_rocket', params = { event.entity.surface, { x = radius - math_random(0, radius * 2), y = radius - math_random(0, radius * 2) } } } @@ -1026,7 +1031,7 @@ local function biter_attack_silo(team, requested_amount, mode) valid_biters = get_valid_biters(requested_amount, y_modifier, 0, 1500 * y_modifier, 500) end - local f = math.floor(#valid_biters / requested_amount, 0) + local f = math.floor(#valid_biters / requested_amount) if f < 1 then f = 1 end @@ -1057,46 +1062,8 @@ local function biter_attack_silo(team, requested_amount, mode) end end - --[[ - if mode == "line" then - local valid_biters = get_valid_biters(requested_amount, y_modifier, 0, 150*y_modifier, 500) - if #valid_biters < requested_amount then - valid_biters = get_valid_biters(requested_amount, y_modifier, 0, 1500*y_modifier, 500) - end - - local array_start = 1 - local f = math.floor(#valid_biters/requested_amount,0) - if f >= 2 then - array_start = requested_amount * math_random(1,f-1) - if math_random(1,f) == 1 then array_start = 1 end - end - local x = 0 - for y = array_start,#valid_biters,1 do - x = x + 1 - if not valid_biters[y] then break end - if #biters_selected_for_attack >= requested_amount then break end - biters_selected_for_attack[x] = valid_biters[y] - end - - if math_random(1,3) == 1 then - for _, biter in pairs(biters_selected_for_attack) do - biter.set_command({type=defines.command.attack_area, destination=storage.biter_attack_main_target[team], radius=12, distraction=defines.distraction.by_anything}) - end - else - for _, biter in pairs(biters_selected_for_attack) do - biter.set_command({type=defines.command.attack_area, destination=storage.biter_attack_main_target[team], radius=12, distraction=defines.distraction.by_enemy}) - end - end - - if storage.biter_battles_debug then - game.players[1].print(#valid_biters .. " valid biters found.") - game.players[1].print(#biters_selected_for_attack .. " going for a line attack, table start = " .. array_start) - end - end - ]] if mode == 'ball' then local height = 0 - local width = 0 local c = 0 local tolerance = 5 local distance_to_base_modifier = 2.6 @@ -1141,7 +1108,7 @@ local function biter_attack_silo(team, requested_amount, mode) additional_empty_space_checks = 32 if r == 1 then --west attack - local additional_checks = additional_empty_space_checks + additional_checks = additional_empty_space_checks for x = 0, -8192, -32 do c = surface.count_entities_filtered { area = { { x - 32, gathering_point_y - 48 }, { x, gathering_point_y + 48 } }, force = team } if c <= tolerance then @@ -1158,7 +1125,7 @@ local function biter_attack_silo(team, requested_amount, mode) if r == 2 then --east attack - local additional_checks = additional_empty_space_checks + additional_checks = additional_empty_space_checks for x = 32, 8192, 32 do c = surface.count_entities_filtered { area = { { x - 32, gathering_point_y - 48 }, { x, gathering_point_y + 48 } }, force = team } if c <= tolerance then @@ -1223,8 +1190,8 @@ local function biter_attack_silo(team, requested_amount, mode) additional_empty_space_checks = 32 --vertical attack -- - local c = 0 - local additional_checks = additional_empty_space_checks + c = 0 + additional_checks = additional_empty_space_checks for pos_y = 0, 8192 * y_modifier, 32 * y_modifier do c = surface.count_entities_filtered { area = { { gathering_point_x - 48, pos_y - 32 }, { gathering_point_x + 48, pos_y } }, force = team } if c <= tolerance then @@ -1241,7 +1208,7 @@ local function biter_attack_silo(team, requested_amount, mode) valid_biters = get_valid_biters(requested_amount, y_modifier, gathering_point_x, gathering_point_y) - local f = math.floor(#valid_biters / requested_amount, 0) + local f = math.floor(#valid_biters / requested_amount) if f < 1 then f = 1 end @@ -1259,7 +1226,8 @@ local function biter_attack_silo(team, requested_amount, mode) --alternate attack if there is water local t = - surface.count_tiles_filtered { + surface.count_tiles_filtered + { area = { { gathering_point_x - 8, gathering_point_y - 8 }, { gathering_point_x + 8, gathering_point_y + 8 } }, name = { 'deepwater', 'water', 'water-green' } } @@ -1305,7 +1273,8 @@ local function send_near_biter_to_silo() end game.surfaces['surface'].set_multi_command( { - command = { + command = + { type = defines.command.attack, target = storage.rocket_silo['north'], distraction = defines.distraction.none @@ -1318,7 +1287,8 @@ local function send_near_biter_to_silo() game.surfaces['surface'].set_multi_command( { - command = { + command = + { type = defines.command.attack, target = storage.rocket_silo['south'], distraction = defines.distraction.none @@ -1330,7 +1300,7 @@ local function send_near_biter_to_silo() ) end -local function on_tick(event) +local function on_tick() if storage.rocket_silo_destroyed then if not storage.game_restart_timeout then storage.game_restart_timeout = 7200 @@ -1460,10 +1430,10 @@ local function on_chunk_generated(event) storage.biter_attack_main_target['north'] = storage.rocket_silo['north'].position storage.biter_attack_main_target['south'] = storage.rocket_silo['south'].position - biter_battles_terrain.clear_spawn_ores() - biter_battles_terrain.generate_spawn_water_pond() - biter_battles_terrain.generate_spawn_ores('windows') - biter_battles_terrain.generate_market() + BiterBattleTerrain.clear_spawn_ores() + BiterBattleTerrain.generate_spawn_water_pond() + BiterBattleTerrain.generate_spawn_ores() + BiterBattleTerrain.generate_market() --biter_battles_terrain.generate_artillery() @@ -1687,24 +1657,17 @@ local function on_robot_built_tile(event) end end -local function on_research_finished(event) - --game.forces.north.recipes["flamethrower-turret"].enabled = false - --game.forces.south.recipes["flamethrower-turret"].enabled = false -end - -event.add(defines.events.on_robot_built_tile, on_robot_built_tile) -event.add(defines.events.on_chunk_generated, on_chunk_generated) -event.add(defines.events.on_research_finished, on_research_finished) -event.add(defines.events.on_built_entity, on_built_entity) -event.add(defines.events.on_player_built_tile, on_player_built_tile) -event.add(defines.events.on_rocket_launched, on_rocket_launched) -event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction) -event.add(defines.events.on_robot_built_entity, on_robot_built_entity) -event.add(defines.events.on_entity_damaged, on_entity_damaged) -event.add(defines.events.on_player_left_game, on_player_left_game) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_tick, on_tick) -event.add(defines.events.on_player_created, on_player_created) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_gui_click, on_gui_click) -event.add(defines.events.on_console_chat, on_console_chat) +Event.add(defines.events.on_robot_built_tile, on_robot_built_tile) +Event.add(defines.events.on_chunk_generated, on_chunk_generated) +Event.add(defines.events.on_player_built_tile, on_player_built_tile) +Event.add(defines.events.on_rocket_launched, on_rocket_launched) +Event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction) +Event.add(defines.events.on_robot_built_entity, on_robot_built_entity) +Event.add(defines.events.on_entity_damaged, on_entity_damaged) +Event.add(defines.events.on_player_left_game, on_player_left_game) +Event.add(defines.events.on_entity_died, on_entity_died) +Event.add(defines.events.on_tick, on_tick) +Event.add(defines.events.on_player_created, on_player_created) +Event.add(defines.events.on_player_joined_game, on_player_joined_game) +Event.add(defines.events.on_gui_click, on_gui_click) +Event.add(defines.events.on_console_chat, on_console_chat) diff --git a/maps/biter_battles/biter_battles_terrain.lua b/maps/biter_battles/biter_battles_terrain.lua index 3b8e4330c..e688d5a60 100644 --- a/maps/biter_battles/biter_battles_terrain.lua +++ b/maps/biter_battles/biter_battles_terrain.lua @@ -1,8 +1,7 @@ --luacheck:ignore -local simplex_noise = require 'utils.math.simplex_noise' -local simplex_noise = simplex_noise.d2 -local event = require 'utils.event' -local biter_battles_terrain = {} +local SimplexNoise = require 'utils.math.simplex_noise'.d2 +local Event = require 'utils.event' +local BiterBattleTerrain = {} local math_random = math.random local table_insert = table.insert @@ -36,15 +35,15 @@ local function on_chunk_generated(event) local tile_to_insert = false local entity_has_been_placed = false - noise[1] = simplex_noise(pos_x / 250, pos_y / 250, seed) - noise[2] = simplex_noise(pos_x / 75, pos_y / 75, seed + 10000) - noise[8] = simplex_noise(pos_x / 15, pos_y / 15, seed + 40000) + noise[1] = SimplexNoise(pos_x / 250, pos_y / 250, seed) + noise[2] = SimplexNoise(pos_x / 75, pos_y / 75, seed + 10000) + noise[8] = SimplexNoise(pos_x / 15, pos_y / 15, seed + 40000) noise[3] = noise[1] + noise[2] * 0.2 + noise[8] * 0.02 - noise[4] = simplex_noise(pos_x / 200, pos_y / 200, seed + 15000) - noise[5] = simplex_noise(pos_x / 20, pos_y / 20, seed + 20000) - noise[6] = simplex_noise(pos_x / 8, pos_y / 8, seed + 25000) - noise[7] = simplex_noise(pos_x / 400, pos_y / 400, seed + 35000) + noise[4] = SimplexNoise(pos_x / 200, pos_y / 200, seed + 15000) + noise[5] = SimplexNoise(pos_x / 20, pos_y / 20, seed + 20000) + noise[6] = SimplexNoise(pos_x / 8, pos_y / 8, seed + 25000) + noise[7] = SimplexNoise(pos_x / 400, pos_y / 400, seed + 35000) local water_noise = noise[4] + (noise[6] * 0.006) + (noise[5] * 0.04) local a = ore_amount * (1 + (noise[2] * 0.3)) @@ -85,7 +84,8 @@ local function on_chunk_generated(event) if event.area.left_top.y < 160 or event.area.left_top.y > -192 then local tiles = {} - local spawn_tile = surface.get_tile(game.forces.south.get_spawn_position(surface)) + local pos = game.forces.south.get_spawn_position(surface) + local spawn_tile = surface.get_tile(pos.x, pos.y) local radius = 24 --starting pond radius local radsquare = radius * radius local horizontal_border_width = storage.horizontal_border_width @@ -96,8 +96,8 @@ local function on_chunk_generated(event) local pos_y = event.area.left_top.y + y local tile_to_insert = false local tile_distance_to_center = pos_x ^ 2 + pos_y ^ 2 - noise[4] = simplex_noise(pos_x / 85, pos_y / 85, seed + 20000) - noise[5] = simplex_noise(pos_x / 7, pos_y / 7, seed + 30000) + noise[4] = SimplexNoise(pos_x / 85, pos_y / 85, seed + 20000) + noise[5] = SimplexNoise(pos_x / 7, pos_y / 7, seed + 30000) noise[7] = 1 + (noise[4] + (noise[5] * 0.75)) * 0.11 if pos_y >= ((horizontal_border_width / 2) * -1) * noise[7] and pos_y <= (horizontal_border_width / 2) * noise[7] then if pos_x < 20 and pos_x > -20 then @@ -203,8 +203,8 @@ local function find_tile_placement_spot_around_target_position(tilename, positio while i <= scan_radius do y = y - density x = x - density - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) + for _ = 1, i, 1 do + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) @@ -212,8 +212,8 @@ local function find_tile_placement_spot_around_target_position(tilename, positio end x = x + density end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) + for _ = 1, i, 1 do + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) @@ -221,8 +221,8 @@ local function find_tile_placement_spot_around_target_position(tilename, positio end y = y + density end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) + for _ = 1, i, 1 do + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) @@ -230,8 +230,8 @@ local function find_tile_placement_spot_around_target_position(tilename, positio end x = x - density end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) + for _ = 1, i, 1 do + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) @@ -248,36 +248,36 @@ local function find_tile_placement_spot_around_target_position(tilename, positio while i <= scan_radius do y = y - density x = x - density - for a = 1, i, 1 do + for _ = 1, i, 1 do x = x + density - local scanned_tile = surface.get_tile(x, y) + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) return true, x, y end end - for a = 1, i, 1 do + for _ = 1, i, 1 do y = y + density - local scanned_tile = surface.get_tile(x, y) + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) return true, x, y end end - for a = 1, i, 1 do + for _ = 1, i, 1 do x = x - density - local scanned_tile = surface.get_tile(x, y) + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) return true, x, y end end - for a = 1, i, 1 do + for _ = 1, i, 1 do y = y - density - local scanned_tile = surface.get_tile(x, y) + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) @@ -293,8 +293,8 @@ local function find_tile_placement_spot_around_target_position(tilename, positio while i <= scan_radius do y = y - density x = x + density - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) + for _ = 1, i, 1 do + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) @@ -302,8 +302,8 @@ local function find_tile_placement_spot_around_target_position(tilename, positio end y = y + density end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) + for _ = 1, i, 1 do + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) @@ -311,8 +311,8 @@ local function find_tile_placement_spot_around_target_position(tilename, positio end x = x - density end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) + for _ = 1, i, 1 do + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) @@ -320,8 +320,8 @@ local function find_tile_placement_spot_around_target_position(tilename, positio end y = y - density end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) + for _ = 1, i, 1 do + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) @@ -338,36 +338,36 @@ local function find_tile_placement_spot_around_target_position(tilename, positio while i <= scan_radius do y = y - density x = x + density - for a = 1, i, 1 do + for _ = 1, i, 1 do y = y + density - local scanned_tile = surface.get_tile(x, y) + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) return true, x, y end end - for a = 1, i, 1 do + for _ = 1, i, 1 do x = x - density - local scanned_tile = surface.get_tile(x, y) + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) return true, x, y end end - for a = 1, i, 1 do + for _ = 1, i, 1 do y = y - density - local scanned_tile = surface.get_tile(x, y) + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) return true, x, y end end - for a = 1, i, 1 do + for _ = 1, i, 1 do x = x + density - local scanned_tile = surface.get_tile(x, y) + scanned_tile = surface.get_tile(x, y) if scanned_tile.name ~= tilename then table_insert(cluster_tiles, { name = tilename, position = { x, y } }) surface.set_tiles(cluster_tiles, auto_correct) @@ -382,11 +382,7 @@ end local function create_tile_cluster(tilename, position, amount) local mode = 'ball' - local cluster_tiles = {} - local surface = game.surfaces['surface'] local pos = position - local x = pos.x - local y = pos.y for i = 1, amount, 1 do local b, x, y = find_tile_placement_spot_around_target_position(tilename, pos, mode) if b == true then @@ -404,47 +400,46 @@ local function create_tile_cluster(tilename, position, amount) end end -function biter_battles_terrain.generate_spawn_water_pond() +function BiterBattleTerrain.generate_spawn_water_pond() local x = 1 local surface = game.surfaces['surface'] for _, silo in pairs(storage.rocket_silo) do local pos = {} - local wreck_pos = {} pos['x'] = silo.position.x + 60 * x pos['y'] = silo.position.y - 5 * x create_tile_cluster('water-green', pos, 450) - local p = surface.find_non_colliding_position('big-ship-wreck-1', { pos['x'], pos['y'] - 3 * x }, 20, 1) - local e = surface.create_entity { name = 'big-ship-wreck-1', position = p, force = silo.force.name } + local p = surface.find_non_colliding_position('crash-site-spaceship-wreck-big-1', { pos['x'], pos['y'] - 3 * x }, 20, 1) + local e = surface.create_entity { name = 'crash-site-spaceship-wreck-big-1', position = p, force = silo.force.name } e.insert({ name = 'copper-cable', count = 7 }) e.insert({ name = 'iron-stick', count = 3 }) - local p = surface.find_non_colliding_position('big-ship-wreck-3', { pos.x - 3 * x, pos.y }, 20, 1) - local e = surface.create_entity { name = 'big-ship-wreck-3', position = p, force = silo.force.name } + p = surface.find_non_colliding_position('crash-site-spaceship-wreck-big-2', { pos.x - 3 * x, pos.y }, 20, 1) + e = surface.create_entity { name = 'crash-site-spaceship-wreck-big-2', position = p, force = silo.force.name } e.insert({ name = 'land-mine', count = 6 }) pos['x'] = silo.position.x - 80 * x pos['y'] = silo.position.y - 60 * x create_tile_cluster('water-green', pos, 300) - local p = surface.find_non_colliding_position('big-ship-wreck-2', { pos.x + 3 * x, pos.y - 5 * x }, 20, 1) - local e = surface.create_entity { name = 'big-ship-wreck-2', position = p, force = silo.force.name } + p = surface.find_non_colliding_position('crash-site-spaceship-wreck-medium-1', { pos.x + 3 * x, pos.y - 5 * x }, 20, 1) + e = surface.create_entity { name = 'crash-site-spaceship-wreck-medium-1', position = p, force = silo.force.name } e.insert({ name = 'barrel', count = 1 }) e.insert({ name = 'lubricant-barrel', count = 2 }) - local p = surface.find_non_colliding_position('crude-oil', { pos.x - 5 * x, pos.y + 5 * x }, 50, 1) - local e = surface.create_entity { name = 'crude-oil', position = p, amount = 225000 } + p = surface.find_non_colliding_position('crude-oil', { pos.x - 5 * x, pos.y + 5 * x }, 50, 1) + e = surface.create_entity { name = 'crude-oil', position = p, amount = 225000 } x = -1 end - for x = -200, 200, 1 do + for xv = -200, 200, 1 do for y = -200, 200, 1 do - local t = surface.get_tile(x, y) + local t = surface.get_tile(xv, y) if t.name == 'water-green' then - if surface.can_place_entity { name = 'fish', position = { x, y } } and math_random(1, 12) == 1 then - surface.create_entity { name = 'fish', position = { x, y } } + if surface.can_place_entity { name = 'fish', position = { xv, y } } and math_random(1, 12) == 1 then + surface.create_entity { name = 'fish', position = { xv, y } } end end end end end -function biter_battles_terrain.clear_spawn_ores() +function BiterBattleTerrain.clear_spawn_ores() local surface = game.surfaces['surface'] for x = -200, 200, 1 do for y = -200, 200, 1 do @@ -461,7 +456,7 @@ function biter_battles_terrain.clear_spawn_ores() end end -function biter_battles_terrain.generate_market() +function BiterBattleTerrain.generate_market() local surface = game.surfaces['surface'] for z = -1, 1, 2 do local f = 'north' @@ -480,20 +475,20 @@ function biter_battles_terrain.generate_market() end m.minable = false m.destructible = false - m.add_market_item { price = { { 'raw-fish', 1 } }, offer = { type = 'give-item', item = 'small-electric-pole', count = 2 } } - m.add_market_item { price = { { 'raw-fish', 1 } }, offer = { type = 'give-item', item = 'firearm-magazine', count = 2 } } - m.add_market_item { price = { { 'raw-fish', 2 } }, offer = { type = 'give-item', item = 'grenade' } } - m.add_market_item { price = { { 'raw-fish', 2 } }, offer = { type = 'give-item', item = 'land-mine', count = 1 } } - m.add_market_item { price = { { 'raw-fish', 5 } }, offer = { type = 'give-item', item = 'light-armor' } } - m.add_market_item { price = { { 'raw-fish', 8 } }, offer = { type = 'give-item', item = 'radar' } } - m.add_market_item { price = { { 'iron-ore', 50 } }, offer = { type = 'give-item', item = 'raw-fish' } } - m.add_market_item { price = { { 'copper-ore', 50 } }, offer = { type = 'give-item', item = 'raw-fish' } } - m.add_market_item { price = { { 'stone', 50 } }, offer = { type = 'give-item', item = 'raw-fish' } } - m.add_market_item { price = { { 'coal', 50 } }, offer = { type = 'give-item', item = 'raw-fish' } } + m.add_market_item { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'small-electric-pole', count = 2 } } + m.add_market_item { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'firearm-magazine', count = 2 } } + m.add_market_item { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'grenade' } } + m.add_market_item { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'land-mine', count = 1 } } + m.add_market_item { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'light-armor' } } + m.add_market_item { price = { { name = 'raw-fish', count = 8 } }, offer = { type = 'give-item', item = 'radar' } } + m.add_market_item { price = { { name = 'iron-ore', count = 50 } }, offer = { type = 'give-item', item = 'raw-fish' } } + m.add_market_item { price = { { name = 'copper-ore', count = 50 } }, offer = { type = 'give-item', item = 'raw-fish' } } + m.add_market_item { price = { { name = 'stone', count = 50 } }, offer = { type = 'give-item', item = 'raw-fish' } } + m.add_market_item { price = { { name = 'coal', count = 50 } }, offer = { type = 'give-item', item = 'raw-fish' } } end end -function biter_battles_terrain.generate_artillery() +function BiterBattleTerrain.generate_artillery() local tiles = {} local surface = game.surfaces['surface'] storage.spawn_artillery = {} @@ -533,19 +528,19 @@ function biter_battles_terrain.generate_artillery() surface.set_tiles(tiles, true) end -function biter_battles_terrain.generate_spawn_ores(ore_layout) +function BiterBattleTerrain.generate_spawn_ores(ore_layout) local surface = game.surfaces['surface'] local seed = game.surfaces[1].map_gen_settings.seed local tiles = {} --generate ores around silos - local ore_layout = 'windows' + ore_layout = ore_layout or 'windows' --local ore_layout = "4squares" local ore_amount = 850 if ore_layout == '4squares' then local size = 22 for _, rocket_silo in pairs(storage.rocket_silo) do - local tiles = {} + tiles = {} for x = (size + 1) * -1, size + 1, 1 do for y = (size + 1) * -1, size + 1, 1 do table_insert(tiles, { name = 'stone-path', position = { rocket_silo.position.x + x, rocket_silo.position.y + y } }) @@ -566,13 +561,15 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) for y = size * -1, size, 1 do if x > 0 and y < 0 then if - surface.can_place_entity { + surface.can_place_entity + { name = 'stone', position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, amount = ore_amount } then - surface.create_entity { + surface.create_entity + { name = 'stone', position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, amount = ore_amount @@ -581,13 +578,15 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) end if x < 0 and y < 0 then if - surface.can_place_entity { + surface.can_place_entity + { name = 'coal', position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, amount = ore_amount } then - surface.create_entity { + surface.create_entity + { name = 'coal', position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, amount = ore_amount @@ -596,13 +595,15 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) end if x < 0 and y > 0 then if - surface.can_place_entity { + surface.can_place_entity + { name = 'copper-ore', position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, amount = ore_amount } then - surface.create_entity { + surface.create_entity + { name = 'copper-ore', position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, amount = ore_amount @@ -611,13 +612,15 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) end if x > 0 and y > 0 then if - surface.can_place_entity { + surface.can_place_entity + { name = 'iron-ore', position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, amount = ore_amount } then - surface.create_entity { + surface.create_entity + { name = 'iron-ore', position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, amount = ore_amount @@ -626,13 +629,15 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) end if x < 0 and y > 0 then if - surface.can_place_entity { + surface.can_place_entity + { name = 'stone', position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, amount = ore_amount } then - surface.create_entity { + surface.create_entity + { name = 'stone', position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, amount = ore_amount @@ -641,13 +646,15 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) end if x > 0 and y > 0 then if - surface.can_place_entity { + surface.can_place_entity + { name = 'coal', position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, amount = ore_amount } then - surface.create_entity { + surface.create_entity + { name = 'coal', position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, amount = ore_amount @@ -656,13 +663,15 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) end if x > 0 and y < 0 then if - surface.can_place_entity { + surface.can_place_entity + { name = 'copper-ore', position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, amount = ore_amount } then - surface.create_entity { + surface.create_entity + { name = 'copper-ore', position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, amount = ore_amount @@ -671,13 +680,15 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) end if x < 0 and y < 0 then if - surface.can_place_entity { + surface.can_place_entity + { name = 'iron-ore', position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, amount = ore_amount } then - surface.create_entity { + surface.create_entity + { name = 'iron-ore', position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, amount = ore_amount @@ -703,24 +714,24 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) local m4 = 23 for x = m4 * -1, m4, 1 do - local noise = simplex_noise(x * m1, 1 * m1, seed + 50000) + local noise = SimplexNoise(x * m1, 1 * m1, seed + 50000) noise = noise * m2 + m3 for y = (m4 + 1) * -1 * noise, m4 * noise, 1 do table_insert(tiles, { name = 'stone-path', position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y } }) end - local noise = simplex_noise(x * m1, 1 * m1, seed + 60000) + noise = SimplexNoise(x * m1, 1 * m1, seed + 60000) noise = noise * m2 + m3 for y = (m4 + 1) * -1 * noise, m4 * noise, 1 do table_insert(tiles, { name = 'stone-path', position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y } }) end end for y = (m4 + 1) * -1, m4, 1 do - local noise = simplex_noise(y * m1, 1 * m1, seed + 50000) + local noise = SimplexNoise(y * m1, 1 * m1, seed + 50000) noise = noise * m2 + m3 for x = m4 * -1 * noise, m4 * noise, 1 do table_insert(tiles, { name = 'stone-path', position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y } }) end - local noise = simplex_noise(y * m1, 1 * m1, seed + 60000) + noise = SimplexNoise(y * m1, 1 * m1, seed + 60000) noise = noise * m2 + m3 for x = m4 * -1 * noise, m4 * noise, 1 do table_insert(tiles, { name = 'stone-path', position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y } }) @@ -728,7 +739,8 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) end surface.set_tiles(tiles, true) - local ore = { + local ore = + { 'stone', 'stone', 'stone', @@ -753,13 +765,15 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) for x = -4 - z, 4 + z, 1 do for y = -5 - z, 4 + z, 1 do if - surface.can_place_entity { + surface.can_place_entity + { name = ore[z], position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, amount = ore_amount } then - surface.create_entity { + surface.create_entity + { name = ore[z], position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, amount = ore_amount @@ -772,13 +786,15 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) for x = -4 - z, 4 + z, 1 do for y = -5 - z, 4 + z, 1 do if - surface.can_place_entity { + surface.can_place_entity + { name = ore[z], position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, amount = ore_amount } then - surface.create_entity { + surface.create_entity + { name = ore[z], position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, amount = ore_amount @@ -799,6 +815,6 @@ function biter_battles_terrain.generate_spawn_ores(ore_layout) end end -event.add(defines.events.on_chunk_generated, on_chunk_generated) +Event.add(defines.events.on_chunk_generated, on_chunk_generated) -return biter_battles_terrain +return BiterBattleTerrain diff --git a/maps/biter_battles/biter_battles_terrain_neko.lua b/maps/biter_battles/biter_battles_terrain_neko.lua deleted file mode 100644 index 485dcbc28..000000000 --- a/maps/biter_battles/biter_battles_terrain_neko.lua +++ /dev/null @@ -1,696 +0,0 @@ ---luacheck:ignore -local simplex_noise = require 'utils.tools.simplex_noise' -local Event = require 'utils.event' -biter_battles_terrain = {} - ---no need to constantly work out each chunk -local radius = 24 --starting pond radius -local radsquare = radius * radius -local ore_amount = 1400 -local ores = { 'copper-ore', 'iron-ore', 'stone', 'coal', 'uranium-ore' } - --- /c game.forces["north"].chart(game.player.surface, {lefttop = {x = -1024, y = -1024}, rightbottom = {x = 1024, y = 1024}}) - -local function on_chunk_generated(event) - if not storage.noise_seed then - storage.noise_seed = math.random(1, 5000000) - end - local left_top = event.area.left_top --decreased var calls in later loop with more direct - local surface = game.surfaces[1] - local noise = {} - - local entities = surface.find_entities(event.area) - for _, entity in pairs(entities) do - if entity.type == 'resource' then - entity.destroy() - end - end - - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos_x = left_top.x + x - local pos_y = left_top.y + y - local tile_to_insert = false - --noise[1] = simplex_noise.d2(pos_x/350, pos_y/350,storage.noise_seed) - noise[1] = simplex_noise.d2(pos_x * 0.008, pos_y * 0.008, storage.noise_seed) --100 - noise[2] = simplex_noise.d2(pos_x * 0.05, pos_y * 0.05, storage.noise_seed + 10000) - noise[3] = noise[1] + noise[2] * 0.1 - - --local xx = 1 - --for yy = 1, 17, 1 do - --local z = (yy % 4) + 1 - --xx = xx - 0.010 - --if noise[3] > xx then - if noise[3] > 0.65 then - --break - local a = ore_amount * (1 + (noise[2] * 0.3)) --moved to when used - --local z = (yy % 4) + 1 - noise[4] = simplex_noise.d2(pos_x * 0.005, pos_y * 0.005, storage.noise_seed + 5000) - noise[5] = simplex_noise.d2(pos_x * 0.005, pos_y * 0.005, storage.noise_seed + 3000) - local z = 2 - - if noise[4] > 0.2 then - if noise[5] > 0.05 then - z = 3 - elseif noise[5] < -0.05 then - z = 4 - else - z = 5 - end - elseif noise[4] < -0.2 then - if noise[5] > 0.05 then - z = 1 - elseif noise[5] < -0.05 then - z = 2 - else - z = 5 - end - else - z = math.floor((noise[3] + noise[2] * 0.1) * 40) % 4 + 1 - end - - --if noise[4] > 0.0 and noise[4] < 0.05 then z = (math.floor((noise[3]+noise[2]*0.1)* 40) % 4) + 1 end - if surface.can_place_entity { name = ores[z], position = { pos_x, pos_y }, amount = a } then - surface.create_entity { name = ores[z], position = { pos_x, pos_y }, amount = a } - end - elseif noise[3] < -0.85 then - if math.random(1, 250) == 1 and surface.can_place_entity { name = 'crude-oil', position = { pos_x, pos_y } } then - surface.create_entity { name = 'crude-oil', position = { pos_x, pos_y }, amount = math.random(140000, 380000) } - end - end - --end - end - end - - if left_top.y > 96 or left_top.y < -128 then - return - end --tweeked range - local tiles = {} - local spawn_tile = surface.get_tile(game.forces.south.get_spawn_position(surface)) - - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos_x = left_top.x + x - local pos_y = left_top.y + y - local tile_to_insert = false - local tile_distance_to_center = pos_x ^ 2 + pos_y ^ 2 - noise[4] = simplex_noise.d2(pos_x * 0.0118, pos_y * 0.0118, storage.noise_seed + 20000) - noise[5] = simplex_noise.d2(pos_x * 0.15, pos_y * 0.15, storage.noise_seed + 30000) - noise[7] = 1 + (noise[4] + (noise[5] * 0.75)) * 0.1 - if pos_y >= ((storage.horizontal_border_width / 2) * -1) * noise[7] and pos_y <= (storage.horizontal_border_width / 2) * noise[7] then - local entities = surface.find_entities({ { pos_x, pos_y }, { pos_x + 1, pos_y + 1 } }) - for _, e in pairs(entities) do - if e.type == 'simple-entity' or e.type == 'resource' or e.type == 'tree' then - e.destroy() - end - end - tile_to_insert = 'deepwater' - else - local t = surface.get_tile(pos_x, pos_y) - if t.name == 'deepwater' or t.name == 'water' then - if tile_distance_to_center < 20000 then - if spawn_tile.name == 'water' or spawn_tile.name == 'deepwater' then - tile_to_insert = 'sand-1' - else - tile_to_insert = spawn_tile.name - end - end - end - end - if tile_distance_to_center <= radsquare then - if tile_distance_to_center >= radsquare / 10 then - tile_to_insert = 'deepwater' - else - tile_to_insert = 'sand-1' - if tile_distance_to_center >= radsquare / 18 then - tile_to_insert = 'refined-concrete' - end - end - end - if tile_to_insert then - table.insert(tiles, { name = tile_to_insert, position = { pos_x, pos_y } }) - end - end - end - surface.set_tiles(tiles, true) - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos_x = left_top.x + x - local pos_y = left_top.y + y - local t = surface.get_tile(pos_x, pos_y) - if t.name == 'water' or t.name == 'deepwater' or t.name == 'water-green' then - if surface.can_place_entity { name = 'fish', position = { pos_x, pos_y } } and math.random(1, 40) == 1 then - surface.create_entity { name = 'fish', position = { pos_x, pos_y } } - end - end - end - end -end - -local function find_tile_placement_spot_around_target_position(tilename, position, mode, density) - local x = position.x - local y = position.y - if not surface then - surface = game.surfaces[1] - end - local scan_radius = 50 - if not tilename then - return - end - if not mode then - mode = 'ball' - end - if not density then - density = 1 - end - local cluster_tiles = {} - local auto_correct = true - - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - - local i = 2 - local r = 1 - - if mode == 'ball' then - if math.random(1, 2) == 1 then - density = density * -1 - end - r = math.random(1, 4) - end - if mode == 'line' then - density = 1 - r = math.random(1, 4) - end - if mode == 'line_down' then - density = density * -1 - r = math.random(1, 4) - end - if mode == 'line_up' then - density = 1 - r = math.random(1, 4) - end - if mode == 'block' then - r = 1 - density = 1 - end - - if r == 1 then - --start placing at -1,-1 - while i <= scan_radius do - y = y - density - x = x - density - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - x = x + density - end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - y = y + density - end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - x = x - density - end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - y = y - density - end - i = i + 2 - end - end - - if r == 2 then - --start placing at 0,-1 - while i <= scan_radius do - y = y - density - x = x - density - for a = 1, i, 1 do - x = x + density - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - end - for a = 1, i, 1 do - y = y + density - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - end - for a = 1, i, 1 do - x = x - density - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - end - for a = 1, i, 1 do - y = y - density - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - end - i = i + 2 - end - end - - if r == 3 then - --start placing at 1,-1 - while i <= scan_radius do - y = y - density - x = x + density - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - y = y + density - end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - x = x - density - end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - y = y - density - end - for a = 1, i, 1 do - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - x = x + density - end - i = i + 2 - end - end - - if r == 4 then - --start placing at 1,0 - while i <= scan_radius do - y = y - density - x = x + density - for a = 1, i, 1 do - y = y + density - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - end - for a = 1, i, 1 do - x = x - density - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - end - for a = 1, i, 1 do - y = y - density - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - end - for a = 1, i, 1 do - x = x + density - local scanned_tile = surface.get_tile(x, y) - if scanned_tile.name ~= tilename then - table.insert(cluster_tiles, { name = tilename, position = { x, y } }) - surface.set_tiles(cluster_tiles, auto_correct) - return true, x, y - end - end - i = i + 2 - end - end - return false -end - -local function create_tile_cluster(tilename, position, amount) - local mode = 'ball' - local cluster_tiles = {} - local surface = game.surfaces[1] - local pos = position - local x = pos.x - local y = pos.y - for i = 1, amount, 1 do - local b, x, y = find_tile_placement_spot_around_target_position(tilename, pos, mode) - if b == true then - if 1 == math.random(1, 16) then - pos.x = x - pos.y = y - end - end - if b == false then - return false, x, y - end - if i >= amount then - return true, x, y - end - end -end - -function biter_battles_terrain.generate_spawn_water_pond() - local x = 1 - local surface = game.surfaces[1] - for _, silo in pairs(storage.rocket_silo) do - local pos = {} - local wreck_pos = {} - pos['x'] = silo.position.x + 60 * x - pos['y'] = silo.position.y - 5 * x - wreck_pos['x'] = silo.position.x + 60 * x - wreck_pos['y'] = silo.position.y - 5 * x - create_tile_cluster('water-green', pos, 450) - local p = surface.find_non_colliding_position('big-ship-wreck-1', { wreck_pos.x, wreck_pos.y - 3 * x }, 20, 1) - local e = surface.create_entity { name = 'big-ship-wreck-1', position = p, force = silo.force.name } - e.insert({ name = 'copper-cable', count = 7 }) - e.insert({ name = 'iron-stick', count = 3 }) - local p = surface.find_non_colliding_position('big-ship-wreck-3', { pos.x - 3 * x, pos.y }, 20, 1) - local e = surface.create_entity { name = 'big-ship-wreck-3', position = p, force = silo.force.name } - e.insert({ name = 'land-mine', count = 6 }) - pos['x'] = silo.position.x - math.random(80, 90) * x - pos['y'] = silo.position.y - math.random(50, 70) * x - create_tile_cluster('water-green', pos, 300) - local p = surface.find_non_colliding_position('big-ship-wreck-2', { pos.x + 3 * x, pos.y + 1 * x }, 20, 1) - local e = surface.create_entity { name = 'big-ship-wreck-2', position = p, force = silo.force.name } - e.insert({ name = 'barrel', count = 1 }) - e.insert({ name = 'lubricant-barrel', count = 2 }) - local p = surface.find_non_colliding_position('crude-oil', { pos.x - 5 * x, pos.y + 5 * x }, 50, 1) - local e = surface.create_entity { name = 'crude-oil', position = p, amount = 225000 } - x = -1 - end -end - -function biter_battles_terrain.clear_spawn_ores() - local surface = game.surfaces[1] - for x = -200, 200, 1 do - for y = -200, 200, 1 do - local tile_distance_to_center = math.sqrt(x ^ 2 + y ^ 2) - if tile_distance_to_center < 150 then - local entities = surface.find_entities({ { x, y }, { x + 1, y + 1 } }) - for _, e in pairs(entities) do - if e.type == 'resource' then - e.destroy() - end - end - end - end - end -end - -function biter_battles_terrain.generate_spawn_ores(ore_layout) - local surface = game.surfaces[1] - local tiles = {} - --generate ores around silos - local ore_layout = 'windows' - --local ore_layout = "4squares" - local ore_amount = 1000 - - if ore_layout == '4squares' then - local size = 22 - for _, rocket_silo in pairs(storage.rocket_silo) do - local tiles = {} - for x = (size + 1) * -1, size + 1, 1 do - for y = (size + 1) * -1, size + 1, 1 do - table.insert(tiles, { name = 'stone-path', position = { rocket_silo.position.x + x, rocket_silo.position.y + y } }) - end - end - surface.set_tiles(tiles, true) - local entities = surface.find_entities({ { (rocket_silo.position.x - 4) - size / 2, (rocket_silo.position.y - 5) - size / 2 }, { rocket_silo.position.x + 4 + size / 2, rocket_silo.position.y + 5 + size / 2 } }) - for _, entity in pairs(entities) do - if entity.type == 'simple-entity' or entity.type == 'tree' or entity.type == 'resource' then - entity.destroy() - end - end - end - for x = size * -1, size, 1 do - for y = size * -1, size, 1 do - if x > 0 and y < 0 then - if - surface.can_place_entity { - name = 'stone', - position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, - amount = ore_amount - } - then - surface.create_entity { - name = 'stone', - position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, - amount = ore_amount - } - end - end - if x < 0 and y < 0 then - if - surface.can_place_entity { - name = 'coal', - position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, - amount = ore_amount - } - then - surface.create_entity { - name = 'coal', - position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, - amount = ore_amount - } - end - end - if x < 0 and y > 0 then - if - surface.can_place_entity { - name = 'copper-ore', - position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, - amount = ore_amount - } - then - surface.create_entity { - name = 'copper-ore', - position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, - amount = ore_amount - } - end - end - if x > 0 and y > 0 then - if - surface.can_place_entity { - name = 'iron-ore', - position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, - amount = ore_amount - } - then - surface.create_entity { - name = 'iron-ore', - position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, - amount = ore_amount - } - end - end - if x < 0 and y > 0 then - if - surface.can_place_entity { - name = 'stone', - position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, - amount = ore_amount - } - then - surface.create_entity { - name = 'stone', - position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, - amount = ore_amount - } - end - end - if x > 0 and y > 0 then - if - surface.can_place_entity { - name = 'coal', - position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, - amount = ore_amount - } - then - surface.create_entity { - name = 'coal', - position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, - amount = ore_amount - } - end - end - if x > 0 and y < 0 then - if - surface.can_place_entity { - name = 'copper-ore', - position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, - amount = ore_amount - } - then - surface.create_entity { - name = 'copper-ore', - position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, - amount = ore_amount - } - end - end - if x < 0 and y < 0 then - if - surface.can_place_entity { - name = 'iron-ore', - position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, - amount = ore_amount - } - then - surface.create_entity { - name = 'iron-ore', - position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, - amount = ore_amount - } - end - end - end - end - for _, rocket_silo in pairs(storage.rocket_silo) do - local entities = surface.find_entities({ { rocket_silo.position.x - 5, rocket_silo.position.y - 6 }, { rocket_silo.position.x + 5, rocket_silo.position.y + 6 } }) - for _, entity in pairs(entities) do - if entity.type == 'resource' then - entity.destroy() - end - end - end - end - - if ore_layout == 'windows' then - for x = -24, 24, 1 do - for y = -25, 24, 1 do - table.insert(tiles, { name = 'stone-path', position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y } }) - table.insert(tiles, { name = 'stone-path', position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y } }) - end - end - surface.set_tiles(tiles, true) - local ore = { - 'stone', - 'stone', - 'stone', - 'stone', - 'coal', - 'coal', - 'coal', - 'coal', - 'coal', - 'copper-ore', - 'copper-ore', - 'copper-ore', - 'copper-ore', - 'copper-ore', - 'iron-ore', - 'iron-ore', - 'iron-ore', - 'iron-ore', - 'iron-ore' - } - for z = 1, 19, 1 do - for x = -4 - z, 4 + z, 1 do - for y = -5 - z, 4 + z, 1 do - if - surface.can_place_entity { - name = ore[z], - position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, - amount = ore_amount - } - then - surface.create_entity { - name = ore[z], - position = { storage.rocket_silo['south'].position.x + x, storage.rocket_silo['south'].position.y + y }, - amount = ore_amount - } - end - end - end - end - for z = 1, 19, 1 do - for x = -4 - z, 4 + z, 1 do - for y = -5 - z, 4 + z, 1 do - if - surface.can_place_entity { - name = ore[z], - position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, - amount = ore_amount - } - then - surface.create_entity { - name = ore[z], - position = { storage.rocket_silo['north'].position.x + x, storage.rocket_silo['north'].position.y + y }, - amount = ore_amount - } - end - end - end - end - end - - for _, rocket_silo in pairs(storage.rocket_silo) do - local entities = surface.find_entities({ { rocket_silo.position.x - 4, rocket_silo.position.y - 5 }, { rocket_silo.position.x + 4, rocket_silo.position.y + 5 } }) - for _, entity in pairs(entities) do - if entity.type == 'resource' then - entity.destroy() - end - end - end -end - -Event.add(defines.events.on_chunk_generated, on_chunk_generated) - -return biter_battles_ores diff --git a/maps/biter_battles_v2/ai.lua b/maps/biter_battles_v2/ai.lua index 7e922b111..01d1eaca8 100644 --- a/maps/biter_battles_v2/ai.lua +++ b/maps/biter_battles_v2/ai.lua @@ -24,7 +24,8 @@ local size_of_vectors = #attack_vectors.north local unit_type_raffle = { 'biter', 'biter', 'biter', 'mixed', 'mixed', 'spitter' } local size_of_unit_type_raffle = #unit_type_raffle -local threat_values = { +local threat_values = +{ ['small-spitter'] = 1.5, ['small-biter'] = 1.5, ['medium-spitter'] = 4.5, @@ -164,7 +165,8 @@ Public.send_near_biters_to_silo = function () game.surfaces['biter_battles'].set_multi_command( { - command = { + command = + { type = defines.command.attack, target = storage.rocket_silo['north'], distraction = defines.distraction.none @@ -177,7 +179,8 @@ Public.send_near_biters_to_silo = function () game.surfaces['biter_battles'].set_multi_command( { - command = { + command = + { type = defines.command.attack, target = storage.rocket_silo['south'], distraction = defines.distraction.none @@ -302,7 +305,8 @@ local function send_group(unit_group, force_name, side_target) position = unit_group.surface.find_non_colliding_position('stone-furnace', position, 96, 1) if position then if math.abs(position.y) < math.abs(unit_group.position.y) then - commands[#commands + 1] = { + commands[#commands + 1] = + { type = defines.command.attack_area, destination = position, radius = 16, @@ -311,14 +315,16 @@ local function send_group(unit_group, force_name, side_target) end end - commands[#commands + 1] = { + commands[#commands + 1] = + { type = defines.command.attack_area, destination = target, radius = 32, distraction = defines.distraction.by_enemy } - commands[#commands + 1] = { + commands[#commands + 1] = + { type = defines.command.attack, target = storage.rocket_silo[force_name], distraction = defines.distraction.by_enemy @@ -372,7 +378,7 @@ local function get_nearby_biter_nest(target_entity) end local best_distance = (center.x - spawner.position.x) ^ 2 + (center.y - spawner.position.y) ^ 2 - for i = 1, 16, 1 do + for _ = 1, 16, 1 do local new_spawner = get_random_spawner(biter_force_name) local new_distance = (center.x - new_spawner.position.x) ^ 2 + (center.y - new_spawner.position.y) ^ 2 if new_distance < best_distance then diff --git a/maps/biter_battles_v2/biter_raffle.lua b/maps/biter_battles_v2/biter_raffle.lua index 4c535d52d..feb7fa52b 100644 --- a/maps/biter_battles_v2/biter_raffle.lua +++ b/maps/biter_battles_v2/biter_raffle.lua @@ -4,7 +4,8 @@ local math_random = math.random local math_floor = math.floor local function get_raffle_table(level, name) - local raffle = { + local raffle = + { ['small-' .. name] = 1000 - level * 1.75, ['medium-' .. name] = -250 + level * 1.5, ['big-' .. name] = 0, @@ -18,7 +19,7 @@ local function get_raffle_table(level, name) if level > 900 then raffle['behemoth-' .. name] = (level - 900) * 8 end - for k, v in pairs(raffle) do + for k, _ in pairs(raffle) do if raffle[k] < 0 then raffle[k] = 0 end @@ -29,7 +30,7 @@ end local function roll(evolution_factor, name) local raffle = get_raffle_table(math_floor(evolution_factor * 1000), name) local max_chance = 0 - for k, v in pairs(raffle) do + for _, v in pairs(raffle) do max_chance = max_chance + v end local r = math_random(0, math_floor(max_chance)) @@ -51,7 +52,8 @@ local function get_spitter_name(evolution_factor) end local function get_worm_raffle_table(level) - local raffle = { + local raffle = + { ['small-worm-turret'] = 1000 - level * 1.75, ['medium-worm-turret'] = level, ['big-worm-turret'] = 0, @@ -65,7 +67,7 @@ local function get_worm_raffle_table(level) if level > 900 then raffle['behemoth-worm-turret'] = (level - 900) * 3 end - for k, v in pairs(raffle) do + for k, _ in pairs(raffle) do if raffle[k] < 0 then raffle[k] = 0 end @@ -76,7 +78,7 @@ end local function get_worm_name(evolution_factor) local raffle = get_worm_raffle_table(math_floor(evolution_factor * 1000)) local max_chance = 0 - for k, v in pairs(raffle) do + for _, v in pairs(raffle) do max_chance = max_chance + v end local r = math_random(0, math_floor(max_chance)) @@ -97,7 +99,8 @@ local function get_unit_name(evolution_factor) end end -local type_functions = { +local type_functions = +{ ['spitter'] = get_spitter_name, ['biter'] = get_biter_name, ['mixed'] = get_unit_name, diff --git a/maps/biter_battles_v2/commands.lua b/maps/biter_battles_v2/commands.lua index 98eb098c9..5928b7ce1 100644 --- a/maps/biter_battles_v2/commands.lua +++ b/maps/biter_battles_v2/commands.lua @@ -1,6 +1,5 @@ --luacheck:ignore local Server = require 'utils.server' -local mapkeeper = '[color=blue]Mapkeeper:[/color]' commands.add_command( 'scenario', diff --git a/maps/biter_battles_v2/difficulty_vote.lua b/maps/biter_battles_v2/difficulty_vote.lua index 443bc7435..bc2f03bc0 100644 --- a/maps/biter_battles_v2/difficulty_vote.lua +++ b/maps/biter_battles_v2/difficulty_vote.lua @@ -1,7 +1,8 @@ local Event = require 'utils.event' local Server = require 'utils.server' -local difficulties = { +local difficulties = +{ [1] = { name = 'Peaceful', str = '25%', value = 0.25, color = { r = 0.00, g = 0.45, b = 0.00 }, print_color = { r = 0.00, g = 0.9, b = 0.00 } }, [2] = { name = 'Piece of cake', str = '50%', value = 0.5, color = { r = 0.00, g = 0.35, b = 0.00 }, print_color = { r = 0.00, g = 0.7, b = 0.00 } }, [3] = { name = 'Easy', str = '75%', value = 0.75, color = { r = 0.00, g = 0.25, b = 0.00 }, print_color = { r = 0.00, g = 0.5, b = 0.00 } }, @@ -68,11 +69,12 @@ local function poll_difficulty(player) frame.add({ type = 'label', caption = '- - - - - - - - - - - - - - - - - - - -' }) local b = frame.add({ type = 'button', name = 'close', caption = 'Close (' .. math.floor((timeout - tick) / 3600) .. ' minutes left)' }) - b.style.font_color = { r = 0.66, g = 0.0, b = 0.66 } - b.style.font = 'default-semibold' - b.style.horizontal_align = 'center' - b.style.minimal_width = 96 - b.style = 'dialog_button' + local b_style = b.style + b_style.font_color = { r = 0.66, g = 0.0, b = 0.66 } + b_style.font = 'default-semibold' + b_style.horizontal_align = 'center' + b_style.minimal_width = 96 + b_style = 'dialog_button' end local function set_difficulty() diff --git a/maps/biter_battles_v2/feeding.lua b/maps/biter_battles_v2/feeding.lua index a8c741c89..a396244ea 100644 --- a/maps/biter_battles_v2/feeding.lua +++ b/maps/biter_battles_v2/feeding.lua @@ -6,14 +6,13 @@ local Server = require 'utils.server' local tables = require 'maps.biter_battles_v2.tables' local food_values = tables.food_values -local force_translation = tables.force_translation local enemy_team_of = tables.enemy_team_of local minimum_modifier = 125 local maximum_modifier = 250 local player_amount_for_maximum_threat_gain = 20 -function get_instant_threat_player_count_modifier() +local function get_instant_threat_player_count_modifier() local current_player_count = #game.forces.north.connected_players + #game.forces.south.connected_players local gain_per_player = (maximum_modifier - minimum_modifier) / player_amount_for_maximum_threat_gain local m = minimum_modifier + gain_per_player * current_player_count @@ -58,7 +57,8 @@ local function print_feeding_msg(player, food, flask_amount) if storage.tm_custom_name['south'] then s = storage.tm_custom_name['south'] end - local team_strings = { + local team_strings = + { ['north'] = table.concat({ '[color=120, 120, 255]', n, "'s[/color]" }), ['south'] = table.concat({ '[color=255, 65, 65]', s, "'s[/color]" }) } @@ -93,21 +93,9 @@ local function add_stats(player, food, flask_amount, biter_force_name, evo_befor table.concat({ '[color=', player.color.r * 0.6 + 0.35, ',', player.color.g * 0.6 + 0.35, ',', player.color.b * 0.6 + 0.35, ']', player.name, '[/color]' }) local formatted_food = table.concat({ '[color=', food_values[food].color, '][/color]', '[img=item/', food, ']' }) local formatted_amount = table.concat({ '[font=heading-1][color=255,255,255]' .. flask_amount .. '[/color][/font]' }) - local n = bb_config.north_side_team_name - local s = bb_config.south_side_team_name - if storage.tm_custom_name['north'] then - n = storage.tm_custom_name['north'] - end - if storage.tm_custom_name['south'] then - s = storage.tm_custom_name['south'] - end - local team_strings = { - ['north'] = table.concat({ '[color=120, 120, 255]', n, '[/color]' }), - ['south'] = table.concat({ '[color=255, 65, 65]', s, '[/color]' }) - } + if flask_amount > 1 then local tick = game.ticks_played - local feed_time = math.round(tick, 0) local feed_time_mins = math.round(tick / (60 * 60), 0) local minute_unit = '' if feed_time_mins <= 1 then @@ -134,7 +122,7 @@ local function add_stats(player, food, flask_amount, biter_force_name, evo_befor if storage.science_logs_total_north == nil then storage.science_logs_total_north = { 0 } storage.science_logs_total_south = { 0 } - for a = 1, 7 do + for _ = 1, 7 do table.insert(storage.science_logs_total_north, 0) table.insert(storage.science_logs_total_south, 0) end @@ -180,7 +168,7 @@ function set_evo_and_threat(flask_amount, food, biter_force_name) local food_value = food_values[food].value * storage.difficulty_vote_value - for a = 1, flask_amount, 1 do + for _ = 1, flask_amount, 1 do ---SET EVOLUTION local e2 = (game.forces[biter_force_name].evolution_factor * 100) + 1 local diminishing_modifier = (1 / (10 ^ (e2 * 0.017))) / (e2 * 0.5) @@ -194,7 +182,7 @@ function set_evo_and_threat(flask_amount, food, biter_force_name) end --ADD INSTANT THREAT - local diminishing_modifier = 1 / (0.2 + (e2 * 0.018)) + diminishing_modifier = 1 / (0.2 + (e2 * 0.018)) storage.bb_threat[biter_force_name] = storage.bb_threat[biter_force_name] + (food_value * instant_threat_player_count_modifier * diminishing_modifier) storage.bb_threat[biter_force_name] = math_round(storage.bb_threat[biter_force_name], decimals) end diff --git a/maps/biter_battles_v2/functions.lua b/maps/biter_battles_v2/functions.lua index 4f83c9933..75a285b6e 100644 --- a/maps/biter_battles_v2/functions.lua +++ b/maps/biter_battles_v2/functions.lua @@ -7,7 +7,8 @@ local table_insert = table.insert local table_remove = table.remove local string_find = string.find -local balance_functions = { +local balance_functions = +{ ['flamethrower'] = function (force_name) storage.combat_balance[force_name].flamethrower_damage = -0.65 game.forces[force_name].set_turret_attack_modifier('flamethrower-turret', storage.combat_balance[force_name].flamethrower_damage) @@ -41,7 +42,8 @@ local balance_functions = { end } -local no_turret_blacklist = { +local no_turret_blacklist = +{ ['ammo-turret'] = true, ['artillery-turret'] = true, ['electric-turret'] = true, @@ -49,14 +51,16 @@ local no_turret_blacklist = { } local landfill_biters_vectors = { { 0, 0 }, { 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 } } -local landfill_biters = { +local landfill_biters = +{ ['big-biter'] = true, ['big-spitter'] = true, ['behemoth-biter'] = true, ['behemoth-spitter'] = true } -local target_entity_types = { +local target_entity_types = +{ ['assembling-machine'] = true, ['boiler'] = true, ['furnace'] = true, @@ -143,7 +147,7 @@ function Public.biters_landfill(entity) if tile.collides_with('resource') then surface.set_tiles({ { name = 'landfill', position = tile.position } }) local particle_pos = { tile.position.x + 0.5, tile.position.y + 0.5 } - for i = 1, 50, 1 do + for _ = 1, 50, 1 do surface.create_particle( { name = 'stone-particle', @@ -286,7 +290,7 @@ function Public.share_chat(event) end if player.force.name == 'spectator' then --Skip messages that would spoil coordinates from spectators - local a, b = string_find(event.message, 'gps=', 1, false) + local a, _ = string_find(event.message, 'gps=', 1, false) if a then return end @@ -348,7 +352,7 @@ function Public.show_intro(player) player.gui.center['map_intro_frame'].destroy() end local frame = player.gui.center.add { type = 'frame', name = 'map_intro_frame', direction = 'vertical' } - local frame = frame.add { type = 'frame' } + frame = frame.add { type = 'frame' } local l = frame.add { type = 'label', caption = { 'biter_battles.map_info' }, name = 'biter_battles_map_intro' } l.style.single_line = false l.style.font = 'heading-2' diff --git a/maps/biter_battles_v2/game_over.lua b/maps/biter_battles_v2/game_over.lua index 87e8abd7a..4be07770d 100644 --- a/maps/biter_battles_v2/game_over.lua +++ b/maps/biter_battles_v2/game_over.lua @@ -16,7 +16,8 @@ local role_to_mention = Discord.role_mentions.biter_battles local Public = {} -local gui_values = { +local gui_values = +{ ['north'] = { c1 = 'Team North', color1 = { r = 0.55, g = 0.55, b = 0.99 } }, ['south'] = { c1 = 'Team South', color1 = { r = 0.99, g = 0.33, b = 0.33 } } } @@ -147,24 +148,24 @@ local function show_mvps(player) local t = frame.add({ type = 'table', column_count = 2 }) local mvp = get_mvps('north') if mvp then - local l = t.add({ type = 'label', caption = 'Defender >> ' }) + l = t.add({ type = 'label', caption = 'Defender >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score }) + l = t.add({ type = 'label', caption = mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - local l = t.add({ type = 'label', caption = 'Builder >> ' }) + l = t.add({ type = 'label', caption = 'Builder >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things' }) + l = t.add({ type = 'label', caption = mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things' }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - local l = t.add({ type = 'label', caption = 'Deaths >> ' }) + l = t.add({ type = 'label', caption = 'Deaths >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times' }) + l = t.add({ type = 'label', caption = mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times' }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } @@ -185,31 +186,31 @@ local function show_mvps(player) end end - local l = frame.add({ type = 'label', caption = 'MVPs - South:' }) + l = frame.add({ type = 'label', caption = 'MVPs - South:' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.99, g = 0.33, b = 0.33 } - local t = frame.add({ type = 'table', column_count = 2 }) - local mvp = get_mvps('south') + t = frame.add({ type = 'table', column_count = 2 }) + mvp = get_mvps('south') if mvp then - local l = t.add({ type = 'label', caption = 'Defender >> ' }) + l = t.add({ type = 'label', caption = 'Defender >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score }) + l = t.add({ type = 'label', caption = mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - local l = t.add({ type = 'label', caption = 'Builder >> ' }) + l = t.add({ type = 'label', caption = 'Builder >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things' }) + l = t.add({ type = 'label', caption = mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things' }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - local l = t.add({ type = 'label', caption = 'Deaths >> ' }) + l = t.add({ type = 'label', caption = 'Deaths >> ' }) l.style.font = 'default-listbox' l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times' }) + l = t.add({ type = 'label', caption = mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times' }) l.style.font = 'default-bold' l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } @@ -231,7 +232,8 @@ local function show_mvps(player) end end -local enemy_team_of = { +local enemy_team_of = +{ ['north'] = 'south', ['south'] = 'north' } @@ -331,7 +333,6 @@ local function biter_killed_the_silo(event) if cause and cause.valid and cause.type == 'unit' then return true end - return end function Public.silo_death(event) diff --git a/maps/biter_battles_v2/gui.lua b/maps/biter_battles_v2/gui.lua index 9d1f232ba..f8f5a9877 100644 --- a/maps/biter_battles_v2/gui.lua +++ b/maps/biter_battles_v2/gui.lua @@ -3,7 +3,7 @@ local Public = {} local Server = require 'utils.server' local bb_config = require 'maps.biter_battles_v2.config' -local event = require 'utils.event' +local Event = require 'utils.event' local Functions = require 'maps.biter_battles_v2.functions' local feed_the_biters = require 'maps.biter_battles_v2.feeding' local Tables = require 'maps.biter_battles_v2.tables' @@ -15,8 +15,10 @@ local math_random = math.random require 'maps.biter_battles_v2.spec_spy' -local gui_values = { - ['north'] = { +local gui_values = +{ + ['north'] = + { force = 'north', biter_force = 'north_biters', c1 = bb_config.north_side_team_name, @@ -29,7 +31,8 @@ local gui_values = { tech_spy = 'spy-north-tech', prod_spy = 'spy-north-prod' }, - ['south'] = { + ['south'] = + { force = 'south', biter_force = 'south_biters', c1 = bb_config.south_side_team_name, @@ -66,7 +69,7 @@ local function create_first_join_gui(player) local b = frame.add { type = 'label', caption = 'Defend your Rocket Silo!' } b.style.font = 'heading-1' b.style.font_color = { r = 0.98, g = 0.66, b = 0.22 } - local b = frame.add { type = 'label', caption = "Feed the enemy team's biters to gain advantage!" } + b = frame.add { type = 'label', caption = "Feed the enemy team's biters to gain advantage!" } b.style.font = 'heading-2' b.style.font_color = { r = 0.98, g = 0.66, b = 0.22 } @@ -83,11 +86,11 @@ local function create_first_join_gui(player) l.style.font_color = gui_value.color1 l.style.single_line = false l.style.maximal_width = 290 - local l = t.add { type = 'label', caption = ' - ' } - local l = t.add { type = 'label', caption = #game.forces[gui_value.force].connected_players .. ' Players ' } + l = t.add { type = 'label', caption = ' - ' } + l = t.add { type = 'label', caption = #game.forces[gui_value.force].connected_players .. ' Players ' } l.style.font_color = { r = 0.22, g = 0.88, b = 0.22 } - local c = gui_value.c2 + c = gui_value.c2 local font_color = gui_value.color1 if storage.game_lobby_active then font_color = { r = 0.7, g = 0.7, b = 0.7 } @@ -95,13 +98,13 @@ local function create_first_join_gui(player) c = c .. math.ceil((storage.game_lobby_timeout - game.tick) / 60) c = c .. ')' end - local t = frame.add { type = 'table', column_count = 4 } + t = frame.add { type = 'table', column_count = 4 } for _, p in pairs(game.forces[gui_value.force].connected_players) do - local l = t.add({ type = 'label', caption = p.name }) + l = t.add({ type = 'label', caption = p.name }) l.style.font_color = { r = p.color.r * 0.6 + 0.4, g = p.color.g * 0.6 + 0.4, b = p.color.b * 0.6 + 0.4, a = 1 } l.style.font = 'heading-2' end - local b = frame.add { type = 'sprite-button', name = gui_value.n1, caption = c } + b = frame.add { type = 'sprite-button', name = gui_value.n1, caption = c } b.style.font = 'default-large-bold' b.style.font_color = font_color b.style.minimal_width = 350 @@ -111,7 +114,8 @@ end local function add_tech_button(elem, gui_value) local tech_button = - elem.add { + elem.add + { type = 'sprite-button', name = gui_value.tech_spy, sprite = 'item/space-science-pack' @@ -121,17 +125,6 @@ local function add_tech_button(elem, gui_value) tech_button.style.left_margin = 3 end -local function add_prod_button(elem, gui_value) - local prod_button = - elem.add { - type = 'sprite-button', - name = gui_value.prod_spy, - sprite = 'item/assembling-machine-3' - } - prod_button.style.height = 25 - prod_button.style.width = 25 -end - function Public.create_main_gui(player) local is_spec = player.force.name == 'spectator' if player.gui.left['bb_main_gui'] then @@ -167,7 +160,7 @@ function Public.create_main_gui(player) end local first_team = true - for k, gui_value in pairs(gui_values) do + for _, gui_value in pairs(gui_values) do -- Line separator if not first_team then frame.add { type = 'line', caption = 'this line', direction = 'horizontal' } @@ -190,12 +183,12 @@ function Public.create_main_gui(player) l.style.maximal_width = 102 -- Number of players - local l = t.add { type = 'label', caption = ' - ' } - local c = #game.forces[gui_value.force].connected_players .. ' Player' + l = t.add { type = 'label', caption = ' - ' } + c = #game.forces[gui_value.force].connected_players .. ' Player' if #game.forces[gui_value.force].connected_players ~= 1 then c = c .. 's' end - local l = t.add { type = 'label', caption = c } + l = t.add { type = 'label', caption = c } l.style.font = 'default' l.style.font_color = { r = 0.22, g = 0.88, b = 0.22 } @@ -207,18 +200,18 @@ function Public.create_main_gui(player) -- Player list if storage.bb_view_players[player.name] == true then - local t = frame.add { type = 'table', column_count = 4 } + t = frame.add { type = 'table', column_count = 4 } for _, p in pairs(game.forces[gui_value.force].connected_players) do - local l = t.add { type = 'label', caption = p.name } + l = t.add { type = 'label', caption = p.name } l.style.font_color = { r = p.color.r * 0.6 + 0.4, g = p.color.g * 0.6 + 0.4, b = p.color.b * 0.6 + 0.4, a = 1 } end end -- Statistics - local t = frame.add { type = 'table', name = 'stats_' .. gui_value.force, column_count = 5 } + t = frame.add { type = 'table', name = 'stats_' .. gui_value.force, column_count = 5 } -- Evolution - local l = t.add { type = 'label', caption = 'Evo:' } + l = t.add { type = 'label', caption = 'Evo:' } --l.style.minimal_width = 25 local biter_force = game.forces[gui_value.biter_force] local tooltip = @@ -228,17 +221,17 @@ function Public.create_main_gui(player) l.tooltip = tooltip local evo = math.floor(1000 * storage.bb_evolution[gui_value.biter_force]) * 0.1 - local l = t.add { type = 'label', caption = evo .. '%' } + l = t.add { type = 'label', caption = evo .. '%' } l.style.minimal_width = 40 l.style.font_color = gui_value.color2 l.style.font = 'default-bold' l.tooltip = tooltip -- Threat - local l = t.add { type = 'label', caption = 'Threat: ' } + l = t.add { type = 'label', caption = 'Threat: ' } l.style.minimal_width = 25 l.tooltip = gui_value.t2 - local l = t.add { type = 'label', name = 'threat_' .. gui_value.force, caption = math.floor(storage.bb_threat[gui_value.biter_force]) } + l = t.add { type = 'label', name = 'threat_' .. gui_value.force, caption = math.floor(storage.bb_threat[gui_value.biter_force]) } l.style.font_color = gui_value.color2 l.style.font = 'default-bold' l.style.width = 50 @@ -250,16 +243,16 @@ function Public.create_main_gui(player) -- Spectate / Rejoin team if is_spec then - local b = t.add { type = 'sprite-button', name = 'bb_leave_spectate', caption = 'Join Team' } + t.add { type = 'sprite-button', name = 'bb_leave_spectate', caption = 'Join Team' } else - local b = t.add { type = 'sprite-button', name = 'bb_spectate', caption = 'Spectate' } + t.add { type = 'sprite-button', name = 'bb_spectate', caption = 'Spectate' } end -- Playerlist button if storage.bb_view_players[player.name] == true then - local b = t.add { type = 'sprite-button', name = 'bb_hide_players', caption = 'Playerlist' } + t.add { type = 'sprite-button', name = 'bb_hide_players', caption = 'Playerlist' } else - local b = t.add { type = 'sprite-button', name = 'bb_view_players', caption = 'Playerlist' } + t.add { type = 'sprite-button', name = 'bb_view_players', caption = 'Playerlist' } end local b_width = is_spec and 97 or 86 @@ -414,7 +407,8 @@ function spectate(player, forced_join) end local function join_gui_click(name, player) - local team = { + local team = + { ['join_north_button'] = 'north', ['join_south_button'] = 'south' } @@ -541,7 +535,7 @@ local function on_player_joined_game(event) Public.create_main_gui(player) end -event.add(defines.events.on_gui_click, on_gui_click) -event.add(defines.events.on_player_joined_game, on_player_joined_game) +Event.add(defines.events.on_gui_click, on_gui_click) +Event.add(defines.events.on_player_joined_game, on_player_joined_game) return Public diff --git a/maps/biter_battles_v2/init.lua b/maps/biter_battles_v2/init.lua index d8556a953..cb53856d2 100644 --- a/maps/biter_battles_v2/init.lua +++ b/maps/biter_battles_v2/init.lua @@ -28,7 +28,8 @@ function Public.initial_setup() p.set_allows_action(defines.input_action[action_name], false) end - local defs = { + local defs = + { defines.input_action.activate_copy, defines.input_action.activate_cut, defines.input_action.activate_paste, @@ -62,9 +63,10 @@ function Public.initial_setup() storage.gui_refresh_delay = 0 storage.game_lobby_active = true storage.bb_debug = false - storage.bb_settings = { + storage.bb_settings = + { --TEAM SETTINGS-- - ['team_balancing'] = true, --Should players only be able to join a team that has less or equal members than the opposing team? + ['team_balancing'] = true, --Should players only be able to join a team that has less or equal members than the opposing team? ['only_admins_vote'] = false --Are only admins able to vote on the global difficulty? } @@ -79,17 +81,20 @@ function Public.initial_setup() end --Playground Surface - local map_gen_settings = { + map_gen_settings = + { ['water'] = 0, ['starting_area'] = 1, ['cliff_settings'] = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 }, ['default_enable_all_autoplace_controls'] = false, - ['autoplace_settings'] = { + ['autoplace_settings'] = + { ['entity'] = { treat_missing_as_default = false }, ['tile'] = { treat_missing_as_default = false }, ['decorative'] = { treat_missing_as_default = false } }, - autoplace_controls = { + autoplace_controls = + { ['coal'] = { frequency = 0, size = 0, richness = 0 }, ['stone'] = { frequency = 0, size = 0, richness = 0 }, ['copper-ore'] = { frequency = 0, size = 0, richness = 0 }, @@ -100,7 +105,7 @@ function Public.initial_setup() ['enemy-base'] = { frequency = 0, size = 0, richness = 0 } } } - local surface = game.create_surface('biter_battles', map_gen_settings) + game.create_surface('biter_battles', map_gen_settings) end --Terrain Source Surface @@ -111,7 +116,8 @@ function Public.source_surface() map_gen_settings.starting_area = 2.5 map_gen_settings.terrain_segmentation = math.random(30, 40) * 0.1 map_gen_settings.cliff_settings = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 } - map_gen_settings.autoplace_controls = { + map_gen_settings.autoplace_controls = + { ['coal'] = { frequency = 2.5, size = 0.65, richness = 0.5 }, ['stone'] = { frequency = 2.5, size = 0.65, richness = 0.5 }, ['copper-ore'] = { frequency = 3.5, size = 0.65, richness = 0.5 }, @@ -217,28 +223,28 @@ function Public.forces() f.set_friend('south_biters', true) f.share_chart = true - local f = game.forces['south'] + f = game.forces['south'] f.set_spawn_position({ 0, 44 }, surface) f.set_cease_fire('player', true) f.set_friend('spectator', true) f.set_friend('north_biters', true) f.share_chart = true - local f = game.forces['north_biters'] + f = game.forces['north_biters'] f.set_friend('south_biters', true) f.set_friend('south', true) f.set_friend('player', true) f.set_friend('spectator', true) f.share_chart = false - local f = game.forces['south_biters'] + f = game.forces['south_biters'] f.set_friend('north_biters', true) f.set_friend('north', true) f.set_friend('player', true) f.set_friend('spectator', true) f.share_chart = false - local f = game.forces['spectator'] + f = game.forces['spectator'] f.set_spawn_position({ 0, 0 }, surface) f.technologies['toolbelt'].researched = true f.set_cease_fire('north_biters', true) @@ -248,7 +254,7 @@ function Public.forces() f.set_cease_fire('player', true) f.share_chart = true - local f = game.forces['player'] + f = game.forces['player'] f.set_spawn_position({ 0, 0 }, surface) f.set_cease_fire('spectator', true) f.set_cease_fire('north_biters', true) @@ -262,7 +268,6 @@ function Public.forces() game.forces[force.name].technologies['artillery-shell-range-1'].enabled = false game.forces[force.name].technologies['artillery-shell-speed-1'].enabled = false game.forces[force.name].technologies['atomic-bomb'].enabled = false - game.forces[force.name].research_queue_enabled = true storage.target_entities[force.index] = {} storage.spy_fish_timeout[force.name] = 0 storage.active_biters[force.name] = {} diff --git a/maps/biter_battles_v2/main.lua b/maps/biter_battles_v2/main.lua index 270a1132a..311c831e3 100644 --- a/maps/biter_battles_v2/main.lua +++ b/maps/biter_battles_v2/main.lua @@ -1,5 +1,9 @@ -- Biter Battles v2 -- by MewMew +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + local Ai = require 'maps.biter_battles_v2.ai' local Functions = require 'maps.biter_battles_v2.functions' local Game_over = require 'maps.biter_battles_v2.game_over' @@ -9,6 +13,7 @@ local Mirror_terrain = require 'maps.biter_battles_v2.mirror_terrain' require 'modules.simple_tags' local Team_manager = require 'maps.biter_battles_v2.team_manager' local Terrain = require 'maps.biter_battles_v2.terrain' +local Event = require 'utils.event' require 'maps.biter_battles_v2.sciencelogs_tab' require 'maps.biter_battles_v2.commands' @@ -72,10 +77,11 @@ local function on_entity_died(event) Game_over.silo_death(event) end -local tick_minute_functions = { +local tick_minute_functions = +{ [300 * 1] = Ai.raise_evo, [300 * 2] = Ai.destroy_inactive_biters, - [300 * 3 + 30 * 0] = Ai.pre_main_attack, -- setup for main_attack + [300 * 3 + 30 * 0] = Ai.pre_main_attack, -- setup for main_attack [300 * 3 + 30 * 1] = Ai.perform_main_attack, -- call perform_main_attack 7 times on different ticks [300 * 3 + 30 * 2] = Ai.perform_main_attack, -- some of these might do nothing (if there are no wave left) [300 * 3 + 30 * 3] = Ai.perform_main_attack, @@ -151,7 +157,6 @@ local function on_init() Init.load_spawn() end -local Event = require 'utils.event' Event.add(defines.events.on_built_entity, on_built_entity) Event.add(defines.events.on_chunk_generated, on_chunk_generated) Event.add(defines.events.on_console_chat, on_console_chat) diff --git a/maps/biter_battles_v2/mirror_terrain.lua b/maps/biter_battles_v2/mirror_terrain.lua index 001fc95f6..d040589c1 100644 --- a/maps/biter_battles_v2/mirror_terrain.lua +++ b/maps/biter_battles_v2/mirror_terrain.lua @@ -5,7 +5,8 @@ local bb_config = require 'maps.biter_battles_v2.config' local table_remove = table.remove local table_insert = table.insert -local direction_translation = { +local direction_translation = +{ [0] = 4, [1] = 5, [2] = 6, @@ -16,7 +17,8 @@ local direction_translation = { [7] = 3 } -local cliff_orientation_translation = { +local cliff_orientation_translation = +{ ['east-to-none'] = 'west-to-none', ['east-to-north'] = 'west-to-south', ['east-to-south'] = 'west-to-north', @@ -39,7 +41,8 @@ local cliff_orientation_translation = { ['none-to-west'] = 'none-to-east' } -local entity_copy_functions = { +local entity_copy_functions = +{ ['tree'] = function (surface, entity, target_position) if not surface.can_place_entity({ name = entity.name, position = target_position }) then return @@ -60,7 +63,6 @@ local entity_copy_functions = { return end surface.create_entity(mirror_entity) - return end, ['resource'] = function (surface, entity, target_position) surface.create_entity({ name = entity.name, position = target_position, amount = entity.amount }) @@ -106,16 +108,22 @@ local entity_copy_functions = { if inventory.is_empty() then return end - for name, count in pairs(inventory.get_contents()) do - e.insert({ name = name, count = count }) + for _, data in pairs(inventory.get_contents()) do + e.insert({ name = data.name, count = data.count }) end end, ['wall'] = function (surface, entity, target_position, force_name) local e = entity.clone({ position = target_position, surface = surface, force = force_name }) + if not e then + return + end e.active = true end, ['container'] = function (surface, entity, target_position, force_name) local e = entity.clone({ position = target_position, surface = surface, force = force_name }) + if not e then + return + end e.active = true end, ['fish'] = function (surface, entity, target_position) @@ -335,7 +343,8 @@ local function south_work() clear_source_surface(terrain_gen) end -local works = { +local works = +{ [1] = north_work, [2] = south_work } diff --git a/maps/biter_battles_v2/sciencelogs_tab.lua b/maps/biter_battles_v2/sciencelogs_tab.lua index c3624735b..9d707851f 100644 --- a/maps/biter_battles_v2/sciencelogs_tab.lua +++ b/maps/biter_battles_v2/sciencelogs_tab.lua @@ -3,7 +3,8 @@ local Tabs = require 'utils.gui' local tables = require 'maps.biter_battles_v2.tables' -local event = require 'utils.event' +local Event = require 'utils.event' +local Gui = require 'utils.gui' local bb_config = require 'maps.biter_battles_v2.config' local food_values = tables.food_values local food_long_and_short = tables.food_long_and_short @@ -38,7 +39,7 @@ local function add_science_logs(player, element) if storage.science_logs_total_north == nil then storage.science_logs_total_north = { 0 } storage.science_logs_total_south = { 0 } - for i = 1, 7 do + for _ = 1, 7 do table.insert(storage.science_logs_total_north, 0) table.insert(storage.science_logs_total_south, 0) end @@ -47,7 +48,8 @@ local function add_science_logs(player, element) local t_summary = science_scrollpanel.add { type = 'table', name = 'science_logs_summary_header_table', column_count = 8 } local width_summary_columns = tonumber(94) local width_summary_first_column = tonumber(110) - local column_widths = { + local column_widths = + { width_summary_first_column, width_summary_columns, width_summary_columns, @@ -57,7 +59,8 @@ local function add_science_logs(player, element) width_summary_columns, width_summary_columns } - local headersSummary = { + local headersSummary = + { [1] = '', [2] = storage.science_logs_category_potion[1], [3] = storage.science_logs_category_potion[2], @@ -78,25 +81,25 @@ local function add_science_logs(player, element) label.style.minimal_width = width_summary_first_column label.style.maximal_width = width_summary_first_column for i = 1, 7 do - local label = summary_panel_table.add { type = 'label', name = 'science_logs_total_north_' .. i, caption = storage.science_logs_total_north[i] } + label = summary_panel_table.add { type = 'label', name = 'science_logs_total_north_' .. i, caption = storage.science_logs_total_north[i] } label.style.minimal_width = width_summary_columns label.style.maximal_width = width_summary_columns end science_scrollpanel.add({ type = 'line' }) summary_panel_table2 = science_scrollpanel.add { type = 'table', column_count = 8 } - local label = summary_panel_table2.add { type = 'label', name = 'science_logs_total_south_header', caption = 'Total sent by south' } + label = summary_panel_table2.add { type = 'label', name = 'science_logs_total_south_header', caption = 'Total sent by south' } label.style.minimal_width = width_summary_first_column label.style.maximal_width = width_summary_first_column for i = 1, 7 do - local label = summary_panel_table2.add { type = 'label', name = 'science_logs_total_south' .. i, caption = storage.science_logs_total_south[i] } + label = summary_panel_table2.add { type = 'label', name = 'science_logs_total_south' .. i, caption = storage.science_logs_total_south[i] } label.style.minimal_width = width_summary_columns label.style.maximal_width = width_summary_columns end science_scrollpanel.add({ type = 'line' }) summary_panel_table3 = science_scrollpanel.add { type = 'table', column_count = 8 } - local label = summary_panel_table3.add { type = 'label', name = 'science_logs_total_passive_feed_header', caption = 'Total passive feed' } + label = summary_panel_table3.add { type = 'label', name = 'science_logs_total_passive_feed_header', caption = 'Total passive feed' } label.style.minimal_width = width_summary_first_column label.style.maximal_width = width_summary_first_column for i = 1, 7 do @@ -104,7 +107,7 @@ local function add_science_logs(player, element) if storage.total_passive_feed_redpotion ~= nil then text_passive_feed = math.round(storage.total_passive_feed_redpotion * food_value_table_version[1] / food_value_table_version[i], 1) end - local label = summary_panel_table3.add { type = 'label', name = 'science_logs_passive_feed' .. i, caption = text_passive_feed } + label = summary_panel_table3.add { type = 'label', name = 'science_logs_passive_feed' .. i, caption = text_passive_feed } label.style.minimal_width = width_summary_columns label.style.maximal_width = width_summary_columns end @@ -130,15 +133,16 @@ local function add_science_logs(player, element) local dropdown_evofilter = t_filter.add { name = 'dropdown-evofilter', type = 'drop-down', items = evofilter_list, selected_index = storage.dropdown_users_choice_evo_filter[player.name] } local t = science_scrollpanel.add { type = 'table', name = 'science_logs_header_table', column_count = 4 } - local column_widths = { tonumber(75), tonumber(310), tonumber(165), tonumber(230) } - local headers = { + column_widths = { tonumber(75), tonumber(310), tonumber(165), tonumber(230) } + local headers = + { [1] = 'Time', [2] = 'Details', [3] = 'Evo jump', [4] = 'Threat jump' } for _, w in ipairs(column_widths) do - local label = t.add { type = 'label', caption = headers[_] } + label = t.add { type = 'label', caption = headers[_] } label.style.minimal_width = w label.style.maximal_width = w label.style.font = 'default-bold' @@ -156,7 +160,8 @@ local function add_science_logs(player, element) if storage.tm_custom_name['south'] then s = storage.tm_custom_name['south'] end - local team_strings = { + local team_strings = + { ['north'] = table.concat({ '[color=120, 120, 255]', n, '[/color]' }), ['south'] = table.concat({ '[color=255, 65, 65]', s, '[/color]' }) } @@ -182,24 +187,26 @@ local function add_science_logs(player, element) (dropdown_evofilter.selected_index == 7 and (storage.science_logs_evo_jump_difference[i] >= 2)) or (dropdown_evofilter.selected_index == 8 and (storage.science_logs_evo_jump_difference[i] >= 1)) then - science_panel_table = science_scrollpanel.add { type = 'table', column_count = 4 } - local label = science_panel_table.add { type = 'label', name = 'science_logs_date' .. i, caption = storage.science_logs_date[i] } + local science_panel_table = science_scrollpanel.add { type = 'table', column_count = 4 } + label = science_panel_table.add { type = 'label', name = 'science_logs_date' .. i, caption = storage.science_logs_date[i] } label.style.minimal_width = column_widths[1] label.style.maximal_width = column_widths[1] label.style.horizontal_align = 'center' - local label = science_panel_table.add { type = 'label', name = 'science_logs_text' .. i, caption = storage.science_logs_text[i] .. custom_force_name } + label = science_panel_table.add { type = 'label', name = 'science_logs_text' .. i, caption = storage.science_logs_text[i] .. custom_force_name } label.style.minimal_width = column_widths[2] label.style.maximal_width = column_widths[2] - local label = - science_panel_table.add { + label = + science_panel_table.add + { type = 'label', name = 'science_logs_evo_jump' .. i, caption = storage.science_logs_evo_jump[i] .. ' [color=200,200,200](+' .. storage.science_logs_evo_jump_difference[i] .. ')[/color]' } label.style.minimal_width = column_widths[3] label.style.maximal_width = column_widths[3] - local label = - science_panel_table.add { + label = + science_panel_table.add + { type = 'label', name = 'science_logs_threat' .. i, caption = storage.science_logs_threat[i] .. ' [color=200,200,200](+' .. storage.science_logs_threat_jump_difference[i] .. ')[/color]' @@ -249,7 +256,7 @@ local function on_gui_selection_state_changed(event) end end -event.add(defines.events.on_gui_selection_state_changed, on_gui_selection_state_changed) +Event.add(defines.events.on_gui_selection_state_changed, on_gui_selection_state_changed) Tabs.add_tab_to_gui({ name = module_name, caption = 'MutagenLog', id = build_config_gui_token, admin = false }) diff --git a/maps/biter_battles_v2/spec_spy.lua b/maps/biter_battles_v2/spec_spy.lua index e10eab785..c3ee3d17e 100755 --- a/maps/biter_battles_v2/spec_spy.lua +++ b/maps/biter_battles_v2/spec_spy.lua @@ -1,13 +1,14 @@ local Global = require 'utils.global' -local this = { +local this = +{ -- map player <> force initialForce = {} } Global.register( this, - function(t) + function (t) this = t end ) @@ -50,7 +51,8 @@ local function spy_prod_handler(event) if not event.element.valid then return end - local elementToForce = { + local elementToForce = + { ['spy-north-prod'] = 'north', ['spy-south-prod'] = 'south' } @@ -66,7 +68,8 @@ local function spy_tech_handler(event) if not event.element.valid then return end - local elementToForce = { + local elementToForce = + { ['spy-north-tech'] = 'north', ['spy-south-tech'] = 'south' } diff --git a/maps/biter_battles_v2/tables.lua b/maps/biter_battles_v2/tables.lua index 358878189..b0975ec4c 100644 --- a/maps/biter_battles_v2/tables.lua +++ b/maps/biter_battles_v2/tables.lua @@ -1,13 +1,14 @@ local Public = {} -Public.food_values = { - ['automation-science-pack'] = {value = 0.001, name = 'automation science', color = '255, 50, 50'}, - ['logistic-science-pack'] = {value = 0.00263, name = 'logistic science', color = '50, 255, 50'}, - ['military-science-pack'] = {value = 0.00788, name = 'military science', color = '105, 105, 105'}, - ['chemical-science-pack'] = {value = 0.02121, name = 'chemical science', color = '100, 200, 255'}, - ['production-science-pack'] = {value = 0.1008, name = 'production science', color = '150, 25, 255'}, - ['utility-science-pack'] = {value = 0.1099, name = 'utility science', color = '210, 210, 60'}, - ['space-science-pack'] = {value = 0.4910, name = 'space science', color = '255, 255, 255'} +Public.food_values = +{ + ['automation-science-pack'] = { value = 0.001, name = 'automation science', color = '255, 50, 50' }, + ['logistic-science-pack'] = { value = 0.00263, name = 'logistic science', color = '50, 255, 50' }, + ['military-science-pack'] = { value = 0.00788, name = 'military science', color = '105, 105, 105' }, + ['chemical-science-pack'] = { value = 0.02121, name = 'chemical science', color = '100, 200, 255' }, + ['production-science-pack'] = { value = 0.1008, name = 'production science', color = '150, 25, 255' }, + ['utility-science-pack'] = { value = 0.1099, name = 'utility science', color = '210, 210, 60' }, + ['space-science-pack'] = { value = 0.4910, name = 'space science', color = '255, 255, 255' } } Public.gui_foods = {} @@ -16,17 +17,20 @@ for k, v in pairs(Public.food_values) do end Public.gui_foods['raw-fish'] = 'Send spy' -Public.force_translation = { +Public.force_translation = +{ ['south_biters'] = 'south', ['north_biters'] = 'north' } -Public.enemy_team_of = { +Public.enemy_team_of = +{ ['north'] = 'south', ['south'] = 'north' } -Public.wait_messages = { +Public.wait_messages = +{ 'please get comfy.', 'get comfy!!', 'go and grab a drink.', @@ -36,7 +40,8 @@ Public.wait_messages = { 'time to get a bowl of snacks :3' } -Public.food_names = { +Public.food_names = +{ ['automation-science-pack'] = true, ['logistic-science-pack'] = true, ['military-science-pack'] = true, @@ -46,27 +51,30 @@ Public.food_names = { ['space-science-pack'] = true } -Public.food_long_and_short = { - [1] = {short_name = 'automation', long_name = 'automation-science-pack'}, - [2] = {short_name = 'logistic', long_name = 'logistic-science-pack'}, - [3] = {short_name = 'military', long_name = 'military-science-pack'}, - [4] = {short_name = 'chemical', long_name = 'chemical-science-pack'}, - [5] = {short_name = 'production', long_name = 'production-science-pack'}, - [6] = {short_name = 'utility', long_name = 'utility-science-pack'}, - [7] = {short_name = 'space', long_name = 'space-science-pack'} +Public.food_long_and_short = +{ + [1] = { short_name = 'automation', long_name = 'automation-science-pack' }, + [2] = { short_name = 'logistic', long_name = 'logistic-science-pack' }, + [3] = { short_name = 'military', long_name = 'military-science-pack' }, + [4] = { short_name = 'chemical', long_name = 'chemical-science-pack' }, + [5] = { short_name = 'production', long_name = 'production-science-pack' }, + [6] = { short_name = 'utility', long_name = 'utility-science-pack' }, + [7] = { short_name = 'space', long_name = 'space-science-pack' } } -Public.food_long_to_short = { - ['automation-science-pack'] = {short_name = 'automation', indexScience = 1}, - ['logistic-science-pack'] = {short_name = 'logistic', indexScience = 2}, - ['military-science-pack'] = {short_name = 'military', indexScience = 3}, - ['chemical-science-pack'] = {short_name = 'chemical', indexScience = 4}, - ['production-science-pack'] = {short_name = 'production', indexScience = 5}, - ['utility-science-pack'] = {short_name = 'utility', indexScience = 6}, - ['space-science-pack'] = {short_name = 'space', indexScience = 7} +Public.food_long_to_short = +{ + ['automation-science-pack'] = { short_name = 'automation', indexScience = 1 }, + ['logistic-science-pack'] = { short_name = 'logistic', indexScience = 2 }, + ['military-science-pack'] = { short_name = 'military', indexScience = 3 }, + ['chemical-science-pack'] = { short_name = 'chemical', indexScience = 4 }, + ['production-science-pack'] = { short_name = 'production', indexScience = 5 }, + ['utility-science-pack'] = { short_name = 'utility', indexScience = 6 }, + ['space-science-pack'] = { short_name = 'space', indexScience = 7 } } -Public.forces_list = {'all teams', 'north', 'south'} -Public.science_list = { +Public.forces_list = { 'all teams', 'north', 'south' } +Public.science_list = +{ 'all science', 'very high tier (space, utility, production)', 'high tier (space, utility, production, chemical)', @@ -79,8 +87,9 @@ Public.science_list = { 'logistic', 'automation' } -Public.evofilter_list = {'all evo jump', 'no 0 evo jump', '10+ only', '5+ only', '4+ only', '3+ only', '2+ only', '1+ only'} -Public.food_value_table_version = { +Public.evofilter_list = { 'all evo jump', 'no 0 evo jump', '10+ only', '5+ only', '4+ only', '3+ only', '2+ only', '1+ only' } +Public.food_value_table_version = +{ Public.food_values['automation-science-pack'].value, Public.food_values['logistic-science-pack'].value, Public.food_values['military-science-pack'].value, diff --git a/maps/biter_battles_v2/team_manager.lua b/maps/biter_battles_v2/team_manager.lua index c49df026b..0c896729d 100644 --- a/maps/biter_battles_v2/team_manager.lua +++ b/maps/biter_battles_v2/team_manager.lua @@ -2,10 +2,11 @@ local Public = {} local Server = require 'utils.server' -local forces = { - { name = 'north', color = { r = 0, g = 0, b = 200 } }, +local forces = +{ + { name = 'north', color = { r = 0, g = 0, b = 200 } }, { name = 'spectator', color = { r = 111, g = 111, b = 111 } }, - { name = 'south', color = { r = 200, g = 0, b = 0 } } + { name = 'south', color = { r = 200, g = 0, b = 0 } } } local function get_player_array(force_name) @@ -26,7 +27,8 @@ local function freeze_players() storage.team_manager_default_permissions[action_name] = p.allows_action(defines.input_action[action_name]) p.set_allows_action(defines.input_action[action_name], false) end - local defs = { + local defs = + { defines.input_action.write_to_console, defines.input_action.gui_click, defines.input_action.gui_selection_state_changed, @@ -55,7 +57,8 @@ local function leave_corpse(player) return end - local inventories = { + local inventories = + { player.get_inventory(defines.inventory.character_main), player.get_inventory(defines.inventory.character_guns), player.get_inventory(defines.inventory.character_ammo), @@ -117,7 +120,7 @@ function Public.draw_top_toggle_button(player) if player.gui.top['team_manager_toggle_button'] then player.gui.top['team_manager_toggle_button'].destroy() end - local button = player.gui.top.add({ type = 'sprite-button', name = 'team_manager_toggle_button', caption = 'Team Manager', tooltip = tooltip }) + local button = player.gui.top.add({ type = 'sprite-button', name = 'team_manager_toggle_button', caption = 'Team Manager' }) button.style.font = 'heading-2' button.style.font_color = { r = 0.88, g = 0.55, b = 0.11 } button.style.minimal_height = 38 @@ -147,11 +150,11 @@ local function draw_manager_gui(player) l.style.font = 'heading-1' i2 = i2 + 1 else - local tt = t.add({ type = 'label', caption = ' ' }) + t.add({ type = 'label', caption = ' ' }) end end - local i2 = 1 + i2 = 1 for i = 1, #forces * 2 - 1, 1 do if i % 2 == 1 then local list_box = t.add({ type = 'list-box', name = 'team_manager_list_box_' .. i2, items = get_player_array(forces[i2].name) }) @@ -165,7 +168,7 @@ local function draw_manager_gui(player) b.style.font = 'heading-1' b.style.maximal_height = 38 b.style.maximal_width = 38 - local b = tt.add({ type = 'sprite-button', name = i2, caption = '←' }) + b = tt.add({ type = 'sprite-button', name = i2, caption = '←' }) b.style.font = 'heading-1' b.style.maximal_height = 38 b.style.maximal_width = 38 @@ -174,7 +177,7 @@ local function draw_manager_gui(player) frame.add({ type = 'label', caption = '' }) - local t = frame.add({ type = 'table', name = 'team_manager_bottom_buttons', column_count = 4 }) + t = frame.add({ type = 'table', name = 'team_manager_bottom_buttons', column_count = 4 }) local button = t.add( { @@ -285,7 +288,7 @@ local function custom_team_name_gui(player, force_name) text = storage.tm_custom_name[force_name] end - local textfield = frame.add({ type = 'textfield', name = force_name, text = text }) + frame.add({ type = 'textfield', name = force_name, text = text }) local t = frame.add({ type = 'table', column_count = 2 }) local button = t.add( @@ -298,7 +301,7 @@ local function custom_team_name_gui(player, force_name) ) button.style.font = 'heading-2' - local button = + button = t.add( { type = 'button', @@ -395,7 +398,7 @@ local function team_manager_gui_click(event) if not element.parent then return end - local element = element.parent + element = element.parent if element.name ~= 'team_manager_root_table' then return end diff --git a/maps/biter_battles_v2/terrain.lua b/maps/biter_battles_v2/terrain.lua index 25881d8a5..fb57c121a 100644 --- a/maps/biter_battles_v2/terrain.lua +++ b/maps/biter_battles_v2/terrain.lua @@ -14,7 +14,6 @@ local GetNoise = require 'utils.math.get_noise' local simplex_noise = require 'utils.math.simplex_noise'.d2 local spawn_circle_size = 39 local ores = { 'copper-ore', 'iron-ore', 'stone', 'coal' } -local rocks = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' } local chunk_tile_vectors = {} for x = 0, 31, 1 do @@ -25,13 +24,14 @@ end local size_of_chunk_tile_vectors = #chunk_tile_vectors local loading_chunk_vectors = {} -for k, v in pairs(chunk_tile_vectors) do +for _, v in pairs(chunk_tile_vectors) do if v[1] == 0 or v[1] == 31 or v[2] == 0 or v[2] == 31 then table_insert(loading_chunk_vectors, v) end end -local wrecks = { +local wrecks = +{ 'crash-site-spaceship-wreck-big-1', 'crash-site-spaceship-wreck-big-2', 'crash-site-spaceship-wreck-medium-1', @@ -43,7 +43,8 @@ local valid_wrecks = {} for _, wreck in pairs(wrecks) do valid_wrecks[wreck] = true end -local loot_blacklist = { +local loot_blacklist = +{ ['automation-science-pack'] = true, ['logistic-science-pack'] = true, ['military-science-pack'] = true, @@ -105,19 +106,20 @@ local function create_mirrored_tile_chain(surface, tile, count, straightness) local position = { x = tile.position.x, y = tile.position.y } - local modifiers = { - { x = 0, y = -1 }, + local modifiers = + { + { x = 0, y = -1 }, { x = -1, y = 0 }, - { x = 1, y = 0 }, - { x = 0, y = 1 }, + { x = 1, y = 0 }, + { x = 0, y = 1 }, { x = -1, y = 1 }, - { x = 1, y = -1 }, - { x = 1, y = 1 }, + { x = 1, y = -1 }, + { x = 1, y = 1 }, { x = -1, y = -1 } } modifiers = shuffle(modifiers) - for a = 1, count, 1 do + for _ = 1, count, 1 do local tile_placed = false if math_random(0, 100) > straightness then @@ -146,7 +148,7 @@ local function get_replacement_tile(surface, position) for i = 1, 128, 1 do local vectors = { { 0, i }, { 0, i * -1 }, { i, 0 }, { i * -1, 0 } } table.shuffle_table(vectors) - for k, v in pairs(vectors) do + for _, v in pairs(vectors) do local tile = surface.get_tile(position.x + v[1], position.y + v[2]) if not tile.collides_with('resource') then if tile.name ~= 'stone-path' then @@ -175,7 +177,6 @@ local function draw_noise_ore_patch(position, name, surface, radius, richness) return end local seed = game.surfaces['bb_source'].map_gen_settings.seed - local noise_seed_add = 25000 local richness_part = richness / radius for y = radius * -3, radius * 3, 1 do for x = radius * -3, radius * 3, 1 do @@ -369,9 +370,9 @@ local function generate_extra_worm_turrets(surface, left_top) worm.active = false -- add some scrap - for c = 1, math_random(0, 4), 1 do + for _ = 1, math_random(0, 4), 1 do local vector = scrap_vectors[math_random(1, size_of_scrap_vectors)] - local position = { worm.position.x + vector[1], worm.position.y + vector[2] } + position = { worm.position.x + vector[1], worm.position.y + vector[2] } local name = wrecks[math_random(1, size_of_wrecks)] position = surface.find_non_colliding_position(name, position, 16, 1) if position then @@ -469,7 +470,7 @@ local function mixed_ore(surface, left_top_x, left_top_y) for y = 0, 31, 1 do local pos = { x = left_top_x + x, y = left_top_y + y } if surface.can_place_entity({ name = 'iron-ore', position = pos }) then - local noise = GetNoise('bb_ore', pos, seed) + noise = GetNoise('bb_ore', pos, seed) if noise > 0.72 then local amount = math_random(800, 1000) + math_sqrt(pos.x ^ 2 + pos.y ^ 2) * 3 local i = math_floor(noise * 25 + math_abs(pos.x) * 0.05) % 4 + 1 @@ -604,15 +605,15 @@ end function Public.generate_additional_spawn_ore(surface) local r = 130 local area = { { r * -1, r * -1 }, { r, 0 } } - local ores = {} - ores['iron-ore'] = surface.count_entities_filtered({ name = 'iron-ore', area = area }) - ores['copper-ore'] = surface.count_entities_filtered({ name = 'copper-ore', area = area }) - ores['coal'] = surface.count_entities_filtered({ name = 'coal', area = area }) - ores['stone'] = surface.count_entities_filtered({ name = 'stone', area = area }) - for ore, ore_count in pairs(ores) do + local gen_ores = {} + gen_ores['iron-ore'] = surface.count_entities_filtered({ name = 'iron-ore', area = area }) + gen_ores['copper-ore'] = surface.count_entities_filtered({ name = 'copper-ore', area = area }) + gen_ores['coal'] = surface.count_entities_filtered({ name = 'coal', area = area }) + gen_ores['stone'] = surface.count_entities_filtered({ name = 'stone', area = area }) + for ore, ore_count in pairs(gen_ores) do if ore_count < 1000 or ore_count == nil then local pos = {} - for a = 1, 32, 1 do + for _ = 1, 32, 1 do pos = { x = -96 + math_random(0, 192), y = -20 - math_random(0, 96) } if surface.can_place_entity({ name = 'coal', position = pos, amount = 1 }) then break @@ -661,7 +662,7 @@ function Public.generate_silo(surface) silo.minable = false silo.active = false - for i = 1, 32, 1 do + for _ = 1, 32, 1 do create_mirrored_tile_chain(surface, { name = 'stone-path', position = silo.position }, 32, 10) end @@ -731,10 +732,10 @@ function Public.minable_wrecks(event) local loot_worth = math_floor(math_abs(entity.position.x * 0.02)) + math_random(16, 32) local blacklist = LootRaffle.get_tech_blacklist(math_abs(entity.position.x * 0.0001) + 0.10) - for k, v in pairs(blacklist) do + for k, _ in pairs(blacklist) do print(k) end - for k, v in pairs(loot_blacklist) do + for k, _ in pairs(loot_blacklist) do blacklist[k] = true end local item_stacks = LootRaffle.roll(loot_worth, math_random(1, 3), blacklist) @@ -776,7 +777,8 @@ function Public.restrict_landfill(surface, inventory, tiles) end --Construction Robot Restriction -local robot_build_restriction = { +local robot_build_restriction = +{ ['north'] = function (y) if y >= -10 then return true diff --git a/maps/biter_hatchery/main.lua b/maps/biter_hatchery/main.lua index cb48ec71d..1d50fdc94 100644 --- a/maps/biter_hatchery/main.lua +++ b/maps/biter_hatchery/main.lua @@ -1,8 +1,13 @@ --luacheck: ignore +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + require 'modules.no_turrets' require 'modules.no_acid_puddles' -local CoreGui = require 'utils.gui' require 'maps.biter_hatchery.share_chat' +local CoreGui = require 'utils.gui' +local Event = require 'utils.event' local Map_score = require 'utils.gui.map_score' local unit_raffle = require 'maps.biter_hatchery.raffle_tables' local Terrain = require 'maps.biter_hatchery.terrain' @@ -24,7 +29,8 @@ Global.register( ) local m = 2 -local health_boost_food_values = { +local health_boost_food_values = +{ ['automation-science-pack'] = 0.000001 * m, ['logistic-science-pack'] = 0.000003 * m, ['military-science-pack'] = 0.00000822 * m, @@ -203,7 +209,8 @@ local function send_unit_groups() { type = defines.command.compound, structure_type = defines.compound_command.return_last, - commands = { + commands = + { { type = defines.command.attack_area, destination = { x = force.target.position.x, y = force.target.position.y }, @@ -223,7 +230,8 @@ local function send_unit_groups() end end -local border_teleport = { +local border_teleport = +{ ['east'] = 1, ['west'] = -1 } @@ -340,7 +348,8 @@ local function on_player_joined_game(event) end --Construction Robot Restriction -local robot_build_restriction = { +local robot_build_restriction = +{ ['east'] = function (x) if x < 0 then return true @@ -407,7 +416,7 @@ local function on_player_used_spider_remote(event) vehicle.autopilot_destination = nil end -local function game_in_progress(hatchery) +local function game_in_progress() local game_tick = game.tick if game_tick % 30 ~= 0 then return @@ -440,7 +449,8 @@ local function game_in_progress(hatchery) nom() end -local no_mirror_states = { +local no_mirror_states = +{ ['init'] = true, ['reset_nauvis'] = true, ['prepare_east'] = true, @@ -471,7 +481,8 @@ local function on_chunk_generated(event) Terrain.combat_area(event) end -local gamestates = { +local gamestates = +{ ['init'] = Team.init, ['reset_nauvis'] = Terrain.reset_nauvis, ['prepare_east'] = Terrain.prepare_east, @@ -503,7 +514,8 @@ local function on_init() game.map_settings.enemy_evolution.time_factor = 0 game.map_settings.enemy_expansion.enabled = false game.map_settings.pollution.enabled = false - storage.map_forces = { + storage.map_forces = + { ['west'] = {}, ['east'] = {} } @@ -534,10 +546,9 @@ local function on_init() Team.reset_forces() end -local Event = require 'utils.event' Event.on_init(on_init) Event.add(defines.events.on_tick, on_tick) -Event.add(defines.events.on_player_used_spider_remote, on_player_used_spider_remote) +Event.add(defines.events.on_player_used_spidertron_remote, on_player_used_spider_remote) Event.add(defines.events.on_robot_built_entity, on_robot_built_entity) Event.add(defines.events.on_entity_died, on_entity_died) Event.add(defines.events.on_player_joined_game, on_player_joined_game) diff --git a/maps/blue_beach.lua b/maps/blue_beach.lua deleted file mode 100644 index 36aa89bb2..000000000 --- a/maps/blue_beach.lua +++ /dev/null @@ -1,250 +0,0 @@ -require 'modules.satellite_score' -require 'modules.dangerous_goods' -require 'modules.spawners_contain_biters' -require 'modules.splice_double' -require 'modules.landfill_reveals_nauvis' -require 'modules.dynamic_player_spawn' -require 'modules.no_deconstruction_of_neutral_entities' -require 'modules.biter_pets' - -local WD = require 'modules.wave_defense.table' -require 'modules.wave_defense.main' - -local math_random = math.random - -local landfill_drops = { - ['small-biter'] = 1, - ['small-spitter'] = 1, - ['medium-biter'] = 2, - ['medium-spitter'] = 2, - ['big-biter'] = 3, - ['big-spitter'] = 3, - ['behemoth-biter'] = 4, - ['behemoth-spitter'] = 4, - ['biter-spawner'] = 128, - ['spitter-spawner'] = 128, - ['small-worm-turret'] = 16, - ['medium-worm-turret'] = 32, - ['big-worm-turret'] = 48, - ['behemoth-worm-turret'] = 64 -} - -local tile_coords = {} -for x = 0, 31, 1 do - for y = 0, 31, 1 do - tile_coords[#tile_coords + 1] = { x, y } - end -end - -local function north_side(surface, left_top) - for x = 0.5, 31.5, 1 do - for y = 0.5, 31.5, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - surface.set_tiles({ { name = 'water-shallow', position = pos } }) - end - end - - if left_top.y > -96 then - return - end - - for _ = 1, math_random(3, 5), 1 do - local coord_modifier = tile_coords[math_random(1, #tile_coords)] - local pos = { left_top.x + coord_modifier[1], left_top.y + coord_modifier[2] } - local name = 'biter-spawner' - if math_random(1, 4) == 1 then - name = 'spitter-spawner' - end - surface.create_entity({ name = name, position = pos, force = 'enemy' }) - end -end - -local function south_side(surface, left_top) - if left_top.y < 32 then - for x = 0.5, 31.5, 1 do - for y = 0.5, 31.5, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - surface.set_tiles({ { name = 'sand-1', position = pos } }) - if math_random(1, 1024) == 1 then - local crate = surface.create_entity({ name = 'wooden-chest', position = pos, force = 'neutral' }) - if math_random(1, 12) == 1 then - crate.insert({ name = 'grenade', count = math_random(2, 5) }) - else - crate.insert({ name = 'firearm-magazine', count = math_random(32, 96) }) - end - else - --if left_top.x > 160 or left_top.x < -160 then - -- if math_random(1, 192) == 1 then - -- local name = "small-worm-turret" - -- local r = 1 + math.floor(math.abs(left_top.x) * 0.0025) - -- if r > 4 then r = 4 end - -- surface.create_entity({name = turrets[math_random(1, r)], position = pos, force = "enemy"}) - -- end - --end - if math_random(1, 256) == 1 then - surface.create_entity({ name = 'tree-02', position = pos }) - else - if math_random(1, 512) == 1 then - surface.create_entity({ name = 'huge-rock', position = pos }) - end - end - end - end - end - return - end - for x = 0.5, 31.5, 1 do - for y = 0.5, 31.5, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - --local noise = get_noise("sands", pos) - --if noise < 0.1 and noise > -0.1 then - -- surface.set_tiles({{name = "sand-1", position = pos}}) - --else - surface.set_tiles({ { name = 'water', position = pos } }) - if math_random(1, 256) == 1 then - surface.create_entity({ name = 'fish', position = pos }) - end - --end - end - end -end - -local function on_chunk_generated(event) - local surface = event.surface - - if surface.index == 1 then - for _, e in pairs(surface.find_entities_filtered({ force = 'enemy' })) do - e.destroy() - end - return - end - - local left_top = event.area.left_top - - surface.destroy_decoratives({ area = event.area }) - - if left_top.y < 0 then - north_side(surface, left_top) - return - end - south_side(surface, left_top) -end - -local function init_surface() - local wave_defense_table = WD.get_table() - if game.surfaces['blue_beach'] then - return game.surfaces['blue_beach'] - end - - local map_gen_settings = {} - map_gen_settings.water = '0' - map_gen_settings.starting_area = '1' - map_gen_settings.cliff_settings = { cliff_elevation_interval = 40, cliff_elevation_0 = 40 } - map_gen_settings.autoplace_controls = { - ['coal'] = { frequency = '0', size = '0', richness = '0' }, - ['stone'] = { frequency = '0', size = '0', richness = '0' }, - ['iron-ore'] = { frequency = '0', size = '0', richness = '0' }, - ['copper-ore'] = { frequency = '0', size = '0', richness = '0' }, - ['uranium-ore'] = { frequency = '0', size = '0', richness = '0' }, - ['crude-oil'] = { frequency = '0', size = '0', richness = '0' }, - ['trees'] = { frequency = '0', size = '0', richness = '0' }, - ['enemy-base'] = { frequency = '0', size = '0', richness = '0' } - } - - game.map_settings.pollution.enabled = true - game.map_settings.enemy_expansion.enabled = false - game.map_settings.enemy_expansion.max_expansion_distance = 15 - game.map_settings.enemy_expansion.settler_group_min_size = 8 - game.map_settings.enemy_expansion.settler_group_max_size = 16 - game.map_settings.enemy_expansion.min_expansion_cooldown = 3600 - game.map_settings.enemy_expansion.max_expansion_cooldown = 7200 - - local surface = game.create_surface('blue_beach', map_gen_settings) - surface.request_to_generate_chunks({ x = 0, y = 0 }, 1) - surface.force_generate_chunk_requests() - surface.daytime = 0.7 - surface.ticks_per_day = surface.ticks_per_day * 1.5 - surface.min_brightness = 0.1 - - game.forces['player'].set_spawn_position({ 0, 16 }, game.surfaces['blue_beach']) - game.forces['player'].technologies['landfill'].enabled = false - - storage.average_worm_amount_per_chunk = 4 - - wave_defense_table.surface_index = surface.index - - return surface -end - -local function on_player_joined_game(event) - local wave_defense_table = WD.get_table() - local surface = init_surface() - local player = game.players[event.player_index] - - --20 Players for maximum difficulty - wave_defense_table.wave_interval = 3600 - #game.connected_players * 180 - if wave_defense_table.wave_interval < 1800 then - wave_defense_table.wave_interval = 1800 - end - - if player.online_time == 0 then - local spawn = game.forces['player'].get_spawn_position(game.surfaces['blue_beach']) - player.teleport(surface.find_non_colliding_position('character', spawn, 3, 0.5), 'blue_beach') - player.insert({ name = 'raw-fish', count = 3 }) - player.insert({ name = 'iron-plate', count = 128 }) - player.insert({ name = 'iron-gear-wheel', count = 64 }) - player.insert({ name = 'copper-plate', count = 128 }) - player.insert({ name = 'copper-cable', count = 64 }) - player.insert({ name = 'pistol', count = 1 }) - player.insert({ name = 'firearm-magazine', count = 32 }) - player.insert({ name = 'shotgun', count = 1 }) - player.insert({ name = 'shotgun-shell', count = 16 }) - player.insert({ name = 'light-armor', count = 1 }) - end -end - -local sand_coords = { - { x = 0, y = 1 }, - { x = -1, y = 0 }, - { x = 1, y = 0 }, - { x = 0, y = -1 }, - { x = 1, y = 1 }, - { x = -1, y = -1 }, - { x = -1, y = 1 }, - { x = 1, y = -1 }, - { x = 0, y = 2 }, - { x = -2, y = 0 }, - { x = 2, y = 0 }, - { x = 0, y = -2 } -} - -local function make_sand(surface, position) - for _, coord_modifier in pairs(sand_coords) do - local pos = { position.x + coord_modifier.x, position.y + coord_modifier.y } - if surface.get_tile(pos).name == 'water' then - surface.set_tiles({ { name = 'sand-1', position = pos } }, true) - return - end - end -end - -local function on_entity_died(event) - if not event.entity.valid then - return - end - if landfill_drops[event.entity.name] then - event.entity.surface.spill_item_stack(event.entity.position, { name = 'landfill', count = landfill_drops[event.entity.name] * 2 }, true) - end - if event.entity.type ~= 'unit' then - return - end - make_sand(event.entity.surface, event.entity.position) -end - -local Event = require 'utils.event' -Event.add(defines.events.on_chunk_generated, on_chunk_generated) -Event.add(defines.events.on_entity_died, on_entity_died) -Event.add(defines.events.on_player_joined_game, on_player_joined_game) - -require 'modules.ores_are_mixed' -require 'modules.surrounded_by_worms' diff --git a/maps/cave_choppy/cave_miner_market_items.lua b/maps/cave_choppy/cave_miner_market_items.lua index 7ab7e8ecc..72ec5371d 100644 --- a/maps/cave_choppy/cave_miner_market_items.lua +++ b/maps/cave_choppy/cave_miner_market_items.lua @@ -1,34 +1,35 @@ local items = {} -items.spawn = { - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'rail', count = 4}}, - {price = {{'raw-fish', 150}}, offer = {type = 'give-item', item = 'infinity-chest', count = 1}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'rail-signal', count = 2}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'rail-chain-signal', count = 2}}, - {price = {{'raw-fish', 10}}, offer = {type = 'give-item', item = 'train-stop'}}, - {price = {{'raw-fish', 94}}, offer = {type = 'give-item', item = 'locomotive'}}, - {price = {{'raw-fish', 35}}, offer = {type = 'give-item', item = 'cargo-wagon'}}, - {price = {{'raw-fish', 4}}, offer = {type = 'give-item', item = 'decider-combinator'}}, - {price = {{'raw-fish', 4}}, offer = {type = 'give-item', item = 'arithmetic-combinator'}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'constant-combinator'}}, - {price = {{'raw-fish', 4}}, offer = {type = 'give-item', item = 'programmable-speaker'}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'small-lamp'}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'firearm-magazine'}}, - {price = {{'raw-fish', 4}}, offer = {type = 'give-item', item = 'piercing-rounds-magazine'}}, - {price = {{'raw-fish', 3}}, offer = {type = 'give-item', item = 'grenade'}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'land-mine'}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'explosives', count = 2}}, - {price = {{'raw-fish', 40}}, offer = {type = 'give-item', item = 'cliff-explosives'}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'wood', count = 25}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'iron-ore', count = 25}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'copper-ore', count = 25}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'stone', count = 25}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'coal', count = 25}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'uranium-ore', count = 20}}, - {price = {{'wood', 25}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}}, - {price = {{'iron-ore', 25}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}}, - {price = {{'copper-ore', 25}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}}, - {price = {{'stone', 25}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}}, - {price = {{'coal', 25}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}}, - {price = {{'uranium-ore', 20}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}} +items.spawn = +{ + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'rail', count = 4 } }, + { price = { { name = 'raw-fish', count = 150 } }, offer = { type = 'give-item', item = 'infinity-chest', count = 1 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'rail-signal', count = 2 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'rail-chain-signal', count = 2 } }, + { price = { { name = 'raw-fish', count = 10 } }, offer = { type = 'give-item', item = 'train-stop' } }, + { price = { { name = 'raw-fish', count = 94 } }, offer = { type = 'give-item', item = 'locomotive' } }, + { price = { { name = 'raw-fish', count = 35 } }, offer = { type = 'give-item', item = 'cargo-wagon' } }, + { price = { { name = 'raw-fish', count = 4 } }, offer = { type = 'give-item', item = 'decider-combinator' } }, + { price = { { name = 'raw-fish', count = 4 } }, offer = { type = 'give-item', item = 'arithmetic-combinator' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'constant-combinator' } }, + { price = { { name = 'raw-fish', count = 4 } }, offer = { type = 'give-item', item = 'programmable-speaker' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'small-lamp' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'firearm-magazine' } }, + { price = { { name = 'raw-fish', count = 4 } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, + { price = { { name = 'raw-fish', count = 3 } }, offer = { type = 'give-item', item = 'grenade' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'land-mine' } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'explosives', count = 2 } }, + { price = { { name = 'raw-fish', count = 40 } }, offer = { type = 'give-item', item = 'cliff-explosives' } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'wood', count = 25 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'iron-ore', count = 25 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'copper-ore', count = 25 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'stone', count = 25 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'coal', count = 25 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'uranium-ore', count = 20 } }, + { price = { { name = 'wood', count = 25 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } }, + { price = { { name = 'iron-ore', count = 25 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } }, + { price = { { name = 'copper-ore', count = 25 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } }, + { price = { { name = 'stone', count = 25 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } }, + { price = { { name = 'coal', count = 25 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } }, + { price = { { name = 'uranium-ore', count = 20 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } } } return items diff --git a/maps/cave_choppy/forest_world.lua b/maps/cave_choppy/forest_world.lua index e830b269b..15555f691 100644 --- a/maps/cave_choppy/forest_world.lua +++ b/maps/cave_choppy/forest_world.lua @@ -15,16 +15,18 @@ local Simplex = require 'utils.math.simplex_noise'.d2 local Event = require 'utils.event' local table_insert = table.insert local math_random = math.random +local Task = require 'utils.task_token' -local disabled_for_deconstruction = { +local disabled_for_deconstruction = +{ ['fish'] = true, ['huge-rock'] = true, ['big-rock'] = true, ['big-sand-rock'] = true, - ['mineable-wreckage'] = true } -local tile_replacements = { +local tile_replacements = +{ ['dirt-1'] = 'grass-1', ['dirt-2'] = 'grass-2', ['dirt-3'] = 'grass-3', @@ -41,7 +43,8 @@ local tile_replacements = { } local rocks = { 'big-rock', 'big-rock', 'huge-rock' } -local decos = { +local decos = +{ 'green-hairy-grass', 'green-hairy-grass', 'green-hairy-grass', @@ -54,19 +57,34 @@ local decos = { } local decos_inside_forest = { 'brown-asterisk', 'brown-asterisk', 'brown-carpet-grass', 'brown-hairy-grass' } -local noises = { - ['forest_location'] = { +local noises = +{ + ['forest_location'] = + { { modifier = 0.006, weight = 1 }, - { modifier = 0.01, weight = 0.25 }, - { modifier = 0.05, weight = 0.15 }, - { modifier = 0.1, weight = 0.05 } + { modifier = 0.01, weight = 0.25 }, + { modifier = 0.05, weight = 0.15 }, + { modifier = 0.1, weight = 0.05 } }, - ['forest_density'] = { + ['forest_density'] = + { { modifier = 0.01, weight = 1 }, { modifier = 0.05, weight = 0.5 }, - { modifier = 0.1, weight = 0.025 } + { modifier = 0.1, weight = 0.025 } } } + +local create_tiles_token = + Task.register( + function (event) + local surface = event.surface + surface.set_tiles({ { name = 'tutorial-grid', position = { 1, -4 } } }) + surface.set_tiles({ { name = 'tutorial-grid', position = { 1, -5 } } }) + surface.set_tiles({ { name = 'tutorial-grid', position = { 2, -4 } } }) + surface.set_tiles({ { name = 'tutorial-grid', position = { 2, -5 } } }) + end + ) + local function get_noise(name, pos, seed) local noise = 0 for _, n in pairs(noises[name]) do @@ -76,7 +94,8 @@ local function get_noise(name, pos, seed) return noise end -local entities_to_convert = { +local entities_to_convert = +{ ['coal'] = true, ['copper-ore'] = true, ['iron-ore'] = true, @@ -91,7 +110,8 @@ local entities_to_convert = { ['thorium-ore'] = true } -local trees_to_remove = { +local trees_to_remove = +{ ['dead-dry-hairy-tree'] = true, ['dead-grey-trunk'] = true, ['dead-tree-desert'] = true, @@ -114,7 +134,8 @@ local trees_to_remove = { ['tree-09-red'] = true } -local choppy_messages = { +local choppy_messages = +{ 'We should branch out.', "Wood? Well that's the root of the problem.", 'Going out for chopping? Son of a birch.', @@ -129,29 +150,32 @@ local function create_choppy_stats_gui(player) end local captions = {} - local caption_style = { - { 'font', 'default-bold' }, - { 'font_color', { r = 0.63, g = 0.63, b = 0.63 } }, - { 'top_padding', 2 }, - { 'left_padding', 0 }, + local caption_style = + { + { 'font', 'default-bold' }, + { 'font_color', { r = 0.63, g = 0.63, b = 0.63 } }, + { 'top_padding', 2 }, + { 'left_padding', 0 }, { 'right_padding', 0 }, { 'minimal_width', 0 } } local stat_numbers = {} - local stat_number_style = { - { 'font', 'default-bold' }, - { 'font_color', { r = 0.77, g = 0.77, b = 0.77 } }, - { 'top_padding', 2 }, - { 'left_padding', 0 }, + local stat_number_style = + { + { 'font', 'default-bold' }, + { 'font_color', { r = 0.77, g = 0.77, b = 0.77 } }, + { 'top_padding', 2 }, + { 'left_padding', 0 }, { 'right_padding', 0 }, { 'minimal_width', 0 } } local separators = {} - local separator_style = { - { 'font', 'default-bold' }, - { 'font_color', { r = 0.15, g = 0.15, b = 0.89 } }, - { 'top_padding', 2 }, - { 'left_padding', 2 }, + local separator_style = + { + { 'font', 'default-bold' }, + { 'font_color', { r = 0.15, g = 0.15, b = 0.89 } }, + { 'top_padding', 2 }, + { 'left_padding', 2 }, { 'right_padding', 2 }, { 'minimal_width', 0 } } @@ -195,7 +219,7 @@ local function create_choppy_stats_gui(player) separators[3] = t.add { type = 'label', caption = '|' } captions[3] = t.add { type = 'label', caption = '[img=utility.hand] :' } - local str = '+' + str = '+' str = str .. tostring(game.forces.player.mining_drill_productivity_bonus * 100) str = str .. '%' stat_numbers[3] = t.add { type = 'label', caption = str } @@ -284,7 +308,7 @@ local function process_tile(surface, pos, tile, seed) end if math_random(1, 100000) == 1 then - local wrecks = { 'big-ship-wreck-1', 'big-ship-wreck-2', 'big-ship-wreck-3' } + local wrecks = { 'crash-site-spaceship-wreck-big-1', 'crash-site-spaceship-wreck-big-2', 'crash-site-spaceship-wreck-medium-1' } local e = surface.create_entity { name = wrecks[math_random(1, #wrecks)], position = pos, force = 'neutral' } e.insert({ name = 'raw-fish', count = math_random(3, 25) }) if math_random(1, 3) == 1 then @@ -310,7 +334,8 @@ local function process_tile(surface, pos, tile, seed) surface.create_decoratives( { check_collision = false, - decoratives = { + decoratives = + { { name = decos_inside_forest[math_random(1, #decos_inside_forest)], position = pos, @@ -335,7 +360,8 @@ local function process_tile(surface, pos, tile, seed) surface.create_decoratives( { check_collision = false, - decoratives = { + decoratives = + { { name = decos_inside_forest[math_random(1, #decos_inside_forest)], position = pos, @@ -430,7 +456,8 @@ local function on_player_joined_game() game.surfaces['choppy'].ticks_per_day = game.surfaces['choppy'].ticks_per_day * 2 - storage.entity_yield = { + storage.entity_yield = + { ['tree-01'] = { 'iron-ore' }, ['tree-02-red'] = { 'copper-ore' }, ['tree-04'] = { 'coal' }, @@ -537,10 +564,10 @@ local function on_player_mined_entity(event) end local main_item = storage.entity_yield[entity.name][math_random(1, #storage.entity_yield[entity.name])] + local player = game.players[event.player_index] - entity.surface.create_entity( + player.create_local_flying_text( { - name = 'flying-text', position = entity.position, text = '+' .. amount .. ' [item=' .. main_item .. '] +' .. second_item_amount .. ' [item=' .. second_item .. ']', color = { r = 0.8, g = 0.8, b = 0.8 } @@ -551,18 +578,17 @@ local function on_player_mined_entity(event) storage.stats_wood_chopped = storage.stats_wood_chopped + 1 refresh_gui() - local player = game.players[event.player_index] local inserted_count = player.insert({ name = main_item, count = amount }) amount = amount - inserted_count if amount > 0 then - entity.surface.spill_item_stack(entity.position, { name = main_item, count = amount }, true) + entity.surface.spill_item_stack { position = entity.position, stack = { name = main_item, count = amount }, enable_looted = true } end - local inserted_count = player.insert({ name = second_item, count = second_item_amount }) + inserted_count = player.insert({ name = second_item, count = second_item_amount }) second_item_amount = second_item_amount - inserted_count if second_item_amount > 0 then - entity.surface.spill_item_stack(entity.position, { name = second_item, count = second_item_amount }, true) + entity.surface.spill_item_stack { position = entity.position, stack = { name = second_item, count = second_item_amount }, enable_looted = true } end end end @@ -589,7 +615,8 @@ local function on_entity_died(event) for _, entity in pairs( event.entity.surface.find_entities_filtered( { - area = { + area = + { { event.entity.position.x - 4, event.entity.position.y - 4 }, { event.entity.position.x + 4, event.entity.position.y + 4 } }, @@ -610,14 +637,17 @@ local function init_surface(surface) end local function init() - local storage = {} + local content = {} local newPlace = init_surface(game.create_surface('choppy')) local surface = game.surfaces['choppy'] newPlace.request_to_generate_chunks({ 0, 0 }, 4) - storage.surface_choppy_elevator = surface.create_entity({ name = 'player-port', position = { 1, -4 }, force = game.forces.neutral }) - storage.surface_choppy_chest = Module.create_chest(surface, { 1, -8 }, storage) - rendering.draw_text { + Task.set_timeout_in_ticks(400, create_tiles_token, { surface = newPlace }) + + storage.surface_choppy_chest = Module.create_chest(surface, { 1, -8 }, content) + + rendering.draw_text + { text = 'Storage', surface = surface, target = storage.surface_choppy_chest, @@ -626,10 +656,11 @@ local function init() alignment = 'center' } - rendering.draw_text { + rendering.draw_text + { text = 'Elevator', surface = surface, - target = storage.surface_choppy_elevator, + target = { 1, -4 }, target_offset = { 0, 1 }, color = { r = 0.98, g = 0.66, b = 0.22 }, alignment = 'center' @@ -637,8 +668,6 @@ local function init() storage.surface_choppy_chest.minable = false storage.surface_choppy_chest.destructible = false - storage.surface_choppy_elevator.minable = false - storage.surface_choppy_elevator.destructible = false end Event.on_init(init) diff --git a/maps/cave_choppy/infinity_chest.lua b/maps/cave_choppy/infinity_chest.lua index 7d93d684d..6b8f14770 100644 --- a/maps/cave_choppy/infinity_chest.lua +++ b/maps/cave_choppy/infinity_chest.lua @@ -22,9 +22,9 @@ Global.register( local chest_gui_frame_name = Gui.uid_name() local chest_content_table_name = Gui.uid_name() -function Public.create_chest(surface, position, storage) +function Public.create_chest(surface, position, content) local entity = surface.create_entity { name = 'infinity-chest', position = position, force = 'neutral' } - chests[entity.unit_number] = { entity = entity, storage = storage } + chests[entity.unit_number] = { entity = entity, content = content } return entity end @@ -36,7 +36,7 @@ local function built_entity(event) entity.active = false - chests[entity.unit_number] = { entity = entity, storage = {} } + chests[entity.unit_number] = { entity = entity, content = {} } end local function get_stack_size(name) @@ -49,7 +49,7 @@ local function get_stack_size(name) return proto.stack_size end -local function do_item(name, count, inv, storage) +local function do_item(name, count, inv, content) local size = get_stack_size(name) local diff = count - size @@ -61,10 +61,10 @@ local function do_item(name, count, inv, storage) if diff > 0 then inv.remove({ name = name, count = diff }) - local prev = storage[name] or 0 + local prev = content[name] or 0 new_amount = prev + diff elseif diff < 0 then - local prev = storage[name] + local prev = content[name] if not prev then return end @@ -75,9 +75,9 @@ local function do_item(name, count, inv, storage) end if new_amount == 0 then - storage[name] = nil + content[name] = nil else - storage[name] = new_amount + content[name] = new_amount end end @@ -94,24 +94,28 @@ local function tick() if not entity or not entity.valid then chests[chest_id] = nil else - local storage = chest_data.storage + local content = chest_data.content local inv = entity.get_inventory(1) --defines.inventory.chest local contents = inv.get_contents() - for name, count in pairs(contents) do - do_item(name, count, inv, storage) + if not next(contents) then + return + end + + for _, data in pairs(contents) do + do_item(data.name, data.count, inv, content) end - for name, _ in pairs(storage) do - if not contents[name] then - do_item(name, 0, inv, storage) + for _, data in pairs(content) do + if not contents[data.name] then + do_item(data.name, 0, inv, content) end end end end local function create_chest_gui_content(frame, player, chest) - local storage = chest.storage + local content = chest.content local inv = chest.entity.get_inventory(1).get_contents() local grid = frame[chest_content_table_name] @@ -122,25 +126,27 @@ local function create_chest_gui_content(frame, player, chest) grid = frame.add { type = 'table', name = chest_content_table_name, column_count = 10, style = 'slot_table' } end - for name, count in pairs(storage) do - local number = count + (inv[name] or 0) - grid.add { + for _, data in pairs(chest.content) do + local number = data.count + (inv[data.name] or 0) + grid.add + { type = 'sprite-button', - sprite = 'item/' .. name, + sprite = 'item/' .. data.name, number = number, - tooltip = name, + tooltip = data.name, --style = 'slot_button' enabled = false } end - for name, count in pairs(inv) do - if not storage[name] then - grid.add { + for _, data in pairs(inv) do + if not content[data.name] then + grid.add + { type = 'sprite-button', - sprite = 'item/' .. name, - number = count, - tooltip = name, + sprite = 'item/' .. data.name, + number = data.count, + tooltip = data.name, --style = 'slot_button' enabled = false } @@ -206,7 +212,8 @@ local function gui_opened(event) end local frame = - player.gui.center.add { + player.gui.center.add + { type = 'frame', name = chest_gui_frame_name, caption = 'Infinite Storage Chest', @@ -214,7 +221,8 @@ local function gui_opened(event) } local text = - frame.add { + frame.add + { type = 'label', caption = format( 'This chest stores unlimited quantity of items (up to 48 different item types).\nThe chest is best used with an inserter to add / remove items.\nIf the chest is mined or destroyed the items are lost.' diff --git a/maps/cave_choppy/main.lua b/maps/cave_choppy/main.lua index 40193a35c..24f57e2f9 100644 --- a/maps/cave_choppy/main.lua +++ b/maps/cave_choppy/main.lua @@ -1,6 +1,10 @@ --luacheck: ignore -- By Gerkiz +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + require 'forest_world' require 'player_elevator' require 'modules.rocks_broken_paint_tiles' @@ -15,7 +19,8 @@ local Map = require 'modules.map_info' local spawn_dome_size = 8000 -local darkness_messages = { +local darkness_messages = +{ 'Something is lurking in the dark...', 'A shadow moves. I doubt it is friendly...', 'The silence grows louder...', @@ -28,7 +33,8 @@ local darkness_messages = { 'You feel like, something is watching you...' } -local rock_inhabitants = { +local rock_inhabitants = +{ [1] = { 'small-biter' }, [2] = { 'small-biter', 'small-biter', 'small-biter', 'small-biter', 'small-biter', 'medium-biter' }, [3] = { 'small-biter', 'small-biter', 'small-biter', 'small-biter', 'medium-biter', 'medium-biter' }, @@ -47,7 +53,8 @@ local rock_inhabitants = { [16] = { 'big-biter', 'big-biter', 'big-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-spitter' }, [17] = { 'big-biter', 'big-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-spitter' }, [18] = { 'big-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-spitter' }, - [19] = { + [19] = + { 'behemoth-biter', 'behemoth-biter', 'behemoth-biter', @@ -55,7 +62,8 @@ local rock_inhabitants = { 'behemoth-biter', 'behemoth-spitter' }, - [20] = { + [20] = + { 'behemoth-biter', 'behemoth-biter', 'behemoth-biter', @@ -65,8 +73,10 @@ local rock_inhabitants = { } } -local worm_raffle_table = { - [1] = { +local worm_raffle_table = +{ + [1] = + { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', @@ -74,7 +84,8 @@ local worm_raffle_table = { 'small-worm-turret', 'small-worm-turret' }, - [2] = { + [2] = + { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', @@ -82,7 +93,8 @@ local worm_raffle_table = { 'small-worm-turret', 'medium-worm-turret' }, - [3] = { + [3] = + { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', @@ -90,7 +102,8 @@ local worm_raffle_table = { 'medium-worm-turret', 'medium-worm-turret' }, - [4] = { + [4] = + { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', @@ -98,7 +111,8 @@ local worm_raffle_table = { 'medium-worm-turret', 'medium-worm-turret' }, - [5] = { + [5] = + { 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret', @@ -106,7 +120,8 @@ local worm_raffle_table = { 'medium-worm-turret', 'big-worm-turret' }, - [6] = { + [6] = + { 'small-worm-turret', 'medium-worm-turret', 'medium-worm-turret', @@ -114,7 +129,8 @@ local worm_raffle_table = { 'medium-worm-turret', 'big-worm-turret' }, - [7] = { + [7] = + { 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', @@ -122,7 +138,8 @@ local worm_raffle_table = { 'big-worm-turret', 'big-worm-turret' }, - [8] = { + [8] = + { 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', @@ -130,7 +147,8 @@ local worm_raffle_table = { 'big-worm-turret', 'big-worm-turret' }, - [9] = { + [9] = + { 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', @@ -138,7 +156,8 @@ local worm_raffle_table = { 'big-worm-turret', 'big-worm-turret' }, - [10] = { + [10] = + { 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', @@ -196,7 +215,7 @@ for x = 89, 1, -1 do player_hunger_buff[x] = buff_top_value - y * 0.015 y = y + 1 end -local y = 1 +y = 1 for x = 111, 200, 1 do player_hunger_buff[x] = buff_top_value - y * 0.015 y = y + 1 @@ -225,29 +244,32 @@ local function create_cave_miner_stats_gui(player) end local captions = {} - local caption_style = { - { 'font', 'default-bold' }, - { 'font_color', { r = 0.63, g = 0.63, b = 0.63 } }, - { 'top_padding', 2 }, - { 'left_padding', 0 }, + local caption_style = + { + { 'font', 'default-bold' }, + { 'font_color', { r = 0.63, g = 0.63, b = 0.63 } }, + { 'top_padding', 2 }, + { 'left_padding', 0 }, { 'right_padding', 0 }, { 'minimal_width', 0 } } local stat_numbers = {} - local stat_number_style = { - { 'font', 'default-bold' }, - { 'font_color', { r = 0.77, g = 0.77, b = 0.77 } }, - { 'top_padding', 2 }, - { 'left_padding', 0 }, + local stat_number_style = + { + { 'font', 'default-bold' }, + { 'font_color', { r = 0.77, g = 0.77, b = 0.77 } }, + { 'top_padding', 2 }, + { 'left_padding', 0 }, { 'right_padding', 0 }, { 'minimal_width', 0 } } local separators = {} - local separator_style = { - { 'font', 'default-bold' }, - { 'font_color', { r = 0.15, g = 0.15, b = 0.89 } }, - { 'top_padding', 2 }, - { 'left_padding', 2 }, + local separator_style = + { + { 'font', 'default-bold' }, + { 'font_color', { r = 0.15, g = 0.15, b = 0.89 } }, + { 'top_padding', 2 }, + { 'left_padding', 2 }, { 'right_padding', 2 }, { 'minimal_width', 0 } } @@ -264,7 +286,7 @@ local function create_cave_miner_stats_gui(player) caption_hunger.style.font_color = player_hunger_color_list[storage.player_hunger[player.name]] caption_hunger.style.top_padding = 2 - local frame = player.gui.top.add { type = 'frame', name = 'caver_miner_stats_frame' } + frame = player.gui.top.add { type = 'frame', name = 'caver_miner_stats_frame' } frame.style.minimal_height = 38 frame.style.maximal_height = 38 @@ -291,7 +313,7 @@ local function create_cave_miner_stats_gui(player) captions[3] = t.add { type = 'label', caption = '[img=item.productivity-module] :' } captions[3].tooltip = 'Current mining speed bonus.' local x = math.floor(game.forces.player.manual_mining_speed_modifier * 100 + player_hunger_buff[storage.player_hunger[player.name]] * 100) - local str = '' + str = '' if x > 0 then str = str .. '+' end @@ -303,7 +325,7 @@ local function create_cave_miner_stats_gui(player) separators[3] = t.add { type = 'label', caption = '|' } captions[5] = t.add { type = 'label', caption = '[img=utility.hand] :' } - local str = '+' + str = '+' str = str .. tostring(game.forces.player.mining_drill_productivity_bonus * 100) str = str .. '%' stat_numbers[4] = t.add { type = 'label', caption = str } @@ -339,18 +361,19 @@ end local function treasure_chest(position, distance_to_center) local chest_raffle = {} - local chest_loot = { + local chest_loot = + { --{{name = "steel-axe", count = math.random(1,3)}, weight = 2, evolution_min = 0.0, evolution_max = 0.5}, - { { name = 'submachine-gun', count = math.random(1, 3) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'submachine-gun', count = math.random(1, 3) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, { { name = 'slowdown-capsule', count = math.random(16, 32) }, weight = 1, evolution_min = 0.3, evolution_max = 0.7 }, - { { name = 'poison-capsule', count = math.random(16, 32) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'poison-capsule', count = math.random(16, 32) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, { { name = 'uranium-cannon-shell', count = math.random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'cannon-shell', count = math.random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.7 }, + { { name = 'cannon-shell', count = math.random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.7 }, { { name = 'explosive-uranium-cannon-shell', count = math.random(16, 32) }, weight = 5, @@ -363,24 +386,24 @@ local function treasure_chest(position, distance_to_center) evolution_min = 0.4, evolution_max = 0.8 }, - { { name = 'shotgun', count = 1 }, weight = 2, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'shotgun', count = 1 }, weight = 2, evolution_min = 0.0, evolution_max = 0.2 }, { { name = 'shotgun-shell', count = math.random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'combat-shotgun', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'combat-shotgun', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.8 }, { { name = 'piercing-shotgun-shell', count = math.random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'flamethrower', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, + { { name = 'flamethrower', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, { { name = 'flamethrower-ammo', count = math.random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'rocket-launcher', count = 1 }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'rocket', count = math.random(16, 32) }, weight = 5, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'explosive-rocket', count = math.random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'land-mine', count = math.random(16, 32) }, weight = 5, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'grenade', count = math.random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.5 }, - { { name = 'cluster-grenade', count = math.random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'firearm-magazine', count = math.random(32, 128) }, weight = 5, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'rocket-launcher', count = 1 }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'rocket', count = math.random(16, 32) }, weight = 5, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'explosive-rocket', count = math.random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'land-mine', count = math.random(16, 32) }, weight = 5, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'grenade', count = math.random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.5 }, + { { name = 'cluster-grenade', count = math.random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'firearm-magazine', count = math.random(32, 128) }, weight = 5, evolution_min = 0, evolution_max = 0.3 }, { { name = 'piercing-rounds-magazine', count = math.random(32, 128) }, weight = 5, @@ -393,42 +416,42 @@ local function treasure_chest(position, distance_to_center) evolution_min = 0.5, evolution_max = 1 }, - { { name = 'defender-capsule', count = math.random(8, 16) }, weight = 2, evolution_min = 0.0, evolution_max = 0.7 }, + { { name = 'defender-capsule', count = math.random(8, 16) }, weight = 2, evolution_min = 0.0, evolution_max = 0.7 }, { { name = 'distractor-capsule', count = math.random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'destroyer-capsule', count = math.random(8, 16) }, weight = 2, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'destroyer-capsule', count = math.random(8, 16) }, weight = 2, evolution_min = 0.3, evolution_max = 1 }, --{{name = "atomic-bomb", count = math.random(8,16)}, weight = 1, evolution_min = 0.3, evolution_max = 1}, - { { name = 'light-armor', count = 1 }, weight = 3, evolution_min = 0, evolution_max = 0.1 }, - { { name = 'heavy-armor', count = 1 }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'modular-armor', count = 1 }, weight = 2, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'power-armor', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'light-armor', count = 1 }, weight = 3, evolution_min = 0, evolution_max = 0.1 }, + { { name = 'heavy-armor', count = 1 }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'modular-armor', count = 1 }, weight = 2, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'power-armor', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, --{{name = "power-armor-mk2", count = 1}, weight = 1, evolution_min = 0.9, evolution_max = 1}, - { { name = 'battery-equipment', count = 1 }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, - { { name = 'battery-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'belt-immunity-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'battery-equipment', count = 1 }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, + { { name = 'battery-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'belt-immunity-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, --{{name = "solar-panel-equipment", count = math.random(1,4)}, weight = 5, evolution_min = 0.3, evolution_max = 0.8}, - { { name = 'discharge-defense-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 0.8 }, + { { name = 'discharge-defense-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 0.8 }, { { name = 'energy-shield-equipment', count = math.random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'energy-shield-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'fusion-reactor-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'energy-shield-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'fission-reactor-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, --{{name = "night-vision-equipment", count = 1}, weight = 1, evolution_min = 0.3, evolution_max = 0.8}, - { { name = 'personal-laser-defense-equipment', count = 1 }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'personal-laser-defense-equipment', count = 1 }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, { { name = 'iron-gear-wheel', count = math.random(80, 100) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'copper-cable', count = math.random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'engine-unit', count = math.random(16, 32) }, weight = 2, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'copper-cable', count = math.random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'engine-unit', count = math.random(16, 32) }, weight = 2, evolution_min = 0.1, evolution_max = 0.5 }, { { name = 'electric-engine-unit', count = math.random(16, 32) }, weight = 2, evolution_min = 0.4, evolution_max = 0.8 }, - { { name = 'battery', count = math.random(50, 150) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'battery', count = math.random(50, 150) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, { { name = 'advanced-circuit', count = math.random(50, 150) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, { { name = 'electronic-circuit', count = math.random(50, 150) }, @@ -436,14 +459,14 @@ local function treasure_chest(position, distance_to_center) evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'processing-unit', count = math.random(50, 150) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'explosives', count = math.random(40, 50) }, weight = 10, evolution_min = 0.0, evolution_max = 1 }, - { { name = 'lubricant-barrel', count = math.random(4, 10) }, weight = 1, evolution_min = 0.3, evolution_max = 0.5 }, - { { name = 'rocket-fuel', count = math.random(4, 10) }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, - { { name = 'steel-plate', count = math.random(25, 75) }, weight = 2, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'nuclear-fuel', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'burner-inserter', count = math.random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'inserter', count = math.random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, + { { name = 'processing-unit', count = math.random(50, 150) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'explosives', count = math.random(40, 50) }, weight = 10, evolution_min = 0.0, evolution_max = 1 }, + { { name = 'lubricant-barrel', count = math.random(4, 10) }, weight = 1, evolution_min = 0.3, evolution_max = 0.5 }, + { { name = 'rocket-fuel', count = math.random(4, 10) }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, + { { name = 'steel-plate', count = math.random(25, 75) }, weight = 2, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'nuclear-fuel', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'burner-inserter', count = math.random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'inserter', count = math.random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, { { name = 'long-handed-inserter', count = math.random(8, 16) }, weight = 3, @@ -457,7 +480,7 @@ local function treasure_chest(position, distance_to_center) evolution_min = 0.4, evolution_max = 1 }, - { { name = 'bulk-inserter', count = math.random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'bulk-inserter', count = math.random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, { { name = 'small-electric-pole', count = math.random(16, 24) }, weight = 3, @@ -471,12 +494,12 @@ local function treasure_chest(position, distance_to_center) evolution_max = 1 }, { { name = 'big-electric-pole', count = math.random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'substation', count = math.random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'wooden-chest', count = math.random(16, 24) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'iron-chest', count = math.random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 0.4 }, - { { name = 'steel-chest', count = math.random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'small-lamp', count = math.random(16, 32) }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'rail', count = math.random(25, 75) }, weight = 3, evolution_min = 0.1, evolution_max = 0.6 }, + { { name = 'substation', count = math.random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'wooden-chest', count = math.random(16, 24) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'iron-chest', count = math.random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 0.4 }, + { { name = 'steel-chest', count = math.random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'small-lamp', count = math.random(16, 32) }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'rail', count = math.random(25, 75) }, weight = 3, evolution_min = 0.1, evolution_max = 0.6 }, { { name = 'assembling-machine-1', count = math.random(2, 4) }, weight = 3, @@ -490,16 +513,16 @@ local function treasure_chest(position, distance_to_center) evolution_max = 0.8 }, { { name = 'assembling-machine-3', count = math.random(1, 2) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'accumulator', count = math.random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'offshore-pump', count = math.random(1, 3) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'beacon', count = math.random(1, 2) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'boiler', count = math.random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'steam-engine', count = math.random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.5 }, - { { name = 'steam-turbine', count = math.random(1, 2) }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'accumulator', count = math.random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'offshore-pump', count = math.random(1, 3) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'beacon', count = math.random(1, 2) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'boiler', count = math.random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'steam-engine', count = math.random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.5 }, + { { name = 'steam-turbine', count = math.random(1, 2) }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, --{{name = "nuclear-reactor", count = 1}, weight = 1, evolution_min = 0.6, evolution_max = 1}, - { { name = 'centrifuge', count = math.random(1, 2) }, weight = 1, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'heat-pipe', count = math.random(4, 8) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'heat-exchanger', count = math.random(2, 4) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'centrifuge', count = math.random(1, 2) }, weight = 1, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'heat-pipe', count = math.random(4, 8) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'heat-exchanger', count = math.random(2, 4) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, { { name = 'arithmetic-combinator', count = math.random(8, 16) }, weight = 1, @@ -507,10 +530,10 @@ local function treasure_chest(position, distance_to_center) evolution_max = 1 }, { { name = 'constant-combinator', count = math.random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'decider-combinator', count = math.random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'power-switch', count = math.random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'decider-combinator', count = math.random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'power-switch', count = math.random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, { { name = 'programmable-speaker', count = math.random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'chemical-plant', count = math.random(1, 3) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'chemical-plant', count = math.random(1, 3) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, { { name = 'burner-mining-drill', count = math.random(2, 4) }, weight = 3, @@ -535,7 +558,7 @@ local function treasure_chest(position, distance_to_center) evolution_min = 0.5, evolution_max = 1 }, - { { name = 'express-splitter', count = math.random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'express-splitter', count = math.random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, { { name = 'fast-transport-belt', count = math.random(25, 75) }, weight = 3, @@ -548,34 +571,34 @@ local function treasure_chest(position, distance_to_center) evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'fast-splitter', count = math.random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.3 }, - { { name = 'transport-belt', count = math.random(25, 75) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'underground-belt', count = math.random(4, 8) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'splitter', count = math.random(2, 4) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'fast-splitter', count = math.random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.3 }, + { { name = 'transport-belt', count = math.random(25, 75) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'underground-belt', count = math.random(4, 8) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'splitter', count = math.random(2, 4) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, --{{name = "oil-refinery", count = math.random(2,4)}, weight = 2, evolution_min = 0.3, evolution_max = 1}, - { { name = 'pipe', count = math.random(30, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'pipe-to-ground', count = math.random(4, 8) }, weight = 1, evolution_min = 0.2, evolution_max = 0.5 }, - { { name = 'pumpjack', count = math.random(1, 3) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'pump', count = math.random(1, 2) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'pipe', count = math.random(30, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'pipe-to-ground', count = math.random(4, 8) }, weight = 1, evolution_min = 0.2, evolution_max = 0.5 }, + { { name = 'pumpjack', count = math.random(1, 3) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'pump', count = math.random(1, 2) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, --{{name = "solar-panel", count = math.random(8,16)}, weight = 3, evolution_min = 0.4, evolution_max = 0.9}, - { { name = 'electric-furnace', count = math.random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'steel-furnace', count = math.random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'stone-furnace', count = math.random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'radar', count = math.random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'rail-signal', count = math.random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, + { { name = 'electric-furnace', count = math.random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'steel-furnace', count = math.random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'stone-furnace', count = math.random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'radar', count = math.random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'rail-signal', count = math.random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, { { name = 'rail-chain-signal', count = math.random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'stone-wall', count = math.random(25, 75) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'gate', count = math.random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'storage-tank', count = math.random(1, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, - { { name = 'train-stop', count = math.random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'stone-wall', count = math.random(25, 75) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'gate', count = math.random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'storage-tank', count = math.random(1, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, + { { name = 'train-stop', count = math.random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, --{{name = "express-loader", count = math.random(1,3)}, weight = 1, evolution_min = 0.5, evolution_max = 1}, --{{name = "fast-loader", count = math.random(1,3)}, weight = 1, evolution_min = 0.2, evolution_max = 0.7}, --{{name = "loader", count = math.random(1,3)}, weight = 1, evolution_min = 0.0, evolution_max = 0.5}, - { { name = 'lab', count = math.random(1, 2) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'lab', count = math.random(1, 2) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, --{{name = "roboport", count = math.random(2,4)}, weight = 2, evolution_min = 0.6, evolution_max = 1}, --{{name = "flamethrower-turret", count = math.random(1,3)}, weight = 3, evolution_min = 0.5, evolution_max = 1}, --{{name = "laser-turret", count = math.random(4,8)}, weight = 3, evolution_min = 0.5, evolution_max = 1}, - { { name = 'gun-turret', count = math.random(2, 6) }, weight = 3, evolution_min = 0.2, evolution_max = 0.9 } + { { name = 'gun-turret', count = math.random(2, 6) }, weight = 3, evolution_min = 0.2, evolution_max = 0.9 } } distance_to_center = distance_to_center - spawn_dome_size @@ -588,7 +611,7 @@ local function treasure_chest(position, distance_to_center) distance_to_center = 1 end for _, t in pairs(chest_loot) do - for x = 1, t.weight, 1 do + for _ = 1, t.weight, 1 do if t.evolution_min <= distance_to_center and t.evolution_max >= distance_to_center then table.insert(chest_raffle, t[1]) end @@ -605,7 +628,7 @@ local function treasure_chest(position, distance_to_center) local e = game.surfaces['cave_miner'].create_entity({ name = n, position = position, force = 'player' }) e.minable = false local i = e.get_inventory(defines.inventory.chest) - for x = 1, math.random(3, 5), 1 do + for _ = 1, math.random(3, 5), 1 do local loot = chest_raffle[math.random(1, #chest_raffle)] i.insert(loot) end @@ -636,7 +659,7 @@ local function rare_treasure_chest(position) table.insert(rare_treasure_chest_loot_weights, { { name = 'destroyer-capsule', count = math.random(4, 8) }, 3 }) table.insert(rare_treasure_chest_loot_weights, { { name = 'atomic-bomb', count = 1 }, 1 }) for _, t in pairs(rare_treasure_chest_loot_weights) do - for x = 1, t[2], 1 do + for _ = 1, t[2], 1 do table.insert(rare_treasure_chest_raffle_table, t[1]) end end @@ -644,58 +667,59 @@ local function rare_treasure_chest(position) local e = game.surfaces[1].create_entity { name = 'steel-chest', position = p, force = 'player' } e.minable = false local i = e.get_inventory(defines.inventory.chest) - for x = 1, math.random(2, 3), 1 do + for _ = 1, math.random(2, 3), 1 do local loot = rare_treasure_chest_raffle_table[math.random(1, #rare_treasure_chest_raffle_table)] i.insert(loot) end end local function secret_shop(pos) - local secret_market_items = { - { price = { { 'raw-fish', math.random(250, 450) } }, offer = { type = 'give-item', item = 'combat-shotgun' } }, - { price = { { 'raw-fish', math.random(250, 450) } }, offer = { type = 'give-item', item = 'flamethrower' } }, - { price = { { 'raw-fish', math.random(75, 125) } }, offer = { type = 'give-item', item = 'rocket-launcher' } }, - { price = { { 'raw-fish', math.random(2, 4) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, - { price = { { 'raw-fish', math.random(8, 16) } }, offer = { type = 'give-item', item = 'uranium-rounds-magazine' } }, - { price = { { 'raw-fish', math.random(8, 16) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } }, - { price = { { 'raw-fish', math.random(6, 12) } }, offer = { type = 'give-item', item = 'flamethrower-ammo' } }, - { price = { { 'raw-fish', math.random(8, 16) } }, offer = { type = 'give-item', item = 'rocket' } }, - { price = { { 'raw-fish', math.random(10, 20) } }, offer = { type = 'give-item', item = 'explosive-rocket' } }, - { price = { { 'raw-fish', math.random(15, 30) } }, offer = { type = 'give-item', item = 'explosive-cannon-shell' } }, + local secret_market_items = + { + { price = { { name = 'raw-fish', count = math.random(250, 450) } }, offer = { type = 'give-item', item = 'combat-shotgun' } }, + { price = { { name = 'raw-fish', count = math.random(250, 450) } }, offer = { type = 'give-item', item = 'flamethrower' } }, + { price = { { name = 'raw-fish', count = math.random(75, 125) } }, offer = { type = 'give-item', item = 'rocket-launcher' } }, + { price = { { name = 'raw-fish', count = math.random(2, 4) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, + { price = { { name = 'raw-fish', count = math.random(8, 16) } }, offer = { type = 'give-item', item = 'uranium-rounds-magazine' } }, + { price = { { name = 'raw-fish', count = math.random(8, 16) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } }, + { price = { { name = 'raw-fish', count = math.random(6, 12) } }, offer = { type = 'give-item', item = 'flamethrower-ammo' } }, + { price = { { name = 'raw-fish', count = math.random(8, 16) } }, offer = { type = 'give-item', item = 'rocket' } }, + { price = { { name = 'raw-fish', count = math.random(10, 20) } }, offer = { type = 'give-item', item = 'explosive-rocket' } }, + { price = { { name = 'raw-fish', count = math.random(15, 30) } }, offer = { type = 'give-item', item = 'explosive-cannon-shell' } }, { - price = { { 'raw-fish', math.random(25, 35) } }, + price = { { name = 'raw-fish', count = math.random(25, 35) } }, offer = { type = 'give-item', item = 'explosive-uranium-cannon-shell' } }, - { price = { { 'raw-fish', math.random(20, 40) } }, offer = { type = 'give-item', item = 'cluster-grenade' } }, - { price = { { 'raw-fish', math.random(1, 3) } }, offer = { type = 'give-item', item = 'land-mine' } }, - { price = { { 'raw-fish', math.random(250, 500) } }, offer = { type = 'give-item', item = 'modular-armor' } }, - { price = { { 'raw-fish', math.random(1500, 3000) } }, offer = { type = 'give-item', item = 'power-armor' } }, - { price = { { 'raw-fish', math.random(15000, 20000) } }, offer = { type = 'give-item', item = 'power-armor-mk2' } }, + { price = { { name = 'raw-fish', count = math.random(20, 40) } }, offer = { type = 'give-item', item = 'cluster-grenade' } }, + { price = { { name = 'raw-fish', count = math.random(1, 3) } }, offer = { type = 'give-item', item = 'land-mine' } }, + { price = { { name = 'raw-fish', count = math.random(250, 500) } }, offer = { type = 'give-item', item = 'modular-armor' } }, + { price = { { name = 'raw-fish', count = math.random(1500, 3000) } }, offer = { type = 'give-item', item = 'power-armor' } }, + { price = { { name = 'raw-fish', count = math.random(15000, 20000) } }, offer = { type = 'give-item', item = 'power-armor-mk2' } }, { - price = { { 'raw-fish', math.random(4000, 7000) } }, - offer = { type = 'give-item', item = 'fusion-reactor-equipment' } + price = { { name = 'raw-fish', count = math.random(4000, 7000) } }, + offer = { type = 'give-item', item = 'fission-reactor-equipment' } }, - { price = { { 'raw-fish', math.random(50, 100) } }, offer = { type = 'give-item', item = 'battery-equipment' } }, - { price = { { 'raw-fish', math.random(700, 1100) } }, offer = { type = 'give-item', item = 'battery-mk2-equipment' } }, - { price = { { 'raw-fish', math.random(400, 700) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } }, + { price = { { name = 'raw-fish', count = math.random(50, 100) } }, offer = { type = 'give-item', item = 'battery-equipment' } }, + { price = { { name = 'raw-fish', count = math.random(700, 1100) } }, offer = { type = 'give-item', item = 'battery-mk2-equipment' } }, + { price = { { name = 'raw-fish', count = math.random(400, 700) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } }, { - price = { { 'raw-fish', math.random(12000, 16000) } }, + price = { { name = 'raw-fish', count = math.random(12000, 16000) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } }, - { price = { { 'raw-fish', math.random(300, 500) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } }, + { price = { { name = 'raw-fish', count = math.random(300, 500) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } }, { - price = { { 'raw-fish', math.random(350, 500) } }, + price = { { name = 'raw-fish', count = math.random(350, 500) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } }, - { price = { { 'raw-fish', math.random(25, 50) } }, offer = { type = 'give-item', item = 'construction-robot' } }, - { price = { { 'raw-fish', math.random(250, 450) } }, offer = { type = 'give-item', item = 'energy-shield-equipment' } }, + { price = { { name = 'raw-fish', count = math.random(25, 50) } }, offer = { type = 'give-item', item = 'construction-robot' } }, + { price = { { name = 'raw-fish', count = math.random(250, 450) } }, offer = { type = 'give-item', item = 'energy-shield-equipment' } }, { - price = { { 'raw-fish', math.random(350, 550) } }, + price = { { name = 'raw-fish', count = math.random(350, 550) } }, offer = { type = 'give-item', item = 'personal-laser-defense-equipment' } }, - { price = { { 'raw-fish', math.random(100, 175) } }, offer = { type = 'give-item', item = 'loader' } }, - { price = { { 'raw-fish', math.random(200, 350) } }, offer = { type = 'give-item', item = 'fast-loader' } }, - { price = { { 'raw-fish', math.random(400, 600) } }, offer = { type = 'give-item', item = 'express-loader' } } + { price = { { name = 'raw-fish', count = math.random(100, 175) } }, offer = { type = 'give-item', item = 'loader' } }, + { price = { { name = 'raw-fish', count = math.random(200, 350) } }, offer = { type = 'give-item', item = 'fast-loader' } }, + { price = { { name = 'raw-fish', count = math.random(400, 600) } }, offer = { type = 'give-item', item = 'express-loader' } } } secret_market_items = shuffle(secret_market_items) @@ -735,7 +759,6 @@ local function on_chunk_generated(event) local extra_tree_positions = {} local spawn_tree_positions = {} local tile_to_insert = false - local entity_has_been_placed = false local pos_x = 0 local pos_y = 0 local tile_distance_to_center = 0 @@ -752,9 +775,9 @@ local function on_chunk_generated(event) local m3 = 0.10 --07 for x = 0, 31, 1 do - for y = 0, 31, 1 do + for yv = 0, 31, 1 do pos_x = event.area.left_top.x + x - pos_y = event.area.left_top.y + y + pos_y = event.area.left_top.y + yv tile_distance_to_center = pos_x ^ 2 + pos_y ^ 2 noise[1] = simplex_noise(pos_x / 350, pos_y / 350, storage.noise_seed + current_noise_seed_add) @@ -867,10 +890,11 @@ local function on_chunk_generated(event) if math.random(1, 48) == 1 then local p = surface.find_non_colliding_position('crude-oil', { pos_x, pos_y }, 5, 1) if p then - surface.create_entity { + surface.create_entity + { name = 'crude-oil', position = p, - amount = math.floor(math.random(25000 + tile_distance_to_center * 0.5, 50000 + tile_distance_to_center), 0) + amount = math.floor(math.random(25000 + tile_distance_to_center * 0.5, 50000 + tile_distance_to_center)) } end end @@ -964,9 +988,9 @@ local function on_chunk_generated(event) for _, p in pairs(enemy_worm_positions) do if math.random(1, 300) == 1 then - local tile_distance_to_center = math.sqrt(p[1] ^ 2 + p[2] ^ 2) + tile_distance_to_center = math.sqrt(p[1] ^ 2 + p[2] ^ 2) if tile_distance_to_center > storage.worm_free_zone_radius then - local raffle_index = math.ceil((tile_distance_to_center - storage.worm_free_zone_radius) * 0.01, 0) + local raffle_index = math.ceil((tile_distance_to_center - storage.worm_free_zone_radius) * 0.01) if raffle_index < 1 then raffle_index = 1 end @@ -981,9 +1005,9 @@ local function on_chunk_generated(event) for _, p in pairs(enemy_can_place_worm_positions) do if math.random(1, 30) == 1 then - local tile_distance_to_center = math.sqrt(p[1] ^ 2 + p[2] ^ 2) + tile_distance_to_center = math.sqrt(p[1] ^ 2 + p[2] ^ 2) if tile_distance_to_center > storage.worm_free_zone_radius then - local raffle_index = math.ceil((tile_distance_to_center - storage.worm_free_zone_radius) * 0.01, 0) + local raffle_index = math.ceil((tile_distance_to_center - storage.worm_free_zone_radius) * 0.01) if raffle_index < 1 then raffle_index = 1 end @@ -1009,7 +1033,8 @@ local function on_chunk_generated(event) for _, p in pairs(secret_shop_locations) do if math.random(1, 10) == 1 then if - surface.count_entities_filtered { + surface.count_entities_filtered + { area = { { p[1] - 125, p[2] - 125 }, { p[1] + 125, p[2] + 125 } }, name = 'market', limit = 1 @@ -1060,7 +1085,8 @@ local function hunger_update(player, food_value) if past_hunger == 200 and storage.player_hunger[player.name] + food_value > 200 then storage.player_hunger[player.name] = player_hunger_spawn_value player.character.die('player') - local t = { + local t = + { ' ate too much and exploded.', ' should have gone on a diet.', ' needs to work on their bad eating habbits.', @@ -1102,7 +1128,7 @@ local function on_player_joined_game(event) local player = game.players[event.player_index] if not storage.cave_miner_init_done then surface.daytime = 0.5 - surface.freeze_daytime = 1 + surface.freeze_daytime = true game.forces['player'].technologies['landfill'].enabled = false game.forces['player'].technologies['night-vision-equipment'].enabled = false game.forces['player'].technologies['artillery-shell-range-1'].enabled = false @@ -1130,13 +1156,14 @@ local function on_player_joined_game(event) storage.biter_spawn_amount_weights[6] = { 2, 64 } storage.biter_spawn_amount_raffle = {} for _, t in pairs(storage.biter_spawn_amount_weights) do - for x = 1, t[2], 1 do + for _ = 1, t[2], 1 do table.insert(storage.biter_spawn_amount_raffle, t[1]) end end storage.rock_density = 62 ---- table.insert value up to 100 - storage.rock_raffle = { + storage.rock_raffle = + { 'big-sand-rock', 'big-sand-rock', 'big-rock', @@ -1169,7 +1196,7 @@ local function on_player_joined_game(event) storage.rock_mining_chance_weights[4] = { 'uranium-ore', 3 } storage.mining_raffle_table = {} for _, t in pairs(storage.rock_mining_chance_weights) do - for x = 1, t[2], 1 do + for _ = 1, t[2], 1 do table.insert(storage.mining_raffle_table, t[1]) end end @@ -1203,7 +1230,7 @@ local function spawn_cave_inhabitant(pos, target_position) end local surface = game.surfaces['cave_miner'] local tile_distance_to_center = math.sqrt(pos.x ^ 2 + pos.y ^ 2) - local rock_inhabitants_index = math.ceil((tile_distance_to_center - math.sqrt(spawn_dome_size)) * 0.015, 0) + local rock_inhabitants_index = math.ceil((tile_distance_to_center - math.sqrt(spawn_dome_size)) * 0.015) if rock_inhabitants_index < 1 then rock_inhabitants_index = 1 end @@ -1248,9 +1275,9 @@ local function find_first_entity_spiral_scan(pos, entities, range) pos.y = pos.y - 1 pos.x = pos.x - 1 for modifier = 1, -1, -2 do - for x = 1, z, 1 do + for _ = 1, z, 1 do pos.x = pos.x + modifier - local t = surface.get_tile(pos) + local t = surface.get_tile(pos.x, pos.y) if t.name == 'out-of-map' then out_of_map_count = out_of_map_count + 1 end @@ -1262,9 +1289,9 @@ local function find_first_entity_spiral_scan(pos, entities, range) return e[1].position end end - for y = 1, z, 1 do + for _ = 1, z, 1 do pos.y = pos.y + modifier - local t = surface.get_tile(pos) + local t = surface.get_tile(pos.x, pos.y) if t.name == 'out-of-map' then out_of_map_count = out_of_map_count + 1 end @@ -1306,12 +1333,12 @@ local function biter_attack_event() end end if #valid_positions > 1 then - for y = math.random(1, 2), #valid_positions, 2 do - if y > #valid_positions then + for yv = math.random(1, 2), #valid_positions, 2 do + if yv > #valid_positions then break end for x = 1, storage.biter_spawn_amount_raffle[math.random(1, #storage.biter_spawn_amount_raffle)], 1 do - table.insert(storage.biter_spawn_schedule, { game.tick + 20 * x, valid_positions[y] }) + table.insert(storage.biter_spawn_schedule, { game.tick + 20 * x, valid_positions[yv] }) end end end @@ -1324,7 +1351,7 @@ local function darkness_events() return end if storage.darkness_threat_level[p.name] > 4 then - for x = 1, 2 + storage.darkness_threat_level[p.name], 1 do + for _ = 1, 2 + storage.darkness_threat_level[p.name], 1 do spawn_cave_inhabitant(p.position) end local biters_found = p.surface.find_enemy_units(p.position, 12, 'player') @@ -1358,7 +1385,8 @@ local function darkness_checks() storage.darkness_threat_level[p.name] = 0 else local light_source_entities = - p.surface.find_entities_filtered { + p.surface.find_entities_filtered + { area = { { p.position.x - 12, p.position.y - 12 }, { p.position.x + 12, p.position.y + 12 } }, name = 'small-lamp' } @@ -1381,7 +1409,8 @@ local function darkness_checks() end end -local healing_amount = { +local healing_amount = +{ ['big-rock'] = 4, ['big-sand-rock'] = 4, ['huge-rock'] = 16 @@ -1402,14 +1431,14 @@ local function heal_rocks() end local function on_tick() - local storage = {} + local content = {} if game.tick % 30 == 0 then - if storage.biter_spawn_schedule then - for x = 1, #storage.biter_spawn_schedule, 1 do - if storage.biter_spawn_schedule[x] then - if game.tick >= storage.biter_spawn_schedule[x][1] then - local pos = { x = storage.biter_spawn_schedule[x][2].x, y = storage.biter_spawn_schedule[x][2].y } - storage.biter_spawn_schedule[x] = nil + if content.biter_spawn_schedule then + for x = 1, #content.biter_spawn_schedule, 1 do + if content.biter_spawn_schedule[x] then + if game.tick >= content.biter_spawn_schedule[x][1] then + local pos = { x = content.biter_spawn_schedule[x][2].x, y = content.biter_spawn_schedule[x][2].y } + content.biter_spawn_schedule[x] = nil spawn_cave_inhabitant(pos) end end @@ -1439,14 +1468,18 @@ local function on_tick() if game.tick == 150 then local surface = game.surfaces['cave_miner'] local p = game.surfaces['cave_miner'].find_non_colliding_position('market', { 0, -15 }, 60, 2) - local x = game.surfaces['cave_miner'].find_non_colliding_position('player-port', { -5, -15 }, 60, 2) - local o = game.surfaces['cave_miner'].find_non_colliding_position('player-port', { 5, -25 }, 60, 2) + local x = game.surfaces['cave_miner'].find_non_colliding_position('market', { -5, -15 }, 60, 2) + local o = game.surfaces['cave_miner'].find_non_colliding_position('market', { 5, -25 }, 60, 2) storage.market = surface.create_entity { name = 'market', position = p } - storage.surface_cave_elevator = surface.create_entity { name = 'player-port', position = x, force = game.forces.neutral } - storage.surface_cave_chest = Module.create_chest(surface, o, storage) + surface.set_tiles({ { name = 'tutorial-grid', position = { x.x, x.y } } }) + surface.set_tiles({ { name = 'tutorial-grid', position = { x.x, x.y + 1 } } }) + surface.set_tiles({ { name = 'tutorial-grid', position = { x.x + 1, x.y } } }) + surface.set_tiles({ { name = 'tutorial-grid', position = { x.x + 1, x.y + 1 } } }) + storage.surface_cave_chest = Module.create_chest(surface, o, content) - rendering.draw_text { + rendering.draw_text + { text = 'Storage', surface = surface, target = storage.surface_cave_chest, @@ -1455,16 +1488,18 @@ local function on_tick() alignment = 'center' } - rendering.draw_text { + rendering.draw_text + { text = 'Elevator', surface = surface, - target = storage.surface_cave_elevator, + target = { x.x, x.y }, target_offset = { 0, 1 }, color = { r = 0.98, g = 0.66, b = 0.22 }, alignment = 'center' } - rendering.draw_text { + rendering.draw_text + { text = 'Market', surface = surface, target = storage.market, @@ -1476,8 +1511,6 @@ local function on_tick() storage.market.destructible = false storage.surface_cave_chest.minable = false storage.surface_cave_chest.destructible = false - storage.surface_cave_elevator.minable = false - storage.surface_cave_elevator.destructible = false if enable_fishbank_terminal then storage.market.add_market_item({ price = {}, offer = { type = 'nothing', effect_description = 'Deposit Fish' } }) @@ -1492,7 +1525,8 @@ local function on_tick() end end -local disabled_for_deconstruction = { +local disabled_for_deconstruction = +{ ['fish'] = true, ['huge-rock'] = true, ['big-rock'] = true, @@ -1507,7 +1541,8 @@ local function on_marked_for_deconstruction(event) end end -local treasure_chest_messages = { +local treasure_chest_messages = +{ "You notice an old crate within the rubble. It's filled with treasure!", "You find a chest underneath the broken rocks. It's filled with goodies!", 'We has found the precious!' @@ -1528,7 +1563,7 @@ local function pre_player_mined_item(event) end if event.entity.type == 'tree' then - surface.spill_item_stack(player.position, { name = 'raw-fish', count = math.random(1, 2) }, true) + surface.spill_item_stack { position = player.position, stack = { name = 'raw-fish', count = math.random(1, 2) }, enable_looted = true } end if event.entity.name == 'huge-rock' or event.entity.name == 'big-rock' or event.entity.name == 'big-sand-rock' then @@ -1549,8 +1584,8 @@ local function pre_player_mined_item(event) hunger_update(player, -1) end - surface.spill_item_stack(player.position, { name = 'raw-fish', count = math.random(3, 4) }, true) - local bonus_amount = math.floor((tile_distance_to_center - math.sqrt(spawn_dome_size)) * 0.10, 0) + surface.spill_item_stack { position = player.position, stack = { name = 'raw-fish', count = math.random(3, 4) }, enable_looted = true } + local bonus_amount = math.floor((tile_distance_to_center - math.sqrt(spawn_dome_size)) * 0.10) if bonus_amount < 1 then bonus_amount = 0 end @@ -1567,38 +1602,37 @@ local function pre_player_mined_item(event) local mined_loot = storage.mining_raffle_table[math.random(1, #storage.mining_raffle_table)] - surface.create_entity( + + player.create_local_flying_text( { - name = 'flying-text', position = rock_position, text = '+' .. amount .. ' [img=item/' .. mined_loot .. ']', color = { r = 0.98, g = 0.66, b = 0.22 } } ) - --surface.create_entity({name = "flying-text", position = rock_position, text = amount .. " " .. ore_floaty_texts[mined_loot][1], color = ore_floaty_texts[mined_loot][2]}) if amount > storage.ore_spill_cap then - surface.spill_item_stack(rock_position, { name = mined_loot, count = storage.ore_spill_cap }, true) + surface.spill_item_stack { position = rock_position, stack = { name = mined_loot, count = storage.ore_spill_cap }, enable_looted = true } amount = amount - storage.ore_spill_cap local i = player.insert { name = mined_loot, count = amount } amount = amount - i if amount > 0 then - surface.spill_item_stack(rock_position, { name = mined_loot, count = amount }, true) + surface.spill_item_stack { position = rock_position, stack = { name = mined_loot, count = amount }, enable_looted = true } end else - surface.spill_item_stack(rock_position, { name = mined_loot, count = amount }, true) + surface.spill_item_stack { position = rock_position, stack = { name = mined_loot, count = amount }, enable_looted = true } end if amount_of_stone > storage.ore_spill_cap then - surface.spill_item_stack(rock_position, { name = 'stone', count = storage.ore_spill_cap }, true) + surface.spill_item_stack { position = rock_position, stack = { name = 'stone', count = storage.ore_spill_cap }, enable_looted = true } amount_of_stone = amount_of_stone - storage.ore_spill_cap local i = player.insert { name = 'stone', count = amount_of_stone } amount_of_stone = amount_of_stone - i if amount_of_stone > 0 then - surface.spill_item_stack(rock_position, { name = 'stone', count = amount_of_stone }, true) + surface.spill_item_stack { position = rock_position, stack = { name = 'stone', count = amount_of_stone }, enable_looted = true } end else - surface.spill_item_stack(rock_position, { name = 'stone', count = amount_of_stone }, true) + surface.spill_item_stack { position = rock_position, stack = { name = 'stone', count = amount_of_stone }, enable_looted = true } end storage.stats_rocks_broken = storage.stats_rocks_broken + 1 @@ -1606,11 +1640,12 @@ local function pre_player_mined_item(event) if math.random(1, 32) == 1 then local p = { x = rock_position.x, y = rock_position.y } - local tile_distance_to_center = p.x ^ 2 + p.y ^ 2 + tile_distance_to_center = p.x ^ 2 + p.y ^ 2 if tile_distance_to_center > spawn_dome_size + 100 then local radius = 32 if - surface.count_entities_filtered { + surface.count_entities_filtered + { area = { { p.x - radius, p.y - radius }, { p.x + radius, p.y + radius } }, type = 'resource', limit = 1 @@ -1618,7 +1653,8 @@ local function pre_player_mined_item(event) then local size_raffle = { { 'huge', 33, 42 }, { 'big', 17, 32 }, { '', 8, 16 }, { 'tiny', 3, 7 } } local size = size_raffle[math.random(1, #size_raffle)] - local ore_prints = { + local ore_prints = + { coal = { 'dark', 'Coal' }, ['iron-ore'] = { 'shiny', 'Iron' }, ['copper-ore'] = { 'glimmering', 'Copper' }, @@ -1633,8 +1669,8 @@ local function pre_player_mined_item(event) local ore_entities_placed = 0 local modifier_raffle = { { 0, -1 }, { -1, 0 }, { 1, 0 }, { 0, 1 } } while ore_entities_placed < math.random(size[2], size[3]) do - local a = math.ceil((math.random(tile_distance_to_center * 4, tile_distance_to_center * 5)) / 1 + ore_entities_placed * 0.5, 0) - for x = 1, 150, 1 do + local a = math.ceil((math.random(tile_distance_to_center * 4, tile_distance_to_center * 5)) / 1 + ore_entities_placed * 0.5) + for _ = 1, 150, 1 do local m = modifier_raffle[math.random(1, #modifier_raffle)] local pos = { x = p.x + m[1], y = p.y + m[2] } if surface.can_place_entity({ name = mined_loot, position = pos, amount = a }) then @@ -1669,7 +1705,8 @@ local function on_player_mined_entity(event) if health > 200 then player.print('You got bitten by an angry cave piranha.', { r = 0.75, g = 0.0, b = 0.0 }) else - local messages = { + local messages = + { 'Ouch.. That hurt! Better be careful now.', 'Just a fleshwound.', 'Better keep those hands to yourself or you might loose them.' @@ -1682,7 +1719,6 @@ local function on_player_mined_entity(event) end local function on_entity_damaged(event) - local entity = event.entity if not event.entity.valid then return end @@ -1704,7 +1740,8 @@ local function on_entity_damaged(event) rock_is_alive = false end if rock_is_alive then - storage.damaged_rocks[tostring(event.entity.position.x) .. tostring(event.entity.position.y)] = { + storage.damaged_rocks[tostring(event.entity.position.x) .. tostring(event.entity.position.y)] = + { last_damage = game.tick, entity = event.entity } @@ -1721,11 +1758,11 @@ local function on_entity_damaged(event) local p = { x = event.entity.position.x, y = event.entity.position.y } local drop_amount = math.random(4, 8) event.entity.destroy() - game.surfaces['cave_miner'].spill_item_stack(p, { name = 'stone', count = drop_amount }, true) + game.surfaces['cave_miner'].spill_item_stack { position = p, stack = { name = 'stone', count = drop_amount }, enable_looted = true } local drop_amount_ore = math.random(16, 32) local ore = storage.mining_raffle_table[math.random(1, #storage.mining_raffle_table)] - game.surfaces['cave_miner'].spill_item_stack(p, { name = ore, count = drop_amount_ore }, true) + game.surfaces['cave_miner'].spill_item_stack { position = p, stack = { name = ore, count = drop_amount_ore }, enable_looted = true } storage.stats_rocks_broken = storage.stats_rocks_broken + 1 storage.stats_ores_found = storage.stats_ores_found + drop_amount + drop_amount_ore @@ -1817,7 +1854,8 @@ local function changed_surface(event) player.print('Hungry? Take a look at our market offers! No questions asked.', { r = 0.10, g = 0.75, b = 0.5 }) end -local bank_messages = { +local bank_messages = +{ 'Caves are dangerous. Did you hear about our insurance programs?', 'Get your wealth flowing today with Fishbank!', 'Hungry? Take a look at our credit offers! No questions asked.', @@ -1856,9 +1894,8 @@ local function on_market_item_purchased(event) storage.fish_bank[player.name] = storage.fish_bank[player.name] + fish_removed player.print(fish_removed .. ' Fish deposited into your account. Your balance is ' .. storage.fish_bank[player.name] .. '.', { r = 0.10, g = 0.75, b = 0.5 }) player.print(bank_messages[math.random(1, #bank_messages)], { r = 0.77, g = 0.77, b = 0.77 }) - player.surface.create_entity( + player.create_local_flying_text( { - name = 'flying-text', position = player.position, text = tostring(fish_removed .. ' Fish deposited'), color = { r = 0.10, g = 0.75, b = 0.5 } @@ -1875,7 +1912,7 @@ local function on_market_item_purchased(event) local requested_withdraw_amount = 500 local fee = 10 if storage.fish_bank[player.name] < requested_withdraw_amount + fee then - fee = math.ceil(storage.fish_bank[player.name] * 0.01, 0) + fee = math.ceil(storage.fish_bank[player.name] * 0.01) if storage.fish_bank[player.name] < 10 then fee = 0 end @@ -1889,9 +1926,8 @@ local function on_market_item_purchased(event) storage.fish_bank[player.name] = storage.fish_bank[player.name] - (fish_withdrawn + fee) player.print(fish_withdrawn .. ' Fish withdrawn from your account. Your balance is ' .. storage.fish_bank[player.name] .. '.', { r = 0.10, g = 0.75, b = 0.5 }) player.print(bank_messages[math.random(1, #bank_messages)], { r = 0.77, g = 0.77, b = 0.77 }) - player.surface.create_entity( + player.create_local_flying_text( { - name = 'flying-text', position = player.position, text = tostring(fish_withdrawn .. ' Fish withdrawn'), color = { r = 0.10, g = 0.75, b = 0.5 } @@ -1907,7 +1943,6 @@ end local function disable_tech() game.forces.player.technologies['spidertron'].enabled = false game.forces.player.technologies['spidertron'].researched = false - game.forces.player.technologies['optics'].researched = true game.forces.player.technologies['artillery'].researched = false game.forces.player.technologies['atomic-bomb'].enabled = false end diff --git a/maps/cave_choppy/player_elevator.lua b/maps/cave_choppy/player_elevator.lua index cb38fe97f..5c9680449 100644 --- a/maps/cave_choppy/player_elevator.lua +++ b/maps/cave_choppy/player_elevator.lua @@ -30,9 +30,9 @@ Global.register( chests = chests, inventories = inventories }, - function (global) - chests = storage.chests - inventories = storage.inventories + function (tbl) + chests = tbl.chests + inventories = tbl.inventories end ) @@ -40,8 +40,8 @@ Global.register( { cooldowns = cooldowns }, - function (global) - cooldowns = storage.cooldowns + function (tbl) + cooldowns = tbl.cooldowns end ) @@ -57,13 +57,12 @@ local function check_player_ports() --if cooldowns[player.name] - game.tick > 0 then goto continue end - if player.surface.find_entity('player-port', player.position) then + if player.surface.get_tile(player.position.x, player.position.y).name == 'tutorial-grid' then if cooldowns[player.name] > game.tick then player.play_sound { path = 'utility/armor_insert', volume_modifier = 1 } if math.random(1, 3) == 1 then - player.surface.create_entity( + player.create_local_flying_text( { - name = 'flying-text', position = player.position, text = math.ceil((cooldowns[tostring(player.name)] - game.tick) / 60), color = { r = math.random(130, 170), g = math.random(130, 170), b = 130 } @@ -73,7 +72,7 @@ local function check_player_ports() goto continue end local surface_name = player.surface.name == 'cave_miner' and 'choppy' or 'cave_miner' - local pos = surface_name == 'cave_miner' and storage.surface_cave_elevator.position or { 1, -4 } + local pos = surface_name == 'cave_miner' and { 1, -4 } or { 1, -4 } local safe_pos = game.surfaces[surface_name].find_non_colliding_position('character', pos, 20, 1) if safe_pos then player.teleport(safe_pos, surface_name) @@ -86,19 +85,6 @@ local function check_player_ports() end end -local function built_entity(event) - local entity = event.entity - if not entity or not entity.valid then - return - end - if entity.name ~= 'player-port' then - return - end - - entity.minable = false - entity.destructible = false - entity.operable = false -end local function tick() if not chests['cave_miner'] then @@ -124,26 +110,26 @@ local function tick() local ci = civ.get_contents() local oi = oiv.get_contents() - for item, count in pairs(ci) do - local count2 = oi[item] or 0 - local diff = count - count2 + for _, data in pairs(ci) do + local count2 = oi[data.name] or 0 + local diff = data.count - count2 if diff > 1 then - local count2 = oiv.insert { name = item, count = math.floor(diff / 2) } + count2 = oiv.insert { name = data.name, count = math.floor(diff / 2) } if count2 > 0 then - civ.remove { name = item, count = count2 } + civ.remove { name = data.name, count = count2 } end elseif diff < -1 then - local count2 = civ.insert { name = item, count = math.floor(-diff / 2) } + count2 = civ.insert { name = data.name, count = math.floor(-diff / 2) } if count2 > 0 then - oiv.remove { name = item, count = count2 } + oiv.remove { name = data.name, count = count2 } end end end - for item, count in pairs(oi) do - if count > 1 and not ci[item] then - local count2 = civ.insert { name = item, count = math.floor(count / 2) } + for _, data in pairs(oi) do + if data.count > 1 and not ci[data.name] then + local count2 = civ.insert { name = data.name, count = math.floor(data.count / 2) } if count2 > 0 then - oiv.remove { name = item, count = count2 } + oiv.remove { name = data.name, count = count2 } end end end @@ -151,4 +137,3 @@ end Event.add(defines.events.on_tick, tick) Event.on_nth_tick(60, check_player_ports) -Event.add(defines.events.on_built_entity, built_entity) diff --git a/maps/cave_miner.lua b/maps/cave_miner.lua index 2b2333022..4b70b3d06 100644 --- a/maps/cave_miner.lua +++ b/maps/cave_miner.lua @@ -1,6 +1,11 @@ --luacheck: ignore -- Cave Miner -- mewmew made this -- + +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + require 'modules.rocks_heal_over_time' require 'modules.rocks_broken_paint_tiles' require 'modules.rocks_yield_ore_veins' @@ -9,6 +14,8 @@ require 'modules.satellite_score' require 'modules.spawners_contain_biters' require 'modules.biter_noms_you' require 'modules.rpg' +local Map = require 'modules.map_info' +local Event = require 'utils.event' local Hunger = require 'modules.hunger' local enable_fishbank_terminal = false @@ -18,7 +25,8 @@ local math_random = math.random local spawn_dome_size = 10000 -local darkness_messages = { +local darkness_messages = +{ 'Something is lurking in the dark...', 'A shadow moves. I doubt it is friendly...', 'The silence grows louder...', @@ -31,13 +39,15 @@ local darkness_messages = { 'You feel like, something is watching you...' } -local rocks = { +local rocks = +{ ['big-rock'] = true, ['huge-rock'] = true, ['big-sand-rock'] = true } -local rock_inhabitants = { +local rock_inhabitants = +{ [1] = { 'small-biter' }, [2] = { 'small-biter', 'small-biter', 'small-biter', 'small-biter', 'small-biter', 'medium-biter' }, [3] = { 'small-biter', 'small-biter', 'small-biter', 'small-biter', 'medium-biter', 'medium-biter' }, @@ -60,7 +70,8 @@ local rock_inhabitants = { [20] = { 'behemoth-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-spitter', 'behemoth-spitter' } } -local worm_raffle_table = { +local worm_raffle_table = +{ [1] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret' }, [2] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret' }, [3] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret', 'medium-worm-turret' }, @@ -92,38 +103,6 @@ local function create_cave_miner_button(player) b.style.padding = 1 end -local function create_cave_miner_info(player) - local frame = player.gui.left.add { type = 'frame', name = 'cave_miner_info', direction = 'vertical' } - local t = frame.add { type = 'table', column_count = 1 } - - local tt = t.add { type = 'table', column_count = 3 } - local l = tt.add { type = 'label', caption = ' --Cave Miner-- ' } - l.style.font = 'default-game' - l.style.font_color = { r = 0.6, g = 0.3, b = 0.99 } - l.style.top_padding = 6 - l.style.bottom_padding = 6 - - local l = tt.add { type = 'label', caption = ' *diggy diggy hole* ' } - l.style.font = 'default' - l.style.font_color = { r = 0.99, g = 0.99, b = 0.2 } - l.style.minimal_width = 340 - - local b = tt.add { type = 'button', caption = 'X', name = 'close_cave_miner_info', align = 'right' } - b.style.font = 'default' - b.style.minimal_height = 30 - b.style.minimal_width = 30 - b.style.top_padding = 2 - b.style.left_padding = 4 - b.style.right_padding = 4 - b.style.bottom_padding = 2 - - local tt = t.add { type = 'table', column_count = 1 } - local frame = t.add { type = 'frame' } - local l = frame.add { type = 'label', caption = storage.cave_miner_map_info } - l.style.single_line = false - l.style.font_color = { r = 0.95, g = 0.95, b = 0.95 } -end - local function create_cave_miner_stats_gui(player) if not player.character then return @@ -133,29 +112,32 @@ local function create_cave_miner_stats_gui(player) end local captions = {} - local caption_style = { - { 'font', 'default-bold' }, - { 'font_color', { r = 0.63, g = 0.63, b = 0.63 } }, - { 'top_padding', 2 }, - { 'left_padding', 0 }, + local caption_style = + { + { 'font', 'default-bold' }, + { 'font_color', { r = 0.63, g = 0.63, b = 0.63 } }, + { 'top_padding', 2 }, + { 'left_padding', 0 }, { 'right_padding', 0 }, { 'minimal_width', 0 } } local stat_numbers = {} - local stat_number_style = { - { 'font', 'default-bold' }, - { 'font_color', { r = 0.77, g = 0.77, b = 0.77 } }, - { 'top_padding', 2 }, - { 'left_padding', 0 }, + local stat_number_style = + { + { 'font', 'default-bold' }, + { 'font_color', { r = 0.77, g = 0.77, b = 0.77 } }, + { 'top_padding', 2 }, + { 'left_padding', 0 }, { 'right_padding', 0 }, { 'minimal_width', 0 } } local separators = {} - local separator_style = { - { 'font', 'default-bold' }, - { 'font_color', { r = 0.15, g = 0.15, b = 0.89 } }, - { 'top_padding', 2 }, - { 'left_padding', 2 }, + local separator_style = + { + { 'font', 'default-bold' }, + { 'font_color', { r = 0.15, g = 0.15, b = 0.89 } }, + { 'top_padding', 2 }, + { 'left_padding', 2 }, { 'right_padding', 2 }, { 'minimal_width', 0 } } @@ -194,7 +176,7 @@ local function create_cave_miner_stats_gui(player) separators[3] = t.add { type = 'label', caption = '|' } captions[5] = t.add { type = 'label', caption = 'Fortune' } - local str = '+' + str = '+' str = str .. tostring(game.forces.player.mining_drill_productivity_bonus * 100) str = str .. '%' stat_numbers[4] = t.add { type = 'label', caption = str } @@ -231,132 +213,133 @@ end local function treasure_chest(position, distance_to_center) local chest_raffle = {} - local chest_loot = { + local chest_loot = + { --{{name = "steel-axe", count = math_random(1,3)}, weight = 2, evolution_min = 0.0, evolution_max = 0.5}, - { { name = 'submachine-gun', count = math_random(1, 3) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'slowdown-capsule', count = math_random(16, 32) }, weight = 1, evolution_min = 0.3, evolution_max = 0.7 }, - { { name = 'poison-capsule', count = math_random(16, 32) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.7 }, - { { name = 'explosive-uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'explosive-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.8 }, - { { name = 'shotgun', count = 1 }, weight = 2, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'shotgun-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'combat-shotgun', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'piercing-shotgun-shell', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'flamethrower', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, - { { name = 'flamethrower-ammo', count = math_random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'rocket-launcher', count = 1 }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'rocket', count = math_random(16, 32) }, weight = 5, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'explosive-rocket', count = math_random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'land-mine', count = math_random(16, 32) }, weight = 5, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'grenade', count = math_random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.5 }, - { { name = 'cluster-grenade', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'firearm-magazine', count = math_random(32, 128) }, weight = 5, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'piercing-rounds-magazine', count = math_random(32, 128) }, weight = 5, evolution_min = 0.1, evolution_max = 0.8 }, - { { name = 'uranium-rounds-magazine', count = math_random(32, 128) }, weight = 5, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'defender-capsule', count = math_random(8, 16) }, weight = 2, evolution_min = 0.0, evolution_max = 0.7 }, - { { name = 'distractor-capsule', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'destroyer-capsule', count = math_random(8, 16) }, weight = 2, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'submachine-gun', count = math_random(1, 3) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'slowdown-capsule', count = math_random(16, 32) }, weight = 1, evolution_min = 0.3, evolution_max = 0.7 }, + { { name = 'poison-capsule', count = math_random(16, 32) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.7 }, + { { name = 'explosive-uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'explosive-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.8 }, + { { name = 'shotgun', count = 1 }, weight = 2, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'shotgun-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'combat-shotgun', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'piercing-shotgun-shell', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'flamethrower', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, + { { name = 'flamethrower-ammo', count = math_random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'rocket-launcher', count = 1 }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'rocket', count = math_random(16, 32) }, weight = 5, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'explosive-rocket', count = math_random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'land-mine', count = math_random(16, 32) }, weight = 5, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'grenade', count = math_random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.5 }, + { { name = 'cluster-grenade', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'firearm-magazine', count = math_random(32, 128) }, weight = 5, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'piercing-rounds-magazine', count = math_random(32, 128) }, weight = 5, evolution_min = 0.1, evolution_max = 0.8 }, + { { name = 'uranium-rounds-magazine', count = math_random(32, 128) }, weight = 5, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'defender-capsule', count = math_random(8, 16) }, weight = 2, evolution_min = 0.0, evolution_max = 0.7 }, + { { name = 'distractor-capsule', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'destroyer-capsule', count = math_random(8, 16) }, weight = 2, evolution_min = 0.3, evolution_max = 1 }, --{{name = "atomic-bomb", count = math_random(8,16)}, weight = 1, evolution_min = 0.3, evolution_max = 1}, - { { name = 'light-armor', count = 1 }, weight = 3, evolution_min = 0, evolution_max = 0.1 }, - { { name = 'heavy-armor', count = 1 }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'modular-armor', count = 1 }, weight = 2, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'power-armor', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'light-armor', count = 1 }, weight = 3, evolution_min = 0, evolution_max = 0.1 }, + { { name = 'heavy-armor', count = 1 }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'modular-armor', count = 1 }, weight = 2, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'power-armor', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, --{{name = "power-armor-mk2", count = 1}, weight = 1, evolution_min = 0.9, evolution_max = 1}, - { { name = 'battery-equipment', count = 1 }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, - { { name = 'battery-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'belt-immunity-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'battery-equipment', count = 1 }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, + { { name = 'battery-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'belt-immunity-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, --{{name = "solar-panel-equipment", count = math_random(1,4)}, weight = 5, evolution_min = 0.3, evolution_max = 0.8}, - { { name = 'discharge-defense-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 0.8 }, - { { name = 'energy-shield-equipment', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'energy-shield-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'fusion-reactor-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'discharge-defense-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 0.8 }, + { { name = 'energy-shield-equipment', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'energy-shield-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'fission-reactor-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, --{{name = "night-vision-equipment", count = 1}, weight = 1, evolution_min = 0.3, evolution_max = 0.8}, - { { name = 'personal-laser-defense-equipment', count = 1 }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'iron-gear-wheel', count = math_random(80, 100) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'copper-cable', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'electric-engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.4, evolution_max = 0.8 }, - { { name = 'battery', count = math_random(50, 150) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'advanced-circuit', count = math_random(50, 150) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'electronic-circuit', count = math_random(50, 150) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'processing-unit', count = math_random(50, 150) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'explosives', count = math_random(40, 50) }, weight = 10, evolution_min = 0.0, evolution_max = 1 }, - { { name = 'lubricant-barrel', count = math_random(4, 10) }, weight = 1, evolution_min = 0.3, evolution_max = 0.5 }, - { { name = 'rocket-fuel', count = math_random(4, 10) }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, - { { name = 'steel-plate', count = math_random(25, 75) }, weight = 2, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'nuclear-fuel', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'burner-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'long-handed-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'fast-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 1, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'small-electric-pole', count = math_random(16, 24) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'medium-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'big-electric-pole', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'substation', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'wooden-chest', count = math_random(16, 24) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'iron-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 0.4 }, - { { name = 'steel-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'small-lamp', count = math_random(16, 32) }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'rail', count = math_random(25, 75) }, weight = 3, evolution_min = 0.1, evolution_max = 0.6 }, - { { name = 'assembling-machine-1', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'assembling-machine-2', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'assembling-machine-3', count = math_random(1, 2) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'accumulator', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'offshore-pump', count = math_random(1, 3) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'beacon', count = math_random(1, 2) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'boiler', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'steam-engine', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.5 }, - { { name = 'steam-turbine', count = math_random(1, 2) }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'personal-laser-defense-equipment', count = 1 }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'iron-gear-wheel', count = math_random(80, 100) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'copper-cable', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'electric-engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.4, evolution_max = 0.8 }, + { { name = 'battery', count = math_random(50, 150) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'advanced-circuit', count = math_random(50, 150) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'electronic-circuit', count = math_random(50, 150) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, + { { name = 'processing-unit', count = math_random(50, 150) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'explosives', count = math_random(40, 50) }, weight = 10, evolution_min = 0.0, evolution_max = 1 }, + { { name = 'lubricant-barrel', count = math_random(4, 10) }, weight = 1, evolution_min = 0.3, evolution_max = 0.5 }, + { { name = 'rocket-fuel', count = math_random(4, 10) }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, + { { name = 'steel-plate', count = math_random(25, 75) }, weight = 2, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'nuclear-fuel', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'burner-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, + { { name = 'long-handed-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, + { { name = 'fast-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 1, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'small-electric-pole', count = math_random(16, 24) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'medium-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'big-electric-pole', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'substation', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'wooden-chest', count = math_random(16, 24) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'iron-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 0.4 }, + { { name = 'steel-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'small-lamp', count = math_random(16, 32) }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'rail', count = math_random(25, 75) }, weight = 3, evolution_min = 0.1, evolution_max = 0.6 }, + { { name = 'assembling-machine-1', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'assembling-machine-2', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.8 }, + { { name = 'assembling-machine-3', count = math_random(1, 2) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'accumulator', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'offshore-pump', count = math_random(1, 3) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'beacon', count = math_random(1, 2) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'boiler', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'steam-engine', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.5 }, + { { name = 'steam-turbine', count = math_random(1, 2) }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, --{{name = "nuclear-reactor", count = 1}, weight = 1, evolution_min = 0.6, evolution_max = 1}, - { { name = 'centrifuge', count = math_random(1, 2) }, weight = 1, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'heat-pipe', count = math_random(4, 8) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'heat-exchanger', count = math_random(2, 4) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'arithmetic-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'constant-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'decider-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'power-switch', count = math_random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'programmable-speaker', count = math_random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'chemical-plant', count = math_random(1, 3) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'burner-mining-drill', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'electric-mining-drill', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'express-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'express-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'express-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'fast-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'fast-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'fast-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.3 }, - { { name = 'transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'centrifuge', count = math_random(1, 2) }, weight = 1, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'heat-pipe', count = math_random(4, 8) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'heat-exchanger', count = math_random(2, 4) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'arithmetic-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'constant-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'decider-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'power-switch', count = math_random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'programmable-speaker', count = math_random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'chemical-plant', count = math_random(1, 3) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'burner-mining-drill', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'electric-mining-drill', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'express-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'express-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'express-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'fast-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'fast-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'fast-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.3 }, + { { name = 'transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, --{{name = "oil-refinery", count = math_random(2,4)}, weight = 2, evolution_min = 0.3, evolution_max = 1}, - { { name = 'pipe', count = math_random(30, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'pipe-to-ground', count = math_random(4, 8) }, weight = 1, evolution_min = 0.2, evolution_max = 0.5 }, - { { name = 'pumpjack', count = math_random(1, 3) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'pump', count = math_random(1, 2) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'pipe', count = math_random(30, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'pipe-to-ground', count = math_random(4, 8) }, weight = 1, evolution_min = 0.2, evolution_max = 0.5 }, + { { name = 'pumpjack', count = math_random(1, 3) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'pump', count = math_random(1, 2) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, --{{name = "solar-panel", count = math_random(8,16)}, weight = 3, evolution_min = 0.4, evolution_max = 0.9}, - { { name = 'electric-furnace', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'steel-furnace', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'stone-furnace', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'radar', count = math_random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'rail-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'rail-chain-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'stone-wall', count = math_random(25, 75) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'gate', count = math_random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'storage-tank', count = math_random(1, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, - { { name = 'train-stop', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'electric-furnace', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'steel-furnace', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'stone-furnace', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'radar', count = math_random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'rail-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, + { { name = 'rail-chain-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, + { { name = 'stone-wall', count = math_random(25, 75) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'gate', count = math_random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'storage-tank', count = math_random(1, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, + { { name = 'train-stop', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, --{{name = "express-loader", count = math_random(1,3)}, weight = 1, evolution_min = 0.5, evolution_max = 1}, --{{name = "fast-loader", count = math_random(1,3)}, weight = 1, evolution_min = 0.2, evolution_max = 0.7}, --{{name = "loader", count = math_random(1,3)}, weight = 1, evolution_min = 0.0, evolution_max = 0.5}, - { { name = 'lab', count = math_random(1, 2) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'lab', count = math_random(1, 2) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, --{{name = "roboport", count = math_random(2,4)}, weight = 2, evolution_min = 0.6, evolution_max = 1}, --{{name = "flamethrower-turret", count = math_random(1,3)}, weight = 3, evolution_min = 0.5, evolution_max = 1}, --{{name = "laser-turret", count = math_random(4,8)}, weight = 3, evolution_min = 0.5, evolution_max = 1}, - { { name = 'gun-turret', count = math_random(2, 6) }, weight = 3, evolution_min = 0.2, evolution_max = 0.9 } + { { name = 'gun-turret', count = math_random(2, 6) }, weight = 3, evolution_min = 0.2, evolution_max = 0.9 } } distance_to_center = distance_to_center - spawn_dome_size @@ -369,7 +352,7 @@ local function treasure_chest(position, distance_to_center) distance_to_center = 1 end for _, t in pairs(chest_loot) do - for x = 1, t.weight, 1 do + for _ = 1, t.weight, 1 do if t.evolution_min <= distance_to_center and t.evolution_max >= distance_to_center then table.insert(chest_raffle, t[1]) end @@ -386,7 +369,7 @@ local function treasure_chest(position, distance_to_center) local e = game.surfaces[1].create_entity({ name = n, position = position, force = 'neutral' }) e.minable = false local i = e.get_inventory(defines.inventory.chest) - for x = 1, math_random(3, 5), 1 do + for _ = 1, math_random(3, 5), 1 do local loot = chest_raffle[math_random(1, #chest_raffle)] i.insert(loot) end @@ -417,7 +400,7 @@ function rare_treasure_chest(position) table.insert(rare_treasure_chest_loot_weights, { { name = 'destroyer-capsule', count = math_random(4, 8) }, 3 }) table.insert(rare_treasure_chest_loot_weights, { { name = 'atomic-bomb', count = 1 }, 1 }) for _, t in pairs(rare_treasure_chest_loot_weights) do - for x = 1, t[2], 1 do + for _ = 1, t[2], 1 do table.insert(rare_treasure_chest_raffle_table, t[1]) end end @@ -425,43 +408,44 @@ function rare_treasure_chest(position) local e = game.surfaces[1].create_entity { name = 'steel-chest', position = p, force = 'player' } e.minable = false local i = e.get_inventory(defines.inventory.chest) - for x = 1, math_random(2, 3), 1 do + for _ = 1, math_random(2, 3), 1 do local loot = rare_treasure_chest_raffle_table[math_random(1, #rare_treasure_chest_raffle_table)] i.insert(loot) end end local function secret_shop(pos) - local secret_market_items = { - { price = { { 'raw-fish', math_random(250, 450) } }, offer = { type = 'give-item', item = 'combat-shotgun' } }, - { price = { { 'raw-fish', math_random(250, 450) } }, offer = { type = 'give-item', item = 'flamethrower' } }, - { price = { { 'raw-fish', math_random(75, 125) } }, offer = { type = 'give-item', item = 'rocket-launcher' } }, - { price = { { 'raw-fish', math_random(2, 4) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, - { price = { { 'raw-fish', math_random(8, 16) } }, offer = { type = 'give-item', item = 'uranium-rounds-magazine' } }, - { price = { { 'raw-fish', math_random(8, 16) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } }, - { price = { { 'raw-fish', math_random(6, 12) } }, offer = { type = 'give-item', item = 'flamethrower-ammo' } }, - { price = { { 'raw-fish', math_random(8, 16) } }, offer = { type = 'give-item', item = 'rocket' } }, - { price = { { 'raw-fish', math_random(10, 20) } }, offer = { type = 'give-item', item = 'explosive-rocket' } }, - { price = { { 'raw-fish', math_random(15, 30) } }, offer = { type = 'give-item', item = 'explosive-cannon-shell' } }, - { price = { { 'raw-fish', math_random(25, 35) } }, offer = { type = 'give-item', item = 'explosive-uranium-cannon-shell' } }, - { price = { { 'raw-fish', math_random(20, 40) } }, offer = { type = 'give-item', item = 'cluster-grenade' } }, - { price = { { 'raw-fish', math_random(1, 3) } }, offer = { type = 'give-item', item = 'land-mine' } }, - { price = { { 'raw-fish', math_random(250, 500) } }, offer = { type = 'give-item', item = 'modular-armor' } }, - { price = { { 'raw-fish', math_random(1500, 3000) } }, offer = { type = 'give-item', item = 'power-armor' } }, - { price = { { 'raw-fish', math_random(15000, 20000) } }, offer = { type = 'give-item', item = 'power-armor-mk2' } }, - { price = { { 'raw-fish', math_random(4000, 7000) } }, offer = { type = 'give-item', item = 'fusion-reactor-equipment' } }, - { price = { { 'raw-fish', math_random(50, 100) } }, offer = { type = 'give-item', item = 'battery-equipment' } }, - { price = { { 'raw-fish', math_random(700, 1100) } }, offer = { type = 'give-item', item = 'battery-mk2-equipment' } }, - { price = { { 'raw-fish', math_random(400, 700) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } }, - { price = { { 'raw-fish', math_random(12000, 16000) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } }, - { price = { { 'raw-fish', math_random(300, 500) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } }, - { price = { { 'raw-fish', math_random(350, 500) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } }, - { price = { { 'raw-fish', math_random(25, 50) } }, offer = { type = 'give-item', item = 'construction-robot' } }, - { price = { { 'raw-fish', math_random(250, 450) } }, offer = { type = 'give-item', item = 'energy-shield-equipment' } }, - { price = { { 'raw-fish', math_random(350, 550) } }, offer = { type = 'give-item', item = 'personal-laser-defense-equipment' } }, - { price = { { 'raw-fish', math_random(100, 175) } }, offer = { type = 'give-item', item = 'loader' } }, - { price = { { 'raw-fish', math_random(200, 350) } }, offer = { type = 'give-item', item = 'fast-loader' } }, - { price = { { 'raw-fish', math_random(400, 600) } }, offer = { type = 'give-item', item = 'express-loader' } } + local secret_market_items = + { + { price = { { name = 'raw-fish', count = math_random(250, 450) } }, offer = { type = 'give-item', item = 'combat-shotgun' } }, + { price = { { name = 'raw-fish', count = math_random(250, 450) } }, offer = { type = 'give-item', item = 'flamethrower' } }, + { price = { { name = 'raw-fish', count = math_random(75, 125) } }, offer = { type = 'give-item', item = 'rocket-launcher' } }, + { price = { { name = 'raw-fish', count = math_random(2, 4) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, + { price = { { name = 'raw-fish', count = math_random(8, 16) } }, offer = { type = 'give-item', item = 'uranium-rounds-magazine' } }, + { price = { { name = 'raw-fish', count = math_random(8, 16) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } }, + { price = { { name = 'raw-fish', count = math_random(6, 12) } }, offer = { type = 'give-item', item = 'flamethrower-ammo' } }, + { price = { { name = 'raw-fish', count = math_random(8, 16) } }, offer = { type = 'give-item', item = 'rocket' } }, + { price = { { name = 'raw-fish', count = math_random(10, 20) } }, offer = { type = 'give-item', item = 'explosive-rocket' } }, + { price = { { name = 'raw-fish', count = math_random(15, 30) } }, offer = { type = 'give-item', item = 'explosive-cannon-shell' } }, + { price = { { name = 'raw-fish', count = math_random(25, 35) } }, offer = { type = 'give-item', item = 'explosive-uranium-cannon-shell' } }, + { price = { { name = 'raw-fish', count = math_random(20, 40) } }, offer = { type = 'give-item', item = 'cluster-grenade' } }, + { price = { { name = 'raw-fish', count = math_random(1, 3) } }, offer = { type = 'give-item', item = 'land-mine' } }, + { price = { { name = 'raw-fish', count = math_random(250, 500) } }, offer = { type = 'give-item', item = 'modular-armor' } }, + { price = { { name = 'raw-fish', count = math_random(1500, 3000) } }, offer = { type = 'give-item', item = 'power-armor' } }, + { price = { { name = 'raw-fish', count = math_random(15000, 20000) } }, offer = { type = 'give-item', item = 'power-armor-mk2' } }, + { price = { { name = 'raw-fish', count = math_random(4000, 7000) } }, offer = { type = 'give-item', item = 'fission-reactor-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(50, 100) } }, offer = { type = 'give-item', item = 'battery-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(700, 1100) } }, offer = { type = 'give-item', item = 'battery-mk2-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(400, 700) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(12000, 16000) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(300, 500) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(350, 500) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(25, 50) } }, offer = { type = 'give-item', item = 'construction-robot' } }, + { price = { { name = 'raw-fish', count = math_random(250, 450) } }, offer = { type = 'give-item', item = 'energy-shield-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(350, 550) } }, offer = { type = 'give-item', item = 'personal-laser-defense-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(100, 175) } }, offer = { type = 'give-item', item = 'loader' } }, + { price = { { name = 'raw-fish', count = math_random(200, 350) } }, offer = { type = 'give-item', item = 'fast-loader' } }, + { price = { { name = 'raw-fish', count = math_random(400, 600) } }, offer = { type = 'give-item', item = 'express-loader' } } } secret_market_items = shuffle(secret_market_items) @@ -498,7 +482,6 @@ local function on_chunk_generated(event) local extra_tree_positions = {} local spawn_tree_positions = {} local tile_to_insert = false - local entity_has_been_placed = false local pos_x = 0 local pos_y = 0 local tile_distance_to_center = 0 @@ -630,10 +613,11 @@ local function on_chunk_generated(event) if math_random(1, 48) == 1 then local p = surface.find_non_colliding_position('crude-oil', { pos_x, pos_y }, 5, 1) if p then - surface.create_entity { + surface.create_entity + { name = 'crude-oil', position = p, - amount = math.floor(math_random(25000 + tile_distance_to_center * 0.5, 50000 + tile_distance_to_center), 0) + amount = math.floor(math_random(25000 + tile_distance_to_center * 0.5, 50000 + tile_distance_to_center)) } end end @@ -727,9 +711,9 @@ local function on_chunk_generated(event) for _, p in pairs(enemy_worm_positions) do if math_random(1, 300) == 1 then - local tile_distance_to_center = math.sqrt(p[1] ^ 2 + p[2] ^ 2) + tile_distance_to_center = math.sqrt(p[1] ^ 2 + p[2] ^ 2) if tile_distance_to_center > storage.worm_free_zone_radius then - local raffle_index = math.ceil((tile_distance_to_center - storage.worm_free_zone_radius) * 0.01, 0) + local raffle_index = math.ceil((tile_distance_to_center - storage.worm_free_zone_radius) * 0.01) if raffle_index < 1 then raffle_index = 1 end @@ -744,9 +728,9 @@ local function on_chunk_generated(event) for _, p in pairs(enemy_can_place_worm_positions) do if math_random(1, 30) == 1 then - local tile_distance_to_center = math.sqrt(p[1] ^ 2 + p[2] ^ 2) + tile_distance_to_center = math.sqrt(p[1] ^ 2 + p[2] ^ 2) if tile_distance_to_center > storage.worm_free_zone_radius then - local raffle_index = math.ceil((tile_distance_to_center - storage.worm_free_zone_radius) * 0.01, 0) + local raffle_index = math.ceil((tile_distance_to_center - storage.worm_free_zone_radius) * 0.01) if raffle_index < 1 then raffle_index = 1 end @@ -806,7 +790,7 @@ local function on_player_joined_game(event) game.forces['player'].set_spawn_position(p, surface) player.teleport(p) surface.daytime = 0.5 - surface.freeze_daytime = 1 + surface.freeze_daytime = true surface.min_brightness = 0.3 surface.brightness_visual_weights = { 1, 1, 1 } @@ -815,27 +799,11 @@ local function on_player_joined_game(event) game.forces['player'].technologies['artillery-shell-range-1'].enabled = false game.forces['player'].technologies['artillery-shell-speed-1'].enabled = false game.forces['player'].technologies['artillery'].enabled = false + game.forces['player'].technologies['lamp'].researched = true game.forces['player'].technologies['atomic-bomb'].enabled = false game.map_settings.enemy_evolution.destroy_factor = 0.004 - storage.cave_miner_map_info = - [[ -Delve deep for greater treasures, but also face increased dangers. -Mining productivity research, will overhaul your mining equipment, -reinforcing your pickaxe as well as increasing the size of your backpack. - -Breaking rocks is exhausting and might make you hungry. -So don´t forget to eat some fish once in a while to stay well fed. -But be careful, eating too much might have it´s consequences too. - -As you dig, you will encounter black bedrock that is just too solid for your pickaxe. -Some explosives could even break through the impassable dark rock. -All they need is a container and a well aimed shot. - -Darkness is a hazard in the mines, stay near your lamps.. -]] - storage.biter_spawn_amount_weights = {} storage.biter_spawn_amount_weights[1] = { 64, 1 } storage.biter_spawn_amount_weights[2] = { 32, 4 } @@ -845,7 +813,7 @@ Darkness is a hazard in the mines, stay near your lamps.. storage.biter_spawn_amount_weights[6] = { 2, 64 } storage.biter_spawn_amount_raffle = {} for _, t in pairs(storage.biter_spawn_amount_weights) do - for x = 1, t[2], 1 do + for _ = 1, t[2], 1 do table.insert(storage.biter_spawn_amount_raffle, t[1]) end end @@ -867,7 +835,7 @@ Darkness is a hazard in the mines, stay near your lamps.. storage.rock_mining_chance_weights[4] = { 'uranium-ore', 3 } storage.rock_mining_raffle_table = {} for _, t in pairs(storage.rock_mining_chance_weights) do - for x = 1, t[2], 1 do + for _ = 1, t[2], 1 do table.insert(storage.rock_mining_raffle_table, t[1]) end end @@ -879,7 +847,6 @@ Darkness is a hazard in the mines, stay near your lamps.. storage.cave_miner_init_done = true end if player.online_time < 10 then - create_cave_miner_info(player) storage.darkness_threat_level[player.name] = 0 player.insert { name = 'pistol', count = 1 } player.insert { name = 'firearm-magazine', count = 16 } @@ -897,7 +864,7 @@ local function spawn_cave_inhabitant(pos, target_position) end local surface = game.surfaces[1] local tile_distance_to_center = math.sqrt(pos.x ^ 2 + pos.y ^ 2) - local rock_inhabitants_index = math.ceil((tile_distance_to_center - math.sqrt(spawn_dome_size)) * 0.015, 0) + local rock_inhabitants_index = math.ceil((tile_distance_to_center - math.sqrt(spawn_dome_size)) * 0.015) if rock_inhabitants_index < 1 then rock_inhabitants_index = 1 end @@ -936,9 +903,9 @@ local function find_first_entity_spiral_scan(pos, entities, range) pos.y = pos.y - 1 pos.x = pos.x - 1 for modifier = 1, -1, -2 do - for x = 1, z, 1 do + for _ = 1, z, 1 do pos.x = pos.x + modifier - local t = surface.get_tile(pos) + local t = surface.get_tile(pos.x, pos.y) if t.name == 'out-of-map' then out_of_map_count = out_of_map_count + 1 end @@ -950,9 +917,9 @@ local function find_first_entity_spiral_scan(pos, entities, range) return e[1].position end end - for y = 1, z, 1 do + for _ = 1, z, 1 do pos.y = pos.y + modifier - local t = surface.get_tile(pos) + local t = surface.get_tile(pos.x, pos.y) if t.name == 'out-of-map' then out_of_map_count = out_of_map_count + 1 end @@ -975,7 +942,6 @@ local function find_first_entity_spiral_scan(pos, entities, range) end local function biter_attack_event() - local surface = game.surfaces[1] local valid_positions = {} for _, player in pairs(game.connected_players) do if player.character then @@ -1012,7 +978,7 @@ end local function darkness_events() for _, p in pairs(game.connected_players) do if storage.darkness_threat_level[p.name] > 4 then - for x = 1, 2 + storage.darkness_threat_level[p.name], 1 do + for _ = 1, 2 + storage.darkness_threat_level[p.name], 1 do spawn_cave_inhabitant(p.position) end local biters_found = game.surfaces[1].find_enemy_units(p.position, 12, 'player') @@ -1063,7 +1029,7 @@ local function darkness_checks() end end -local function on_tick(event) +local function on_tick() if game.tick % 30 == 0 then if storage.biter_spawn_schedule then for x = 1, #storage.biter_spawn_schedule, 1 do @@ -1112,7 +1078,8 @@ local function on_tick(event) end end -local disabled_for_deconstruction = { +local disabled_for_deconstruction = +{ ['fish'] = true, ['huge-rock'] = true, ['big-rock'] = true, @@ -1127,7 +1094,8 @@ local function on_marked_for_deconstruction(event) end end -local treasure_chest_messages = { +local treasure_chest_messages = +{ "You notice an old crate within the rubble. It's filled with treasure!", "You find a chest underneath the broken rocks. It's filled with goodies!", 'We has found the precious!' @@ -1146,7 +1114,7 @@ local function on_pre_player_mined_item(event) end if event.entity.type == 'tree' then - surface.spill_item_stack(player.position, { name = 'raw-fish', count = math.random(1, 2) }, true) + surface.spill_item_stack({ position = player.position, stack = { name = 'raw-fish', count = math.random(1, 2) }, enable_looted = true }) end if event.entity.name == 'huge-rock' or event.entity.name == 'big-rock' or event.entity.name == 'big-sand-rock' then @@ -1166,7 +1134,7 @@ local function on_pre_player_mined_item(event) Hunger.hunger_update(player, -1) end - surface.spill_item_stack(player.position, { name = 'raw-fish', count = math_random(1, 3) }, true) + surface.spill_item_stack({ position = player.position, stack = { name = 'raw-fish', count = math_random(1, 3) }, enable_looted = true }) end end @@ -1261,19 +1229,12 @@ local function on_gui_click(event) create_cave_miner_stats_gui(player) end if name == 'caver_miner_stats_toggle_button' and frame then - if player.gui.left['cave_miner_info'] then - frame.destroy() - player.gui.left['cave_miner_info'].destroy() - else - create_cave_miner_info(player) - end - end - if name == 'close_cave_miner_info' then - player.gui.left['cave_miner_info'].destroy() + frame.destroy() end end -local bank_messages = { +local bank_messages = +{ 'Caves are dangerous. Did you hear about our insurance programs?', 'Get your wealth flowing today with Fishbank!', 'Hungry? Take a look at our credit offers! No questions asked.', @@ -1292,7 +1253,6 @@ local function on_market_item_purchased(event) local player = game.players[event.player_index] local market = event.market local offer_index = event.offer_index - local count = event.count local offers = market.get_market_items() local bought_offer = offers[offer_index].offer if bought_offer.type ~= 'nothing' then @@ -1325,7 +1285,7 @@ local function on_market_item_purchased(event) local requested_withdraw_amount = 500 local fee = 10 if storage.fish_bank[player.name] < requested_withdraw_amount + fee then - fee = math.ceil(storage.fish_bank[player.name] * 0.01, 0) + fee = math.ceil(storage.fish_bank[player.name] * 0.01) if storage.fish_bank[player.name] < 10 then fee = 0 end @@ -1362,9 +1322,15 @@ local function on_init() storage.rocks_yield_ore_distance_modifier = 0.1 storage.rocks_yield_ore_veins.chance = 512 + + local T = Map.get_map_information() + T.main_caption = 'Cave Miner' + T.sub_caption = 'diggy diggy hole' + T.text = 'Delve deep for greater treasures, but also face increased dangers.\n\nMining productivity research, will overhaul your mining equipment,\nreinforcing your pickaxe as well as increasing the size of your backpack.\n\nBreaking rocks is exhausting and might make you hungry.\nSo don\'t forget to eat some fish once in a while to stay well fed.\nBut be careful, eating too much might have it\'s consequences too.\n\nDarkness is a hazard in the mines, stay near your lamps..' + T.main_caption_color = { r = 0, g = 120, b = 0 } + T.sub_caption_color = { r = 255, g = 0, b = 255 } end -local Event = require 'utils.event' Event.on_init(on_init) Event.add(defines.events.on_market_item_purchased, on_market_item_purchased) Event.add(defines.events.on_gui_click, on_gui_click) diff --git a/maps/cave_miner_market_items.lua b/maps/cave_miner_market_items.lua index b8e1f8ec8..72ec5371d 100644 --- a/maps/cave_miner_market_items.lua +++ b/maps/cave_miner_market_items.lua @@ -1,33 +1,35 @@ local items = {} -items.spawn = { - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'rail', count = 4}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'rail-signal', count = 2}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'rail-chain-signal', count = 2}}, - {price = {{'raw-fish', 10}}, offer = {type = 'give-item', item = 'train-stop'}}, - {price = {{'raw-fish', 94}}, offer = {type = 'give-item', item = 'locomotive'}}, - {price = {{'raw-fish', 35}}, offer = {type = 'give-item', item = 'cargo-wagon'}}, - {price = {{'raw-fish', 4}}, offer = {type = 'give-item', item = 'decider-combinator'}}, - {price = {{'raw-fish', 4}}, offer = {type = 'give-item', item = 'arithmetic-combinator'}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'constant-combinator'}}, - {price = {{'raw-fish', 4}}, offer = {type = 'give-item', item = 'programmable-speaker'}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'small-lamp'}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'firearm-magazine'}}, - {price = {{'raw-fish', 4}}, offer = {type = 'give-item', item = 'piercing-rounds-magazine'}}, - {price = {{'raw-fish', 3}}, offer = {type = 'give-item', item = 'grenade'}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'land-mine'}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'explosives', count = 2}}, - {price = {{'raw-fish', 40}}, offer = {type = 'give-item', item = 'cliff-explosives'}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'wood', count = 25}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'iron-ore', count = 25}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'copper-ore', count = 25}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'stone', count = 25}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'coal', count = 25}}, - {price = {{'raw-fish', 5}}, offer = {type = 'give-item', item = 'uranium-ore', count = 20}}, - {price = {{'wood', 25}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}}, - {price = {{'iron-ore', 25}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}}, - {price = {{'copper-ore', 25}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}}, - {price = {{'stone', 25}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}}, - {price = {{'coal', 25}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}}, - {price = {{'uranium-ore', 20}}, offer = {type = 'give-item', item = 'raw-fish', count = 2}} +items.spawn = +{ + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'rail', count = 4 } }, + { price = { { name = 'raw-fish', count = 150 } }, offer = { type = 'give-item', item = 'infinity-chest', count = 1 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'rail-signal', count = 2 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'rail-chain-signal', count = 2 } }, + { price = { { name = 'raw-fish', count = 10 } }, offer = { type = 'give-item', item = 'train-stop' } }, + { price = { { name = 'raw-fish', count = 94 } }, offer = { type = 'give-item', item = 'locomotive' } }, + { price = { { name = 'raw-fish', count = 35 } }, offer = { type = 'give-item', item = 'cargo-wagon' } }, + { price = { { name = 'raw-fish', count = 4 } }, offer = { type = 'give-item', item = 'decider-combinator' } }, + { price = { { name = 'raw-fish', count = 4 } }, offer = { type = 'give-item', item = 'arithmetic-combinator' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'constant-combinator' } }, + { price = { { name = 'raw-fish', count = 4 } }, offer = { type = 'give-item', item = 'programmable-speaker' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'small-lamp' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'firearm-magazine' } }, + { price = { { name = 'raw-fish', count = 4 } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, + { price = { { name = 'raw-fish', count = 3 } }, offer = { type = 'give-item', item = 'grenade' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'land-mine' } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'explosives', count = 2 } }, + { price = { { name = 'raw-fish', count = 40 } }, offer = { type = 'give-item', item = 'cliff-explosives' } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'wood', count = 25 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'iron-ore', count = 25 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'copper-ore', count = 25 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'stone', count = 25 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'coal', count = 25 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'uranium-ore', count = 20 } }, + { price = { { name = 'wood', count = 25 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } }, + { price = { { name = 'iron-ore', count = 25 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } }, + { price = { { name = 'copper-ore', count = 25 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } }, + { price = { { name = 'stone', count = 25 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } }, + { price = { { name = 'coal', count = 25 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } }, + { price = { { name = 'uranium-ore', count = 20 } }, offer = { type = 'give-item', item = 'raw-fish', count = 2 } } } return items diff --git a/maps/cave_miner_v2/constants.lua b/maps/cave_miner_v2/constants.lua index 005a34e0e..022e6e604 100644 --- a/maps/cave_miner_v2/constants.lua +++ b/maps/cave_miner_v2/constants.lua @@ -1,125 +1,144 @@ local Public = {} -Public.treasures = { - ['wooden-chest'] = { +Public.treasures = +{ + ['wooden-chest'] = + { tech_bonus = 0.1, amount_multiplier = 1, description = 'an old wooden crate.' }, - ['iron-chest'] = { + ['iron-chest'] = + { tech_bonus = 0.15, amount_multiplier = 1.5, description = 'an antique iron crate.' }, - ['steel-chest'] = { + ['steel-chest'] = + { tech_bonus = 0.2, amount_multiplier = 2, description = 'a shiny metal box!' }, - ['crash-site-spaceship-wreck-medium-1'] = { + ['crash-site-spaceship-wreck-medium-1'] = + { tech_bonus = 0.25, amount_multiplier = 2.5, description = 'a spaceship wreck piece!' }, - ['crash-site-spaceship-wreck-medium-2'] = { + ['crash-site-spaceship-wreck-medium-2'] = + { tech_bonus = 0.25, amount_multiplier = 2.5, description = 'a space station wreck piece, containing some precious scrap!' }, - ['crash-site-spaceship-wreck-medium-3'] = { + ['crash-site-spaceship-wreck-medium-3'] = + { tech_bonus = 0.25, amount_multiplier = 2.5, description = 'a wreck piece, containing rare scrap!' }, - ['crash-site-spaceship-wreck-big-1'] = { + ['crash-site-spaceship-wreck-big-1'] = + { tech_bonus = 0.30, amount_multiplier = 3, description = 'a big wreck.' }, - ['crash-site-spaceship-wreck-big-2'] = { + ['crash-site-spaceship-wreck-big-2'] = + { tech_bonus = 0.30, amount_multiplier = 3, description = 'a station wreck!' }, - ['big-ship-wreck-1'] = { + ['big-ship-wreck-1'] = + { tech_bonus = 0.35, amount_multiplier = 3.5, description = 'a crashed space ship! The cargo is still intact!' }, - ['big-ship-wreck-2'] = { + ['big-ship-wreck-2'] = + { tech_bonus = 0.35, amount_multiplier = 3.5, description = 'a crashed space ship!' }, - ['big-ship-wreck-3'] = { + ['big-ship-wreck-3'] = + { tech_bonus = 0.35, amount_multiplier = 3.5, description = 'a crashed starship!' }, - ['crash-site-chest-1'] = { + ['crash-site-chest-1'] = + { tech_bonus = 0.40, amount_multiplier = 4, description = 'a drop pod capsule! It is filled with useful loot!' }, - ['crash-site-chest-2'] = { + ['crash-site-chest-2'] = + { tech_bonus = 0.40, amount_multiplier = 4, description = 'a cargo pod capsule! It is filled with nice things!' }, - ['crash-site-spaceship'] = { + ['crash-site-spaceship'] = + { tech_bonus = 0.5, amount_multiplier = 5, description = 'a big crashed spaceship! There are treasures inside..' } } -Public.chat_color = {200, 200, 200} +Public.chat_color = { 200, 200, 200 } -Public.starting_items = { +Public.starting_items = +{ ['pistol'] = 1, ['firearm-magazine'] = 8, ['wood'] = 8, ['raw-fish'] = 3 } -Public.reveal_chain_brush_sizes = { +Public.reveal_chain_brush_sizes = +{ ['unit'] = 7, ['unit-spawner'] = 15, ['turret'] = 9 } -Public.spawn_market_items = { - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'rail', count = 2}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'rail-signal', count = 1}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'rail-chain-signal', count = 1}}, - {price = {{'raw-fish', 8}}, offer = {type = 'give-item', item = 'train-stop'}}, - {price = {{'raw-fish', 50}}, offer = {type = 'give-item', item = 'locomotive'}}, - {price = {{'raw-fish', 20}}, offer = {type = 'give-item', item = 'cargo-wagon'}}, - {price = {{'raw-fish', 3}}, offer = {type = 'give-item', item = 'decider-combinator'}}, - {price = {{'raw-fish', 3}}, offer = {type = 'give-item', item = 'arithmetic-combinator'}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'constant-combinator'}}, - {price = {{'raw-fish', 4}}, offer = {type = 'give-item', item = 'programmable-speaker'}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'small-lamp'}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'firearm-magazine', count = 2}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'piercing-rounds-magazine'}}, - {price = {{'raw-fish', 2}}, offer = {type = 'give-item', item = 'grenade'}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'land-mine'}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'explosives', count = 3}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'wood', count = 10}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'iron-ore', count = 10}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'copper-ore', count = 10}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'stone', count = 10}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'coal', count = 10}}, - {price = {{'raw-fish', 1}}, offer = {type = 'give-item', item = 'uranium-ore', count = 5}}, - {price = {{'wood', 15}}, offer = {type = 'give-item', item = 'raw-fish', count = 1}}, - {price = {{'iron-ore', 15}}, offer = {type = 'give-item', item = 'raw-fish', count = 1}}, - {price = {{'copper-ore', 15}}, offer = {type = 'give-item', item = 'raw-fish', count = 1}}, - {price = {{'stone', 15}}, offer = {type = 'give-item', item = 'raw-fish', count = 1}}, - {price = {{'coal', 15}}, offer = {type = 'give-item', item = 'raw-fish', count = 1}}, - {price = {{'uranium-ore', 7}}, offer = {type = 'give-item', item = 'raw-fish', count = 1}} +Public.spawn_market_items = +{ + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'rail', count = 2 } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'rail-signal', count = 1 } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'rail-chain-signal', count = 1 } }, + { price = { { name = 'raw-fish', count = 8 } }, offer = { type = 'give-item', item = 'train-stop' } }, + { price = { { name = 'raw-fish', count = 50 } }, offer = { type = 'give-item', item = 'locomotive' } }, + { price = { { name = 'raw-fish', count = 20 } }, offer = { type = 'give-item', item = 'cargo-wagon' } }, + { price = { { name = 'raw-fish', count = 3 } }, offer = { type = 'give-item', item = 'decider-combinator' } }, + { price = { { name = 'raw-fish', count = 3 } }, offer = { type = 'give-item', item = 'arithmetic-combinator' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'constant-combinator' } }, + { price = { { name = 'raw-fish', count = 4 } }, offer = { type = 'give-item', item = 'programmable-speaker' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'small-lamp' } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'firearm-magazine', count = 2 } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'grenade' } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'land-mine' } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'explosives', count = 3 } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'wood', count = 10 } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'iron-ore', count = 10 } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'copper-ore', count = 10 } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'stone', count = 10 } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'coal', count = 10 } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'uranium-ore', count = 5 } }, + { price = { { name = 'wood', count = 15 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }, + { price = { { name = 'iron-ore', count = 15 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }, + { price = { { name = 'copper-ore', count = 15 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }, + { price = { { name = 'stone', count = 15 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }, + { price = { { name = 'coal', count = 15 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }, + { price = { { name = 'uranium-ore', count = 7 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } } } -Public.pickaxe_tiers = { +Public.pickaxe_tiers = +{ 'Wood', 'Plastic', 'Bone', diff --git a/maps/cave_miner_v2/functions.lua b/maps/cave_miner_v2/functions.lua index 9ca950813..84a33360d 100644 --- a/maps/cave_miner_v2/functions.lua +++ b/maps/cave_miner_v2/functions.lua @@ -40,7 +40,7 @@ end function Public.roll_biter_amount() local max_chance = 0 - for k, v in pairs(spawn_amount_rolls) do + for _, v in pairs(spawn_amount_rolls) do max_chance = max_chance + v end local r = math_random(0, max_chance) @@ -64,12 +64,12 @@ function Public.reveal(cave_miner, surface, source_surface, position, brushsize) local copied_tiles = {} local i = 0 local brushsize_square = brushsize ^ 2 - for _, tile in pairs(source_surface.find_tiles_filtered({ area = { { position.x - brushsize, position.y - brushsize }, { position.x + brushsize, position.y + brushsize } } })) do - local tile_position = tile.position - if tile.name ~= 'lab-dark-2' and tile.name ~= 'lab-dark-1' and (position.x - tile_position.x) ^ 2 + (position.y - tile_position.y) ^ 2 < brushsize_square then + for _, tile2 in pairs(source_surface.find_tiles_filtered({ area = { { position.x - brushsize, position.y - brushsize }, { position.x + brushsize, position.y + brushsize } } })) do + local tile_position = tile2.position + if tile2.name ~= 'lab-dark-2' and tile2.name ~= 'lab-dark-1' and (position.x - tile_position.x) ^ 2 + (position.y - tile_position.y) ^ 2 < brushsize_square then i = i + 1 - copied_tiles[i] = { name = 'lab-dark-1', position = tile.position } - tiles[i] = { name = tile.name, position = tile.position } + copied_tiles[i] = { name = 'lab-dark-1', position = tile2.position } + tiles[i] = { name = tile2.name, position = tile2.position } end end surface.set_tiles(tiles, true, false, false, false) @@ -144,7 +144,7 @@ function Public.spawn_random_biter(surface, position, multiplier) return unit end -function Public.rock_spawns_biters(cave_miner, position) +function Public.rock_spawns_biters(position) local amount = Public.roll_biter_amount() local surface = game.surfaces.nauvis local difficulty_modifier = Public.get_difficulty_modifier(position) @@ -185,8 +185,8 @@ function Public.loot_crate(surface, position, container_name, player_index) text = player.name .. ' uncovered ' .. description end - for _, player in pairs(game.forces.player.connected_players) do - player.add_custom_alert(container, { type = 'item', name = 'wooden-chest' }, text, true) + for _, p in pairs(game.forces.player.connected_players) do + p.add_custom_alert(container, { type = 'item', name = 'wooden-chest' }, text, true) end end @@ -213,7 +213,7 @@ function Public.create_top_gui(player) label.style.margin = 0 label.style.padding = 0 - local label = frame.add({ type = 'label', caption = 'Loading...' }) + label = frame.add({ type = 'label', caption = 'Loading...' }) label.style.font = 'heading-2' label.style.font_color = { 225, 225, 225 } label.style.margin = 0 @@ -304,9 +304,10 @@ function Public.darkness(cave_miner) end end -Public.mining_events = { +Public.mining_events = +{ { - function (cave_miner, entity, player_index) + function (_, entity, _) if math.random(1, 8) == 1 then entity.surface.spill_item_stack(entity.position, { name = 'raw-fish', count = 1 }, true) end @@ -315,7 +316,7 @@ Public.mining_events = { 'Nothing' }, { - function (cave_miner, entity, player_index) + function (_, entity, _) local amount = Public.roll_biter_amount() local position = entity.position local surface = entity.surface @@ -329,7 +330,7 @@ Public.mining_events = { 'Mixed_Biters' }, { - function (cave_miner, entity, player_index) + function (_, entity, _) local amount = Public.roll_biter_amount() local position = entity.position local surface = entity.surface @@ -343,7 +344,7 @@ Public.mining_events = { 'Biters' }, { - function (cave_miner, entity, player_index) + function (_, entity, _) local amount = Public.roll_biter_amount() local position = entity.position local surface = entity.surface @@ -357,7 +358,7 @@ Public.mining_events = { 'Spitters' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface Public.loot_crate(surface, position, 'wooden-chest', player_index) @@ -366,7 +367,7 @@ Public.mining_events = { 'Treasure_Tier_1' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface Public.loot_crate(surface, position, 'iron-chest', player_index) @@ -375,7 +376,7 @@ Public.mining_events = { 'Treasure_Tier_2' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface Public.loot_crate(surface, position, 'steel-chest', player_index) @@ -384,7 +385,7 @@ Public.mining_events = { 'Treasure_Tier_3' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface Public.loot_crate(surface, position, 'crash-site-spaceship-wreck-medium-' .. math_random(1, 3), player_index) @@ -393,7 +394,7 @@ Public.mining_events = { 'Treasure_Tier_4' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface Public.loot_crate(surface, position, 'crash-site-spaceship-wreck-big-' .. math_random(1, 2), player_index) @@ -402,7 +403,7 @@ Public.mining_events = { 'Treasure_Tier_5' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface Public.loot_crate(surface, position, 'big-ship-wreck-' .. math_random(1, 3), player_index) @@ -411,7 +412,7 @@ Public.mining_events = { 'Treasure_Tier_6' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface Public.loot_crate(surface, position, 'crash-site-chest-' .. math_random(1, 2), player_index) @@ -420,7 +421,7 @@ Public.mining_events = { 'Treasure_Tier_7' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface Public.loot_crate(surface, position, 'crash-site-spaceship', player_index) @@ -430,7 +431,7 @@ Public.mining_events = { 'Treasure_Tier_8' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface local unit = Public.spawn_random_biter(surface, position, 2) @@ -440,7 +441,7 @@ Public.mining_events = { 'Pet' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface surface.create_entity({ name = 'biter-spawner', position = position, force = 'enemy' }) @@ -450,7 +451,7 @@ Public.mining_events = { 'Nest' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface Public.place_worm(surface, position, 1) @@ -460,7 +461,7 @@ Public.mining_events = { 'Worm' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position if position.x ^ 2 + position.y ^ 2 < 8000 then return @@ -490,16 +491,15 @@ Public.mining_events = { function (cave_miner, entity, player_index) local position = entity.position local surface = entity.surface - local entity = surface.create_entity({ name = cave_miner.buildings_raffle[math_random(1, #cave_miner.buildings_raffle)], position = position, force = 'player' }) + entity = surface.create_entity({ name = cave_miner.buildings_raffle[math_random(1, #cave_miner.buildings_raffle)], position = position, force = 'player' }) entity.health = math_random(1, entity.max_health) - local player = game.players[player_index] game.print(Public.get_colored_name(player_index) .. ' discovered an abandoned building', Constants.chat_color) end, 128, 'Abandoned Building' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface surface.create_entity({ name = 'car', position = position, force = 'player' }) @@ -511,7 +511,7 @@ Public.mining_events = { 'Car' }, { - function (cave_miner, entity, player_index) + function (_, entity, player_index) local position = entity.position local surface = entity.surface local tick = game.tick @@ -536,15 +536,16 @@ Public.mining_events = { } } -Public.on_entity_died = { - ['unit'] = function (cave_miner, entity) +Public.on_entity_died = +{ + ['unit'] = function (_, entity) local position = entity.position local surface = entity.surface if math.random(1, 8) == 1 then surface.spill_item_stack(position, { name = 'raw-fish', count = 1 }, true) end end, - ['unit-spawner'] = function (cave_miner, entity) + ['unit-spawner'] = function (_, entity) local position = entity.position local surface = entity.surface local a = 64 * 0.0001 @@ -558,7 +559,7 @@ Public.on_entity_died = { local position = entity.position cave_miner.rocks_broken = cave_miner.rocks_broken + 1 if math.random(1, 6) == 1 then - Public.rock_spawns_biters(cave_miner, position) + Public.rock_spawns_biters(position) end end, ['container'] = function (cave_miner, entity) diff --git a/maps/cave_miner_v2/main.lua b/maps/cave_miner_v2/main.lua index 51d863caf..4ff3e47cf 100644 --- a/maps/cave_miner_v2/main.lua +++ b/maps/cave_miner_v2/main.lua @@ -1,4 +1,9 @@ --luacheck: ignore + +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + local Constants = require 'maps.cave_miner_v2.constants' local Event = require 'utils.event' local Explosives = require 'modules.explosives_2' @@ -6,7 +11,6 @@ local Autostash = require 'modules.autostash' local Functions = require 'maps.cave_miner_v2.functions' local Global = require 'utils.global' local Market = require 'maps.cave_miner_v2.market' -local Server = require 'utils.server' local Terrain = require 'maps.cave_miner_v2.terrain' local Map_info = require 'modules.map_info' @@ -87,8 +91,6 @@ local function on_player_mined_entity(event) if not entity.valid then return end - local surface = entity.surface - local position = entity.position if entity.type == 'simple-entity' then cave_miner.rocks_broken = cave_miner.rocks_broken + 1 local f = table.get_random_weighted(Functions.mining_events) @@ -117,7 +119,7 @@ local function on_entity_spawned(event) unit.destroy() end -local function init(cave_miner) +local function init() local tick = game.ticks_played if tick % 60 ~= 0 then return @@ -150,7 +152,7 @@ local function init(cave_miner) cave_miner.gamestate = 'spawn_players' end -local function spawn_players(cave_miner) +local function spawn_players() local tick = game.ticks_played if tick % 60 ~= 0 then return @@ -163,7 +165,8 @@ local function spawn_players(cave_miner) cave_miner.gamestate = 'game_in_progress' end -local game_tasks = { +local game_tasks = +{ [15] = Functions.update_top_gui, [30] = function () local reveal = cave_miner.reveal_queue[1] @@ -180,7 +183,7 @@ local game_tasks = { [45] = Functions.darkness } -local function game_in_progress(cave_miner) +local function game_in_progress() local tick = game.ticks_played % 60 if not game_tasks[tick] then return @@ -188,14 +191,15 @@ local function game_in_progress(cave_miner) game_tasks[tick](cave_miner) end -local gamestates = { +local gamestates = +{ ['init'] = init, ['spawn_players'] = spawn_players, ['game_in_progress'] = game_in_progress } local function on_tick() - gamestates[cave_miner.gamestate](cave_miner) + gamestates[cave_miner.gamestate]() end local function on_init() diff --git a/maps/cave_miner_v2/market.lua b/maps/cave_miner_v2/market.lua index 031b4ce67..5c05a66b5 100644 --- a/maps/cave_miner_v2/market.lua +++ b/maps/cave_miner_v2/market.lua @@ -21,35 +21,36 @@ local function get_item_blacklist(tier) return blacklist end -local special_slots = { - [1] = function(market, cave_miner) +local special_slots = +{ + [1] = function (market, cave_miner) local pickaxe_tiers = Constants.pickaxe_tiers local tier = cave_miner.pickaxe_tier + 1 if pickaxe_tiers[tier] then local item_stacks = LootRaffle.roll(math.floor(tier ^ 3.65) + 8, 100, get_item_blacklist(tier)) local price = {} for _, item_stack in pairs(item_stacks) do - table.insert(price, {name = item_stack.name, amount = item_stack.count}) + table.insert(price, { name = item_stack.name, count = item_stack.count }) end - market.add_market_item({price = price, offer = {type = 'nothing', effect_description = 'Upgrade pickaxe to tier ' .. tier .. ': ' .. pickaxe_tiers[tier]}}) + market.add_market_item({ price = price, offer = { type = 'nothing', effect_description = 'Upgrade pickaxe to tier ' .. tier .. ': ' .. pickaxe_tiers[tier] } }) else - market.add_market_item({price = price, offer = {type = 'nothing', effect_description = 'Maximum pickaxe upgrade reached!'}}) + market.add_market_item({ price = {}, offer = { type = 'nothing', effect_description = 'Maximum pickaxe upgrade reached!' } }) end end, - [2] = function(market, cave_miner) + [2] = function (market, _) local tier = (market.force.character_inventory_slots_bonus + 2) * 0.5 local item_stacks = LootRaffle.roll(math.floor(tier ^ 3.50) + 8, 100, get_item_blacklist(tier)) local price = {} for _, item_stack in pairs(item_stacks) do - table.insert(price, {name = item_stack.name, amount = item_stack.count}) + table.insert(price, { name = item_stack.name, count = item_stack.count }) end - market.add_market_item({price = price, offer = {type = 'nothing', effect_description = 'Upgrade backpack to tier ' .. tier}}) + market.add_market_item({ price = price, offer = { type = 'nothing', effect_description = 'Upgrade backpack to tier ' .. tier } }) return tier end, - [3] = function(market, cave_miner) + [3] = function (market, cave_miner) local tier_pickaxe = cave_miner.pickaxe_tier + 1 local tier_backpack = (market.force.character_inventory_slots_bonus + 2) * 0.5 - market.add_market_item({price = {{name = 'raw-fish', amount = (tier_pickaxe + tier_backpack)}}, offer = {type = 'nothing', effect_description = 'Reroll offers'}}) + market.add_market_item({ price = { { name = 'raw-fish', count = (tier_pickaxe + tier_backpack) } }, offer = { type = 'nothing', effect_description = 'Reroll offers' } }) end } @@ -67,7 +68,7 @@ end function Public.spawn(cave_miner) local surface = game.surfaces.nauvis - local market = surface.create_entity({name = 'market', position = {0, 0}, force = 'player'}) + local market = surface.create_entity({ name = 'market', position = { 0, 0 }, force = 'player' }) rendering.draw_light( { sprite = 'utility/light_medium', @@ -75,7 +76,7 @@ function Public.spawn(cave_miner) intensity = 0.8, minimum_darkness = 0, oriented = true, - color = {255, 255, 255}, + color = { 255, 255, 255 }, target = market, surface = surface, visible = true, @@ -98,16 +99,15 @@ function Public.offer_bought(event, cave_miner) local player = game.players[event.player_index] local market = event.market local offer_index = event.offer_index - local count = event.count local offers = market.get_market_items() local bought_offer = offers[offer_index].offer if bought_offer.type ~= 'nothing' then return end if offer_index == 1 and Constants.pickaxe_tiers[cave_miner.pickaxe_tier + 1] then - market.force.play_sound({path = 'utility/new_objective', volume_modifier = 0.75}) + market.force.play_sound({ path = 'utility/new_objective', volume_modifier = 0.75 }) cave_miner.pickaxe_tier = cave_miner.pickaxe_tier + 1 - local speed = Functions.set_mining_speed(cave_miner, player.force) + Functions.set_mining_speed(cave_miner, player.force) game.print('Pickaxe has been upgraded to: ' .. Constants.pickaxe_tiers[cave_miner.pickaxe_tier] .. '!') Public.refresh_offer(market, cave_miner, 1) Public.refresh_offer(market, cave_miner, 3) @@ -116,11 +116,11 @@ function Public.offer_bought(event, cave_miner) end if offer_index == 2 then market.force.character_inventory_slots_bonus = market.force.character_inventory_slots_bonus + 2 - market.force.play_sound({path = 'utility/new_objective', volume_modifier = 0.75}) + market.force.play_sound({ path = 'utility/new_objective', volume_modifier = 0.75 }) game.print('Backpack has been upgraded to tier ' .. (market.force.character_inventory_slots_bonus + 2) * 0.5 .. '!') Public.refresh_offer(market, cave_miner, 2) Public.refresh_offer(market, cave_miner, 3) - Functions.update_top_gui(cave_miner, 2) + Functions.update_top_gui(cave_miner) return end if offer_index == 3 then @@ -136,12 +136,12 @@ end function Public.spawn_random_cave_market(surface, position) local r = 64 - if surface.count_entities_filtered({name = 'market', area = {{position.x - r, position.y - r}, {position.x + r, position.y + r}}}) > 0 then + if surface.count_entities_filtered({ name = 'market', area = { { position.x - r, position.y - r }, { position.x + r, position.y + r } } }) > 0 then return end local difficulty_modifier = Functions.get_difficulty_modifier(position) - local market = surface.create_entity({name = 'market', position = position, force = 'player'}) + local market = surface.create_entity({ name = 'market', position = position, force = 'player' }) local worth = math_floor(difficulty_modifier * 10000) + 256 local blacklist = LootRaffle.get_tech_blacklist(difficulty_modifier + 0.20) blacklist['discharge-defense-remote'] = true @@ -158,14 +158,14 @@ function Public.spawn_random_cave_market(surface, position) end end for name, value in pairs(items) do - local value = value * math_random(20, 36) * 0.01 + value = value * math_random(20, 36) * 0.01 local count = 1 if value < 1 then count = math_floor(1 / value) value = 1 end value = math_floor(value) - market.add_market_item({price = {{'raw-fish', value}}, offer = {type = 'give-item', item = name, count = count}}) + market.add_market_item({ price = { { name = 'raw-fish', count = value } }, offer = { type = 'give-item', item = name, count = count } }) end blacklist['wood'] = true @@ -173,7 +173,6 @@ function Public.spawn_random_cave_market(surface, position) blacklist['fast-loader'] = true blacklist['loader'] = true - local items = {} for _ = 1, 2, 1 do local item_buys = LootRaffle.roll(worth, 3, blacklist) for _, item_stack in pairs(item_buys) do @@ -181,14 +180,14 @@ function Public.spawn_random_cave_market(surface, position) end end for name, value in pairs(items) do - local value = value * math_random(4, 8) * 0.01 + value = value * math_random(4, 8) * 0.01 local count = 1 if value < 1 then count = math_floor(1 / value) value = 1 end value = math_floor(value) - market.add_market_item({price = {{name, count}}, offer = {type = 'give-item', item = 'raw-fish', count = value}}) + market.add_market_item({ price = { { name = name, count = count } }, offer = { type = 'give-item', item = 'raw-fish', count = value } }) end rendering.draw_light( @@ -198,7 +197,7 @@ function Public.spawn_random_cave_market(surface, position) intensity = 0.8, minimum_darkness = 0, oriented = true, - color = {255, 255, 255}, + color = { 255, 255, 255 }, target = market, surface = surface, visible = true, diff --git a/maps/cave_miner_v2/rocks_yield_ore.lua b/maps/cave_miner_v2/rocks_yield_ore.lua index b49a74158..73dc9d94a 100644 --- a/maps/cave_miner_v2/rocks_yield_ore.lua +++ b/maps/cave_miner_v2/rocks_yield_ore.lua @@ -6,13 +6,15 @@ local math_random = math.random local math_floor = math.floor local math_sqrt = math.sqrt -local rock_yield = { +local rock_yield = +{ ['big-rock'] = 1, ['huge-rock'] = 2, ['big-sand-rock'] = 1 } -local particles = { +local particles = +{ ['iron-ore'] = 'iron-ore-particle', ['copper-ore'] = 'copper-ore-particle', ['uranium-ore'] = 'coal-particle', @@ -53,7 +55,7 @@ local function create_particles(surface, name, position, amount, cause_position) direction_mod_2 = (cause_position.y - position.y) * 0.025 end - for i = 1, amount, 1 do + for _ = 1, amount, 1 do local m = math_random(4, 10) local m2 = m * 0.005 @@ -64,7 +66,8 @@ local function create_particles(surface, name, position, amount, cause_position) frame_speed = 1, vertical_speed = 0.130, height = 0, - movement = { + movement = + { (m2 - (math_random(0, m) * 0.01)) + direction_mod, (m2 - (math_random(0, m) * 0.01)) + direction_mod_2 } @@ -117,9 +120,8 @@ local function on_player_mined_entity(event) local ore_amount = math_floor(count * (1 - stone_m)) + 1 local stone_amount = math_floor(count * stone_m) + 1 - player.surface.create_entity( + player.create_local_flying_text( { - name = 'flying-text', position = position, text = '+' .. ore_amount .. ' [img=item/' .. ore .. '] +' .. stone_amount .. ' [img=item/stone]', color = { r = 200, g = 160, b = 30 } @@ -183,7 +185,7 @@ local function on_entity_died(event) storage.rocks_yield_ore['ores_mined'] = storage.rocks_yield_ore['ores_mined'] + count surface.spill_item_stack(pos, { name = ore, count = count }, true) - local count = math_random(2, 8) + count = math_random(2, 8) storage.rocks_yield_ore['ores_mined'] = storage.rocks_yield_ore['ores_mined'] + count surface.spill_item_stack(pos, { name = 'stone', count = math_random(1, 3) }, true) diff --git a/maps/choppy.lua b/maps/choppy.lua index d6450eb3b..883b4e109 100644 --- a/maps/choppy.lua +++ b/maps/choppy.lua @@ -1,5 +1,8 @@ --luacheck: ignore --choppy-- mewmew made this -- +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end require 'modules.dynamic_landfill' require 'modules.satellite_score' @@ -8,24 +11,22 @@ local Map = require 'modules.map_info' local unearthing_worm = require 'utils.functions.unearthing_worm' local unearthing_biters = require 'utils.functions.unearthing_biters' local tick_tack_trap = require 'utils.functions.tick_tack_trap' -local create_entity_chain = require 'utils.functions.create_entity_chain' -local create_tile_chain = require 'utils.functions.create_tile_chain' local simplex_noise = require 'utils.math.simplex_noise'.d2 -local event = require 'utils.event' +local Event = require 'utils.event' local table_insert = table.insert local math_random = math.random -local map_functions = require 'utils.tools.map_functions' -local disabled_for_deconstruction = { +local disabled_for_deconstruction = +{ ['fish'] = true, ['huge-rock'] = true, ['big-rock'] = true, ['big-sand-rock'] = true, - ['mineable-wreckage'] = true } -local tile_replacements = { +local tile_replacements = +{ ['dirt-1'] = 'grass-1', ['dirt-2'] = 'grass-2', ['dirt-3'] = 'grass-3', @@ -42,7 +43,8 @@ local tile_replacements = { } local rocks = { 'big-rock', 'big-rock', 'huge-rock' } -local decos = { +local decos = +{ 'green-hairy-grass', 'green-hairy-grass', 'green-hairy-grass', @@ -55,7 +57,8 @@ local decos = { } local decos_inside_forest = { 'brown-asterisk', 'brown-asterisk', 'brown-carpet-grass', 'brown-hairy-grass' } -local noises = { +local noises = +{ ['forest_location'] = { { modifier = 0.006, weight = 1 }, { modifier = 0.01, weight = 0.25 }, { modifier = 0.05, weight = 0.15 }, { modifier = 0.1, weight = 0.05 } }, ['forest_density'] = { { modifier = 0.01, weight = 1 }, { modifier = 0.05, weight = 0.5 }, { modifier = 0.1, weight = 0.025 } } } @@ -68,16 +71,8 @@ local function get_noise(name, pos, seed) return noise end -local function shuffle(tbl) - local size = #tbl - for i = size, 1, -1 do - local rand = math_random(size) - tbl[i], tbl[rand] = tbl[rand], tbl[i] - end - return tbl -end - -local entities_to_convert = { +local entities_to_convert = +{ ['coal'] = true, ['copper-ore'] = true, ['iron-ore'] = true, @@ -92,7 +87,8 @@ local entities_to_convert = { ['thorium-ore'] = true } -local trees_to_remove = { +local trees_to_remove = +{ ['dead-dry-hairy-tree'] = true, ['dead-grey-trunk'] = true, ['dead-tree-desert'] = true, @@ -141,7 +137,7 @@ local function process_tile(surface, pos, tile, seed) end if math_random(1, 100000) == 1 then - local wrecks = { 'big-ship-wreck-1', 'big-ship-wreck-2', 'big-ship-wreck-3' } + local wrecks = { 'crash-site-spaceship-wreck-big-1', 'crash-site-spaceship-wreck-big-2', 'crash-site-spaceship-wreck-medium-1' } local e = surface.create_entity { name = wrecks[math_random(1, #wrecks)], position = pos, force = 'neutral' } e.insert({ name = 'raw-fish', count = math_random(3, 25) }) if math_random(1, 3) == 1 then @@ -189,7 +185,6 @@ local function on_chunk_generated(event) local surface = event.surface local left_top = event.area.left_top local tiles = {} - local entities = {} local seed = game.surfaces[1].map_gen_settings.seed --surface.destroy_decoratives({area = event.area}) @@ -200,7 +195,6 @@ local function on_chunk_generated(event) for x = 0.5, 31.5, 1 do for y = 0.5, 31.5, 1 do - local tile_to_insert = false local pos = { x = left_top.x + x, y = left_top.y + y } local tile = surface.get_tile(pos) @@ -265,7 +259,8 @@ local function on_player_joined_game(event) game.surfaces['nauvis'].ticks_per_day = game.surfaces['nauvis'].ticks_per_day * 2 - storage.entity_yield = { + storage.entity_yield = + { ['tree-01'] = { 'iron-ore' }, ['tree-02-red'] = { 'copper-ore' }, ['tree-04'] = { 'coal' }, @@ -343,25 +338,24 @@ local function on_player_mined_entity(event) local main_item = storage.entity_yield[entity.name][math_random(1, #storage.entity_yield[entity.name])] - entity.surface.create_entity( + local player = game.players[event.player_index] + + player.create_local_flying_text( { - name = 'flying-text', position = entity.position, text = '+' .. amount .. ' [item=' .. main_item .. '] +' .. second_item_amount .. ' [item=' .. second_item .. ']', color = { r = 0.8, g = 0.8, b = 0.8 } } ) - local player = game.players[event.player_index] - local inserted_count = player.insert({ name = main_item, count = amount }) amount = amount - inserted_count if amount > 0 then entity.surface.spill_item_stack(entity.position, { name = main_item, count = amount }, true) end - local inserted_count = player.insert({ name = second_item, count = second_item_amount }) - second_item_amount = second_item_amount - inserted_count + local second_inserted_count = player.insert({ name = second_item, count = second_item_amount }) + second_item_amount = second_item_amount - second_inserted_count if second_item_amount > 0 then entity.surface.spill_item_stack(entity.position, { name = second_item, count = second_item_amount }, true) end @@ -415,10 +409,10 @@ local on_init = function () T.sub_caption_color = { r = 255, g = 0, b = 255 } end -event.on_init(on_init) -event.add(defines.events.on_research_finished, on_research_finished) -event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_player_mined_entity, on_player_mined_entity) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_chunk_generated, on_chunk_generated) +Event.on_init(on_init) +Event.add(defines.events.on_research_finished, on_research_finished) +Event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction) +Event.add(defines.events.on_player_joined_game, on_player_joined_game) +Event.add(defines.events.on_player_mined_entity, on_player_mined_entity) +Event.add(defines.events.on_entity_died, on_entity_died) +Event.add(defines.events.on_chunk_generated, on_chunk_generated) diff --git a/maps/choppy_dx.lua b/maps/choppy_dx.lua index 72d822e17..d1872ccea 100644 --- a/maps/choppy_dx.lua +++ b/maps/choppy_dx.lua @@ -1,4 +1,8 @@ --luacheck: ignore +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + --choppy-- mewmew made this -- --neko barons attempt to mix up map gen-- @@ -22,15 +26,16 @@ local math_random = math.random --storage.choppy_nightmare = true -local disabled_for_deconstruction = { +local disabled_for_deconstruction = +{ ['fish'] = true, ['huge-rock'] = true, ['big-rock'] = true, - ['big-sand-rock'] = true, - ['mineable-wreckage'] = true + ['big-sand-rock'] = true } -local tile_replacements = { +local tile_replacements = +{ ['dirt-1'] = 'grass-1', ['dirt-2'] = 'grass-2', ['dirt-3'] = 'grass-3', @@ -47,7 +52,8 @@ local tile_replacements = { } local rocks = { 'big-rock', 'big-rock', 'huge-rock' } -local decos = { +local decos = +{ 'green-hairy-grass', 'green-hairy-grass', 'green-hairy-grass', @@ -60,21 +66,24 @@ local decos = { } -- local decos_inside_forest = {"brown-asterisk","brown-asterisk", "brown-carpet-grass","brown-hairy-grass"} // unused? -local noises = { +local noises = +{ --["forest_location"] = {{modifier = 0.006, weight = 1}, {modifier = 0.01, weight = 0.25}, {modifier = 0.05, weight = 0.15}, {modifier = 0.1, weight = 0.05}}, - ['forest_location'] = { + ['forest_location'] = + { { modifier = 0.006, weight = 0.60 }, - { modifier = 0.01, weight = 0.20 }, - { modifier = 0.05, weight = 0.12 }, - { modifier = 0.1, weight = 0.08 } + { modifier = 0.01, weight = 0.20 }, + { modifier = 0.05, weight = 0.12 }, + { modifier = 0.1, weight = 0.08 } }, ['forest_density'] = { { modifier = 0.01, weight = 0.8 }, { modifier = 0.05, weight = 0.4 } }, --["forest_region"] = {{modifier = 0.001, weight = 1}, {modifier = 0.025, weight = 0.5}, {modifier = 0.02, weight = 0.025}} - ['forest_region'] = { + ['forest_region'] = + { { modifier = 0.0005, weight = 0.85 }, - { modifier = 0.005, weight = 0.25 }, - { modifier = 0.01, weight = 0.15 }, - { modifier = 0.05, weight = 0.05 } + { modifier = 0.005, weight = 0.25 }, + { modifier = 0.01, weight = 0.15 }, + { modifier = 0.05, weight = 0.05 } } } local function get_noise(name, pos, seed) @@ -86,7 +95,8 @@ local function get_noise(name, pos, seed) return noise end -local entities_to_convert = { +local entities_to_convert = +{ ['coal'] = true, ['copper-ore'] = true, ['iron-ore'] = true, @@ -101,7 +111,8 @@ local entities_to_convert = { ['thorium-ore'] = true } -local trees_to_remove = { +local trees_to_remove = +{ ['dead-dry-hairy-tree'] = true, ['dead-grey-trunk'] = true, ['dead-tree-desert'] = true, @@ -152,7 +163,7 @@ local function process_tile(surface, pos, tile, entities, seed) end if math_random(1, 100000) == 1 then - local wrecks = { 'big-ship-wreck-1', 'big-ship-wreck-2', 'big-ship-wreck-3' } + local wrecks = { 'crash-site-spaceship-wreck-big-1', 'crash-site-spaceship-wreck-big-2', 'crash-site-spaceship-wreck-medium-1' } local e = surface.create_entity { name = wrecks[math_random(1, #wrecks)], position = pos, force = 'neutral' } e.insert({ name = 'raw-fish', count = math_random(3, 25) }) if math_random(1, 3) == 1 then @@ -277,7 +288,7 @@ local function process_chunk(area) for y = 0.5, 31.5, 1 do local pos = { x = left_top.x + x, y = left_top.y + y } - local tile = surface.get_tile(pos) + local tile = surface.get_tile(pos.x, pos.y) if tile_replacements[tile.name] then tiles[#tiles + 1] = { name = tile_replacements[tile.name], position = pos } end @@ -382,7 +393,8 @@ local function on_player_joined_game(event) --game.surfaces["nauvis"].ticks_per_day = game.surfaces["nauvis"].ticks_per_day * 2 - storage.entity_yield = { + storage.entity_yield = + { ['tree-01'] = { 'iron-ore' }, ['tree-02-red'] = { 'copper-ore' }, ['tree-04'] = { 'coal' }, @@ -534,7 +546,8 @@ local function generate_treevein(entity, player) local radius = 28 --player.print("checking") if - surface.count_entities_filtered { + surface.count_entities_filtered + { area = { { p.x - radius, p.y - radius }, { p.x + radius, p.y + radius } }, name = { 'iron-ore', 'copper-ore', 'coal', 'stone', 'uranium-ore' }, limit = 1 @@ -550,8 +563,8 @@ local function generate_treevein(entity, player) local modifier_raffle = { { 0, -1 }, { -1, 0 }, { 1, 0 }, { 0, 1 } } local ores_to_place = math_random(size[2], size[3]) + math.floor(ore_count * 0.040) while ore_entities_placed < ores_to_place do - local a = math.ceil(math_random(ore_count * 14, ore_count * 20) + ore_entities_placed * 8, 0) - for x = 1, 150, 1 do + local a = math.ceil(math_random(ore_count * 14, ore_count * 20) + ore_entities_placed * 8) + for _ = 1, 150, 1 do local m = modifier_raffle[math_random(1, #modifier_raffle)] local pos = { x = p.x + m[1], y = p.y + m[2] } if surface.can_place_entity({ name = mined_loot, position = pos, amount = a }) then @@ -648,8 +661,8 @@ local function on_player_mined_entity(event) entity.surface.spill_item_stack(entity.position, { name = main_item, count = amount }, true) end - local inserted_count = player.insert({ name = second_item, count = second_item_amount }) - second_item_amount = second_item_amount - inserted_count + local second_inserted_count = player.insert({ name = second_item, count = second_item_amount }) + second_item_amount = second_item_amount - second_inserted_count if second_item_amount > 0 then entity.surface.spill_item_stack(entity.position, { name = second_item, count = second_item_amount }, true) end @@ -686,7 +699,8 @@ local function on_entity_died(event) for _, entity in pairs( event.entity.surface.find_entities_filtered( { - area = { + area = + { { event.entity.position.x - 4, event.entity.position.y - 4 }, { event.entity.position.x + 4, event.entity.position.y + 4 } }, diff --git a/maps/chronosphere/gui.lua b/maps/chronosphere/gui.lua index aa7ca189f..fa484c453 100644 --- a/maps/chronosphere/gui.lua +++ b/maps/chronosphere/gui.lua @@ -14,7 +14,8 @@ local Minimap = require 'maps.chronosphere.minimap' local function create_gui(player) local frame = player.gui.top.add({type = 'frame', name = 'chronosphere'}) - frame.style.maximal_height = 38 + frame.style.minimal_height = 40 + frame.style.maximal_height = 40 local label local button diff --git a/maps/crab_defender/main.lua b/maps/crab_defender/main.lua index 6c54feb34..d071df8e7 100644 --- a/maps/crab_defender/main.lua +++ b/maps/crab_defender/main.lua @@ -1,3 +1,7 @@ +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + require 'maps.crab_defender.terrain' require 'maps.crab_defender.market' require 'maps.crab_defender.commands' diff --git a/maps/cratewood_forest.lua b/maps/cratewood_forest.lua deleted file mode 100644 index 209ed4b0e..000000000 --- a/maps/cratewood_forest.lua +++ /dev/null @@ -1,114 +0,0 @@ ---luacheck: ignore -local event = require 'utils.event' -local simplex_noise = require 'utils.math.simplex_noise'.d2 -require 'modules.satellite_score' -require 'modules.biter_noms_you' -require 'modules.dangerous_goods' -require 'modules.spawners_contain_biters' -require 'modules.splice_double' - -local math_random = math.random -local math_floor = math.floor -local math_abs = math.abs -local math_sqrt = math.sqrt - -local LootRaffle = require 'utils.functions.loot_raffle' - -local function get_noise(name, pos) - local seed = game.surfaces[1].map_gen_settings.seed - local noise_seed_add = 25000 - if name == 1 then - local noise = {} - noise[1] = simplex_noise(pos.x * 0.005, pos.y * 0.005, seed) - seed = seed + noise_seed_add - noise[2] = simplex_noise(pos.x * 0.01, pos.y * 0.01, seed) - seed = seed + noise_seed_add - noise[3] = simplex_noise(pos.x * 0.05, pos.y * 0.05, seed) - seed = seed + noise_seed_add - noise[4] = simplex_noise(pos.x * 0.1, pos.y * 0.1, seed) - local noise = noise[1] + noise[2] * 0.35 + noise[3] * 0.23 + noise[4] * 0.11 - return noise - end - seed = seed + noise_seed_add * 5 - if name == 2 then - local noise = {} - noise[1] = simplex_noise(pos.x * 0.01, pos.y * 0.01, seed) - seed = seed + noise_seed_add - noise[2] = simplex_noise(pos.x * 0.05, pos.y * 0.05, seed) - local noise = noise[1] + noise[2] * 0.1 - return noise - end -end - -local function process_tile(surface, pos) - local noise = get_noise(1, pos) - local noise_2 = get_noise(2, pos) - - if noise < 0.12 and noise > -0.12 then - return - end - - if noise_2 < 0.12 and noise_2 > -0.12 then - return - end - - local tile = surface.get_tile(pos) - if tile.collides_with('player') then - return - end - - if surface.can_place_entity({ name = 'wooden-chest', position = pos, force = 'neutral' }) then - local e = surface.create_entity({ name = 'wooden-chest', position = pos, force = 'neutral' }) - - if math_abs(noise_2) > 0.76 or math_random(1, 32) == 1 then - local budget = math_sqrt(pos.x ^ 2 + pos.y ^ 2) + 1 - local item_stacks = LootRaffle.roll(budget, 16) - for _, item_stack in pairs(item_stacks) do - e.insert(item_stack) - end - end - end -end - -local function get_spawn_position() - for y = 0, 1024, 1 do - for x = 0, 1024, 1 do - local pos = { x = x, y = y } - local noise = get_noise(1, pos) - if noise < 0.08 and noise > -0.08 then - return pos - end - end - end -end - -local function on_chunk_generated(event) - local surface = event.surface - local left_top = event.area.left_top - for x = 0.5, 31.5, 1 do - for y = 0.5, 31.5, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - process_tile(surface, pos) - end - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - if player.online_time == 0 then - player.insert { name = 'pistol', count = 1 } - player.insert { name = 'firearm-magazine', count = 16 } - player.insert { name = 'iron-plate', count = 100 } - player.insert { name = 'copper-plate', count = 50 } - player.insert { name = 'car', count = 1 } - end -end - -local function on_init() - local surface = game.surfaces[1] - game.forces['player'].set_spawn_position(get_spawn_position(surface), surface) -end - -event.on_init(on_init) -event.add(defines.events.on_chunk_generated, on_chunk_generated) -event.add(defines.events.on_player_joined_game, on_player_joined_game) diff --git a/maps/crossing.lua b/maps/crossing.lua index 9e331decf..f1e717092 100644 --- a/maps/crossing.lua +++ b/maps/crossing.lua @@ -1,8 +1,8 @@ -- crossing -- by mewmew -- local Event = require 'utils.event' -local map_functions = require 'utils.tools.map_functions' -local simplex_noise = require 'utils.math.simplex_noise'.d2 +local MapFunctions = require 'utils.tools.map_functions' +local SimplexNoise = require 'utils.math.simplex_noise'.d2 local function on_player_joined_game(event) local player = game.players[event.player_index] @@ -33,7 +33,7 @@ local function on_chunk_generated(event) if left_top.x > 128 then if not storage.spawn_ores_generated then - map_functions.draw_noise_tile_circle({ x = 0, y = 0 }, 'water', surface, 24) + MapFunctions.draw_noise_tile_circle({ x = 0, y = 0 }, 'water', surface, 24) storage.spawn_ores_generated = true end end @@ -42,10 +42,10 @@ local function on_chunk_generated(event) for x = 0, 31, 1 do for y = 0, 31, 1 do local pos = { x = left_top.x + x, y = left_top.y + y } - local noise_1 = simplex_noise(pos.x * 0.02, pos.y * 0.02, seed) + local noise_1 = SimplexNoise(pos.x * 0.02, pos.y * 0.02, seed) if pos.x > -80 + (noise_1 * 8) and pos.x < 80 + (noise_1 * 8) then - local tile = surface.get_tile(pos) + local tile = surface.get_tile(pos.x, pos.y) if tile.name == 'water' or tile.name == 'deepwater' then surface.set_tiles({ { name = 'grass-2', position = pos } }) end @@ -66,10 +66,10 @@ local function on_chunk_generated(event) for x = 0, 31, 1 do for y = 0, 31, 1 do local pos = { x = left_top.x + x, y = left_top.y + y } - local noise_1 = simplex_noise(pos.x * 0.015, pos.y * 0.015, seed) + local noise_1 = SimplexNoise(pos.x * 0.015, pos.y * 0.015, seed) if pos.y > -80 + (noise_1 * 8) and pos.y < 80 + (noise_1 * 8) then - local tile = surface.get_tile(pos) + local tile = surface.get_tile(pos.x, pos.y) if tile.name == 'water' or tile.name == 'deepwater' then surface.set_tiles({ { name = 'grass-2', position = pos } }) end diff --git a/maps/cube.lua b/maps/cube.lua deleted file mode 100644 index 22c798f22..000000000 --- a/maps/cube.lua +++ /dev/null @@ -1,176 +0,0 @@ ---luacheck: ignore --- cuuuubee -local event = require 'utils.event' - -function draw_entity_line(surface, name, position_a, position_b) - local distance = math.sqrt((position_a[1] - position_b[1]) ^ 2 + (position_a[2] - position_b[2]) ^ 2) - local modifier = { (position_b[1] - position_a[1]) / distance, (position_b[2] - position_a[2]) / distance } - local position = { position_a[1], position_a[2] } - local entities = {} - for i = 1, distance, 1 do - if surface.can_place_entity({ name = name, position = position }) then - entities[#entities + 1] = surface.create_entity({ name = name, position = position, create_build_effect_smoke = false }) - end - position = { position[1] + modifier[1], position[2] + modifier[2] } - end - return entities -end - -local function on_chunk_generated(event) - local surface = game.surfaces['cube'] - if event.surface.name ~= surface.name then - return - end - local chunk_pos_x = event.area.left_top.x - local chunk_pos_y = event.area.left_top.y - local area = { - left_top = { x = chunk_pos_x, y = chunk_pos_y }, - right_bottom = { x = chunk_pos_x + 31, y = chunk_pos_y + 31 } - } - surface.destroy_decoratives({ area = event.area }) - local decoratives = {} - - for _, e in pairs(surface.find_entities_filtered({ area = event.area })) do - if e.valid then - if e.name ~= 'character' then - e.destroy() - end - end - end - - local tiles = {} - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = event.area.left_top.x + x, y = event.area.left_top.y + y } - table.insert(tiles, { name = 'sand-1', position = pos }) - end - end - surface.set_tiles(tiles, true) -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - if not storage.map_init_done then - local map_gen_settings = {} - map_gen_settings.water = 'none' - map_gen_settings.cliff_settings = { cliff_elevation_interval = 20, cliff_elevation_0 = 20 } - map_gen_settings.autoplace_controls = { - --["coal"] = {frequency = "none", size = "none", richness = "none"}, - --["stone"] = {frequency = "none", size = "none", richness = "none"}, - --["copper-ore"] = {frequency = "none", size = "none", richness = "none"}, - --["uranium-ore"] = {frequency = "none", size = "none", richness = "none"}, - --["iron-ore"] = {frequency = "none", size = "none", richness = "none"}, - --["crude-oil"] = {frequency = "none", size = "none", richness = "none"}, - --["trees"] = {frequency = "none", size = "none", richness = "none"}, - ['enemy-base'] = { frequency = 'none', size = 'none', richness = 'none' } - } - game.map_settings.pollution.pollution_restored_per_tree_damage = 0 - game.create_surface('cube', map_gen_settings) - game.forces['player'].set_spawn_position({ 0, 0 }, game.surfaces['cube']) - local surface = game.surfaces['cube'] - - surface.daytime = 1 - surface.freeze_daytime = 1 - - storage.cube_pixels = {} - storage.rotation = { x = 0, y = 0, z = 0 } - - storage.map_init_done = true - end - local surface = game.surfaces['cube'] - if player.online_time < 5 and surface.is_chunk_generated({ 0, 0 }) then - player.teleport(surface.find_non_colliding_position('character', { 0, 0 }, 2, 1), 'cube') - else - if player.online_time < 5 then - player.teleport({ 0, 0 }, 'cube') - end - end - if player.online_time < 10 then - player.insert { name = 'raw-fish', count = 3 } - player.insert { name = 'light-armor', count = 1 } - end -end - -local cube_vectors = { - { -16, -16, 16 }, - { 16, -16, 16 }, - { 16, 16, 16 }, - { -16, 16, 16 }, - { -16, -16, -16 }, - { 16, -16, -16 }, - { 16, 16, -16 }, - { -16, 16, -16 } -} - -local function wipe_pixels() - for _, line in pairs(storage.cube_pixels) do - for _, pixel in pairs(line) do - pixel.destroy() - end - storage.cube_pixels[_] = nil - end -end - -local function draw_lines(vectors) - wipe_pixels() - local surface = game.surfaces['cube'] - for i = 1, 4, 1 do - local position_a = vectors[i] - local position_b = vectors[i + 1] - if i == 4 then - position_b = vectors[1] - end - storage.cube_pixels[#storage.cube_pixels + 1] = draw_entity_line(surface, 'stone-wall', position_a, position_b) - end - for i = 5, 8, 1 do - local position_a = vectors[i] - local position_b = vectors[i + 1] - if i == 8 then - position_b = vectors[5] - end - storage.cube_pixels[#storage.cube_pixels + 1] = draw_entity_line(surface, 'stone-wall', position_a, position_b) - end - - storage.cube_pixels[#storage.cube_pixels + 1] = draw_entity_line(surface, 'stone-wall', vectors[1], vectors[5]) - storage.cube_pixels[#storage.cube_pixels + 1] = draw_entity_line(surface, 'stone-wall', vectors[2], vectors[6]) - storage.cube_pixels[#storage.cube_pixels + 1] = draw_entity_line(surface, 'stone-wall', vectors[3], vectors[7]) - storage.cube_pixels[#storage.cube_pixels + 1] = draw_entity_line(surface, 'stone-wall', vectors[4], vectors[8]) -end - -local function draw_cube() - storage.rotation = { x = storage.rotation.x + 0.025, y = storage.rotation.y + 0.025, z = storage.rotation.z + 0.025 } - - local vectors = {} - for _, vector in pairs(cube_vectors) do - local new_vector = { vector[1], vector[2] } - - --new_vector = { - -- vector[1] * math.cos(storage.rotation.x) - vector[2] * math.sin(storage.rotation.y) - new_vector[1] - vector[3] * math.sin(storage.rotation.y), - -- vector[2] * math.sin(storage.rotation.x) + vector[2] * math.cos(storage.rotation.y) + new_vector[2] + vector[3] * math.cos(storage.rotation.y), - --} - - new_vector[1] = new_vector[1] + vector[3] * math.cos(storage.rotation.z) * 0.75 - new_vector[2] = new_vector[2] + vector[3] * math.sin(storage.rotation.z) * 0.75 - - vectors[#vectors + 1] = new_vector - end - draw_lines(vectors) -end - -local function on_tick(event) - if game.tick % 4 ~= 0 then - return - end - - draw_cube() - - --if game.tick % 300 ~= 0 then return end - - --local radius = 256 - --game.forces.player.chart(surface, {{x = -1 * radius, y = -1 * radius}, {x = radius, y = radius}}) -end - -event.add(defines.events.on_tick, on_tick) -event.add(defines.events.on_chunk_generated, on_chunk_generated) -event.add(defines.events.on_chunk_charted, on_chunk_charted) -event.add(defines.events.on_player_joined_game, on_player_joined_game) diff --git a/maps/deep_jungle/main.lua b/maps/deep_jungle/main.lua index eb1f1a302..ace9173c0 100644 --- a/maps/deep_jungle/main.lua +++ b/maps/deep_jungle/main.lua @@ -1,3 +1,7 @@ +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + require 'modules.no_deconstruction_of_neutral_entities' require 'modules.spawners_contain_biters' require 'modules.biters_yield_coins' @@ -130,7 +134,8 @@ local function on_init() map_gen_settings.water = 'none' map_gen_settings.starting_area = 'normal' map_gen_settings.cliff_settings = { cliff_elevation_interval = 4, cliff_elevation_0 = 0.1 } - map_gen_settings.autoplace_controls = { + map_gen_settings.autoplace_controls = + { ['coal'] = { frequency = 'none', size = 'none', richness = 'none' }, ['stone'] = { frequency = 'none', size = 'none', richness = 'none' }, ['copper-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, diff --git a/maps/deep_jungle/terrain.lua b/maps/deep_jungle/terrain.lua index 975bcd065..8f2af1e09 100644 --- a/maps/deep_jungle/terrain.lua +++ b/maps/deep_jungle/terrain.lua @@ -13,55 +13,52 @@ local function shuffle(tbl) end local function secret_shop(pos, surface) - local secret_market_items = { - { price = { { 'coin', random(300, 600) } }, offer = { type = 'give-item', item = 'combat-shotgun' } }, - { price = { { 'coin', random(200, 400) } }, offer = { type = 'give-item', item = 'rocket-launcher' } }, - { price = { { 'coin', random(5, 10) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, - --{price = {{"coin", random(150,250)}}, offer = {type = 'give-item', item = 'uranium-rounds-magazine'}}, - { price = { { 'coin', random(15, 30) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } }, - { price = { { 'coin', random(10, 20) } }, offer = { type = 'give-item', item = 'rocket' } }, - { price = { { 'coin', random(20, 30) } }, offer = { type = 'give-item', item = 'explosive-rocket' } }, - { price = { { 'coin', random(30, 60) } }, offer = { type = 'give-item', item = 'cluster-grenade' } }, - { price = { { 'coin', random(8, 16) } }, offer = { type = 'give-item', item = 'land-mine' } }, - { price = { { 'coin', random(200, 300) } }, offer = { type = 'give-item', item = 'heavy-armor' } }, - { price = { { 'coin', random(400, 800) } }, offer = { type = 'give-item', item = 'modular-armor' } }, - { price = { { 'coin', random(1000, 2000) } }, offer = { type = 'give-item', item = 'power-armor' } }, - { price = { { 'coin', random(2500, 5000) } }, offer = { type = 'give-item', item = 'fusion-reactor-equipment' } }, - { price = { { 'coin', random(200, 400) } }, offer = { type = 'give-item', item = 'battery-equipment' } }, - { price = { { 'coin', random(150, 250) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } }, - { price = { { 'coin', random(100, 200) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } }, - { price = { { 'coin', random(400, 800) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } }, - { price = { { 'coin', random(200, 300) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } }, - { price = { { 'coin', random(25, 50) } }, offer = { type = 'give-item', item = 'construction-robot' } }, - -- {price = {{"coin", random(10000,20000)}}, offer = {type = 'give-item', item = 'energy-shield-equipment'}}, - -- {price = {{"coin", random(5000,15000)}}, offer = {type = 'give-item', item = 'personal-laser-defense-equipment'}}, - { price = { { 'coin', random(100, 300) } }, offer = { type = 'give-item', item = 'loader' } }, - { price = { { 'coin', random(200, 400) } }, offer = { type = 'give-item', item = 'fast-loader' } }, - { price = { { 'coin', random(300, 500) } }, offer = { type = 'give-item', item = 'express-loader' } }, - { price = { { 'coin', random(150, 300) } }, offer = { type = 'give-item', item = 'locomotive' } }, - { price = { { 'coin', random(100, 200) } }, offer = { type = 'give-item', item = 'cargo-wagon' } }, - { price = { { 'coin', random(5, 15) } }, offer = { type = 'give-item', item = 'grenade' } }, - { price = { { 'coin', random(80, 160) } }, offer = { type = 'give-item', item = 'cliff-explosives' } }, - { price = { { 'coin', random(10, 20) } }, offer = { type = 'give-item', item = 'explosives', count = 50 } }, - { price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'rail', count = 4 } }, - { price = { { 'coin', random(20, 30) } }, offer = { type = 'give-item', item = 'train-stop' } }, - { price = { { 'coin', random(4, 12) } }, offer = { type = 'give-item', item = 'small-lamp' } }, - { price = { { 'coin', random(1, 4) } }, offer = { type = 'give-item', item = 'firearm-magazine' } }, - { price = { { 'coin', random(60, 150) } }, offer = { type = 'give-item', item = 'car', count = 1 } }, - { price = { { 'coin', random(75, 150) } }, offer = { type = 'give-item', item = 'gun-turret', count = 1 } }, - { price = { { 'coin', random(500, 750) } }, offer = { type = 'give-item', item = 'laser-turret', count = 1 } }, - { price = { { 'coin', random(1000, 2000) } }, offer = { type = 'give-item', item = 'artillery-turret', count = 1 } }, - { price = { { 'coin', random(100, 200) } }, offer = { type = 'give-item', item = 'artillery-shell', count = 1 } }, - { price = { { 'coin', random(50, 150) } }, offer = { type = 'give-item', item = 'artillery-targeting-remote', count = 1 } }, - { price = { { 'coin', random(5, 15) } }, offer = { type = 'give-item', item = 'shotgun-shell', count = 1 } }, - { price = { { 'coin', random(8000, 16000) } }, offer = { type = 'give-item', item = 'power-armor-mk2', count = 1 } }, - { price = { { 'coin', random(80, 160) } }, offer = { type = 'give-item', item = 'solar-panel-equipment', count = 1 } }, - { price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'wood', count = 50 } }, - { price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'iron-ore', count = 50 } }, - { price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'copper-ore', count = 50 } }, - { price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'stone', count = 50 } }, - { price = { { 'coin', random(4, 8) } }, offer = { type = 'give-item', item = 'coal', count = 50 } } - --{price = {{"coin", random(4,8)}}, offer = {type = 'give-item', item = 'uranium-ore', count = 50}} + local secret_market_items = + { + { price = { { name = 'coin', count = random(300, 600) } }, offer = { type = 'give-item', item = 'combat-shotgun' } }, + { price = { { name = 'coin', count = random(200, 400) } }, offer = { type = 'give-item', item = 'rocket-launcher' } }, + { price = { { name = 'coin', count = random(5, 10) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, + { price = { { name = 'coin', count = random(15, 30) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } }, + { price = { { name = 'coin', count = random(10, 20) } }, offer = { type = 'give-item', item = 'rocket' } }, + { price = { { name = 'coin', count = random(20, 30) } }, offer = { type = 'give-item', item = 'explosive-rocket' } }, + { price = { { name = 'coin', count = random(30, 60) } }, offer = { type = 'give-item', item = 'cluster-grenade' } }, + { price = { { name = 'coin', count = random(8, 16) } }, offer = { type = 'give-item', item = 'land-mine' } }, + { price = { { name = 'coin', count = random(200, 300) } }, offer = { type = 'give-item', item = 'heavy-armor' } }, + { price = { { name = 'coin', count = random(400, 800) } }, offer = { type = 'give-item', item = 'modular-armor' } }, + { price = { { name = 'coin', count = random(1000, 2000) } }, offer = { type = 'give-item', item = 'power-armor' } }, + { price = { { name = 'coin', count = random(2500, 5000) } }, offer = { type = 'give-item', item = 'fusion-reactor-equipment' } }, + { price = { { name = 'coin', count = random(200, 400) } }, offer = { type = 'give-item', item = 'battery-equipment' } }, + { price = { { name = 'coin', count = random(150, 250) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } }, + { price = { { name = 'coin', count = random(100, 200) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } }, + { price = { { name = 'coin', count = random(400, 800) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } }, + { price = { { name = 'coin', count = random(200, 300) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } }, + { price = { { name = 'coin', count = random(25, 50) } }, offer = { type = 'give-item', item = 'construction-robot' } }, + { price = { { name = 'coin', count = random(100, 300) } }, offer = { type = 'give-item', item = 'loader' } }, + { price = { { name = 'coin', count = random(200, 400) } }, offer = { type = 'give-item', item = 'fast-loader' } }, + { price = { { name = 'coin', count = random(300, 500) } }, offer = { type = 'give-item', item = 'express-loader' } }, + { price = { { name = 'coin', count = random(150, 300) } }, offer = { type = 'give-item', item = 'locomotive' } }, + { price = { { name = 'coin', count = random(100, 200) } }, offer = { type = 'give-item', item = 'cargo-wagon' } }, + { price = { { name = 'coin', count = random(5, 15) } }, offer = { type = 'give-item', item = 'grenade' } }, + { price = { { name = 'coin', count = random(80, 160) } }, offer = { type = 'give-item', item = 'cliff-explosives' } }, + { price = { { name = 'coin', count = random(10, 20) } }, offer = { type = 'give-item', item = 'explosives', count = 50 } }, + { price = { { name = 'coin', count = random(4, 8) } }, offer = { type = 'give-item', item = 'rail', count = 4 } }, + { price = { { name = 'coin', count = random(20, 30) } }, offer = { type = 'give-item', item = 'train-stop' } }, + { price = { { name = 'coin', count = random(4, 12) } }, offer = { type = 'give-item', item = 'small-lamp' } }, + { price = { { name = 'coin', count = random(1, 4) } }, offer = { type = 'give-item', item = 'firearm-magazine' } }, + { price = { { name = 'coin', count = random(60, 150) } }, offer = { type = 'give-item', item = 'car', count = 1 } }, + { price = { { name = 'coin', count = random(75, 150) } }, offer = { type = 'give-item', item = 'gun-turret', count = 1 } }, + { price = { { name = 'coin', count = random(500, 750) } }, offer = { type = 'give-item', item = 'laser-turret', count = 1 } }, + { price = { { name = 'coin', count = random(1000, 2000) } }, offer = { type = 'give-item', item = 'artillery-turret', count = 1 } }, + { price = { { name = 'coin', count = random(100, 200) } }, offer = { type = 'give-item', item = 'artillery-shell', count = 1 } }, + { price = { { name = 'coin', count = random(50, 150) } }, offer = { type = 'give-item', item = 'artillery-targeting-remote', count = 1 } }, + { price = { { name = 'coin', count = random(5, 15) } }, offer = { type = 'give-item', item = 'shotgun-shell', count = 1 } }, + { price = { { name = 'coin', count = random(8000, 16000) } }, offer = { type = 'give-item', item = 'power-armor-mk2', count = 1 } }, + { price = { { name = 'coin', count = random(80, 160) } }, offer = { type = 'give-item', item = 'solar-panel-equipment', count = 1 } }, + { price = { { name = 'coin', count = random(4, 8) } }, offer = { type = 'give-item', item = 'wood', count = 50 } }, + { price = { { name = 'coin', count = random(4, 8) } }, offer = { type = 'give-item', item = 'iron-ore', count = 50 } }, + { price = { { name = 'coin', count = random(4, 8) } }, offer = { type = 'give-item', item = 'copper-ore', count = 50 } }, + { price = { { name = 'coin', count = random(4, 8) } }, offer = { type = 'give-item', item = 'stone', count = 50 } }, + { price = { { name = 'coin', count = random(4, 8) } }, offer = { type = 'give-item', item = 'coal', count = 50 } } } secret_market_items = shuffle(secret_market_items) @@ -264,7 +261,7 @@ local function process_bits(data) rare_treasure_chest(v) end for _, v in pairs(secret_shops) do - if not surface.get_tile(v).collides_with('player') then + if not surface.get_tile(v.x, v.y).collides_with('player') then local area = { { v.x - 128, v.y - 128 }, { v.x + 128, v.y + 128 } } if surface.count_entities_filtered({ name = 'market', area = area }) == 0 then secret_shop(v, surface) diff --git a/maps/desert_oasis.lua b/maps/desert_oasis.lua index 82652b4ab..6560fcc40 100644 --- a/maps/desert_oasis.lua +++ b/maps/desert_oasis.lua @@ -1,3 +1,7 @@ +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + if not script.active_mods['space-age'] then require 'modules.satellite_score' end @@ -17,7 +21,8 @@ local sand_damage = oasis_start * 100 + 16 local trees = { 'tree-01', 'tree-04', 'tree-06', 'tree-08-red', 'tree-08', 'tree-09' } -local safe_tiles = { +local safe_tiles = +{ ['stone-path'] = true, ['concrete'] = true, ['hazard-concrete-left'] = true, @@ -35,7 +40,7 @@ local safe_tiles = { } local function calculate_vulcanus(surface, position) - local temperatures = surface.calculate_tile_properties({'vulcanus_temperature'}, {position}) + local temperatures = surface.calculate_tile_properties({ 'vulcanus_temperature' }, { position }) local temperature = temperatures and temperatures['vulcanus_temperature'][1] -- 75 mini hot, 100 hot a lot -- 50% moisture, 0% moisture @@ -51,20 +56,20 @@ local function calculate_nauvis(_surface, position) end local function calculate_fulgora(surface, position) - local elevations = surface.calculate_tile_properties({'fulgora_elevation'}, {position}) + local elevations = surface.calculate_tile_properties({ 'fulgora_elevation' }, { position }) local elevation = elevations['fulgora_elevation'][1] -- 0 ocean, 105 plateaus -- 60% moisture, 45% moisture - local moisture = math.round((-1/7) * elevation + 60, 1) + local moisture = math.round((-1 / 7) * elevation + 60, 1) return moisture end local function calculate_gleba(surface, position) - local elevations = surface.calculate_tile_properties({'gleba_elevation'}, {position}) + local elevations = surface.calculate_tile_properties({ 'gleba_elevation' }, { position }) local elevation = elevations['gleba_elevation'][1] -- 0 water, 150 plateaus -- 100%+ moisture, 80% moisture - local moisture = math.round((-2/15) * elevation + 100, 1) + local moisture = math.round((-2 / 15) * elevation + 100, 1) return moisture end @@ -74,7 +79,8 @@ local function calculate_aquilo(_surface, _position) end local function get_moisture(surface, position) - local planet_calcs = { + local planet_calcs = + { nauvis = calculate_nauvis, gleba = calculate_gleba, vulcanus = calculate_vulcanus, @@ -129,7 +135,7 @@ local function draw_oasis(surface, left_top, seed) else tiles[#tiles + 1] = { name = 'water-shallow', position = position } if math_random(1, 6) == 1 then - decoratives[#decoratives + 1] = {name = 'green-bush-mini', position = position, amount = math_random(1, 6)} + decoratives[#decoratives + 1] = { name = 'green-bush-mini', position = position, amount = math_random(1, 6) } end end @@ -150,10 +156,10 @@ local function draw_oasis(surface, left_top, seed) end end elseif noise < -0.9 then - decoratives[#decoratives + 1] = {name = 'sand-decal', position = position, amount = 1} + decoratives[#decoratives + 1] = { name = 'sand-decal', position = position, amount = 1 } else if math_random(1, 6) == 1 then - decoratives[#decoratives + 1] = {name = 'sand-dune-decal', position = position, amount = 1} + decoratives[#decoratives + 1] = { name = 'sand-dune-decal', position = position, amount = 1 } end end end @@ -166,7 +172,7 @@ local function draw_oasis(surface, left_top, seed) surface.create_entity(entity) end end - surface.create_decoratives({decoratives = decoratives, check_collision = true}) + surface.create_decoratives({ decoratives = decoratives, check_collision = true }) end local function create_crash_site(surface, position) @@ -208,7 +214,7 @@ local function on_chunk_generated(event) end draw_oasis(surface, left_top, seed) if left_top.x == 64 and left_top.y == 64 then - create_crash_site(surface, {75, 75}) + create_crash_site(surface, { 75, 75 }) end end @@ -218,16 +224,19 @@ local function on_init() T.main_caption_color = { r = 170, g = 170, b = 0 } T.sub_caption_color = { r = 120, g = 120, b = 0 } - local map_gen_settings = { + local map_gen_settings = + { water = 0.0, - property_expression_names = { + property_expression_names = + { temperature = 50, moisture = 0, elevation = 'elevation_nauvis' }, starting_area = 2, terrain_segmentation = 0.1, - cliff_settings = { + cliff_settings = + { cliff_elevation_interval = 40, cliff_elevation_0 = 0, cliff_smoothing = 0, @@ -236,7 +245,8 @@ local function on_init() control = 'nauvis_cliff' }, default_enable_all_autoplace_controls = false, - autoplace_controls = { + autoplace_controls = + { ['coal'] = { frequency = 23, size = 0.5, richness = 1.25 }, ['stone'] = { frequency = 20, size = 0.5, richness = 0.66 }, ['copper-ore'] = { frequency = 25, size = 0.5, richness = 1.25 }, @@ -245,124 +255,152 @@ local function on_init() ['crude-oil'] = { frequency = 50, size = 0.55, richness = 2 }, ['trees'] = { frequency = 0.75, size = 0.75, richness = 0.1 }, ['enemy-base'] = { frequency = 15, size = 1, richness = 1 }, - ['nauvis_cliff'] = {frequency = 5, size = 3, richness = 2}, - ['rocks'] = {frequency = 3, size = 6, richness = 5} + ['nauvis_cliff'] = { frequency = 5, size = 3, richness = 2 }, + ['rocks'] = { frequency = 3, size = 6, richness = 5 } }, - autoplace_settings = { - decorative = { + autoplace_settings = + { + decorative = + { treat_missing_as_default = false, - settings = { + settings = + { - ['red-desert-bush'] = { + ['red-desert-bush'] = + { frequency = 4, richness = 4, size = 4 }, - ['white-desert-bush'] = { + ['white-desert-bush'] = + { frequency = 4, richness = 4, size = 4 }, - ['small-rock'] = { + ['small-rock'] = + { frequency = 4, richness = 4, size = 4 }, - ['small-sand-rock'] = { + ['small-sand-rock'] = + { frequency = 6, richness = 4, size = 4 }, - ['medium-sand-rock'] = { + ['medium-sand-rock'] = + { frequency = 8, richness = 4, size = 4 }, } }, - tile = { + tile = + { treat_missing_as_default = false, - settings = { - ["red-desert-1"] = { + settings = + { + ["red-desert-1"] = + { frequency = 1, richness = 1, size = 1 }, - ["red-desert-2"] = { + ["red-desert-2"] = + { frequency = 1, richness = 1, size = 1 }, - ["red-desert-3"] = { + ["red-desert-3"] = + { frequency = 1, richness = 1, size = 1 }, - ["sand-1"] = { + ["sand-1"] = + { frequency = 1, richness = 1, size = 1 }, - ["sand-2"] = { + ["sand-2"] = + { frequency = 1, richness = 1, size = 1 }, - ["sand-3"] = { + ["sand-3"] = + { frequency = 1, richness = 1, size = 1 }, } }, - entity = { - settings = { - coal = { + entity = + { + settings = + { + coal = + { frequency = 1, richness = 1, size = 1 }, - ["copper-ore"] = { + ["copper-ore"] = + { frequency = 1, richness = 1, size = 1 }, - ["crude-oil"] = { + ["crude-oil"] = + { frequency = 1, richness = 1, size = 1 }, - fish = { + fish = + { frequency = 1, richness = 1, size = 1 }, - ['big-sand-rock'] = { + ['big-sand-rock'] = + { frequency = 5, size = 3, richness = 3 }, - ['huge-sand-rock'] = { + ['huge-sand-rock'] = + { frequency = 5, size = 3, richness = 3 }, - ["huge-rock"] = { + ["huge-rock"] = + { frequency = 1, richness = 1, size = 1 }, - ["iron-ore"] = { + ["iron-ore"] = + { frequency = 1, richness = 1, size = 1 }, - stone = { + stone = + { frequency = 1, richness = 1, size = 1 }, - ["uranium-ore"] = { + ["uranium-ore"] = + { frequency = 1, richness = 1, size = 1 @@ -397,7 +435,8 @@ local function on_init() force.technologies['cliff-explosives'].enabled = false end -local type_whitelist = { +local type_whitelist = +{ ['artillery-wagon'] = true, ['car'] = true, ['spider-vehicle'] = true, @@ -454,14 +493,14 @@ local function deny_building(event) if item then player.insert(item) end - FT.flying_text(player, entity.surface , entity.position, 'Can not be built in the sands!', { r = 0.98, g = 0.66, b = 0.22 }) + FT.flying_text(player, entity.surface, entity.position, 'Can not be built in the sands!', { r = 0.98, g = 0.66, b = 0.22 }) end else local inventory = event.robot.get_inventory(defines.inventory.robot_cargo) if item then inventory.insert(item) end - FT.flying_text(nil, entity.surface , entity.position, 'Can not be built in the sands!', { r = 0.98, g = 0.66, b = 0.22 }) + FT.flying_text(nil, entity.surface, entity.position, 'Can not be built in the sands!', { r = 0.98, g = 0.66, b = 0.22 }) end entity.destroy() end @@ -508,7 +547,7 @@ local function on_player_joined_game(event) player.insert({ name = 'stone', count = 5 }) player.insert({ name = 'pistol', count = 1 }) player.insert({ name = 'firearm-magazine', count = 16 }) - player.teleport(game.surfaces.nauvis.find_non_colliding_position('character', { 64, 64 }, 50, 0.5) or {64, 64}, 'nauvis') + player.teleport(game.surfaces.nauvis.find_non_colliding_position('character', { 64, 64 }, 50, 0.5) or { 64, 64 }, 'nauvis') end end diff --git a/maps/fish_defender/boss_biters.lua b/maps/fish_defender/boss_biters.lua deleted file mode 100644 index 7fc284375..000000000 --- a/maps/fish_defender/boss_biters.lua +++ /dev/null @@ -1,99 +0,0 @@ -local FDT = require 'maps.fish_defender.table' - -local boss_biter = {} -local math_random = math.random -local radius = 6 -local targets = {} -local acid_splashes = { - ['big-biter'] = 'acid-stream-worm-medium', - ['behemoth-biter'] = 'acid-stream-worm-big', - ['big-spitter'] = 'acid-stream-worm-medium', - ['behemoth-spitter'] = 'acid-stream-worm-big' -} -local acid_lines = { - ['big-spitter'] = 'acid-stream-spitter-medium', - ['behemoth-spitter'] = 'acid-stream-spitter-big' -} -for x = radius * -1, radius, 1 do - for y = radius * -1, radius, 1 do - if math.sqrt(x ^ 2 + y ^ 2) <= radius then - targets[#targets + 1] = {x = x, y = y} - end - end -end - -local function acid_nova(event) - for _ = 1, math.random(16, 32) do - local i = math.random(1, #targets) - event.entity.surface.create_entity( - { - name = acid_splashes[event.entity.name], - position = event.entity.position, - force = event.entity.force.name, - source = event.entity.position, - target = {x = event.entity.position.x + targets[i].x, y = event.entity.position.y + targets[i].y}, - max_range = radius, - speed = 0.001 - } - ) - end -end - -boss_biter.died = function(event) - local this = FDT.get() - if acid_splashes[event.entity.name] then - acid_nova(event) - end - if this.acid_lines_delay[event.entity.unit_number] then - this.acid_lines_delay[event.entity.unit_number] = nil - end - this.boss_biters[event.entity.unit_number] = nil -end - -local function acid_line(surface, name, source, target) - local distance = math.sqrt((source.x - target.x) ^ 2 + (source.y - target.y) ^ 2) - - if distance > 16 then - return false - end - - local modifier = {(target.x - source.x) / distance, (target.y - source.y) / distance} - - local position = {source.x, source.y} - - for i = 1, distance + 4, 1 do - if math_random(1, 3) == 1 then - surface.create_entity( - { - name = name, - position = source, - force = 'enemy', - source = source, - target = position, - max_range = 25, - speed = 1 - } - ) - end - position = {position[1] + modifier[1], position[2] + modifier[2]} - end - - return true -end - -boss_biter.damaged_entity = function(event) - if acid_lines[event.cause.name] then - local this = FDT.get() - if not this.acid_lines_delay[event.cause.unit_number] then - this.acid_lines_delay[event.cause.unit_number] = 0 - end - - if this.acid_lines_delay[event.cause.unit_number] < game.tick then - if acid_line(event.cause.surface, acid_lines[event.cause.name], event.cause.position, event.entity.position) then - this.acid_lines_delay[event.cause.unit_number] = game.tick + 180 - end - end - end -end - -return boss_biter diff --git a/maps/fish_defender/bouncy_shells.lua b/maps/fish_defender/bouncy_shells.lua deleted file mode 100644 index 554326e1c..000000000 --- a/maps/fish_defender/bouncy_shells.lua +++ /dev/null @@ -1,71 +0,0 @@ -local radius = 9 -local math_random = math.random - -local ammo_to_projectile_translation = { - ['shotgun-shell'] = 'shotgun-pellet', - ['piercing-shotgun-shell'] = 'piercing-shotgun-pellet' -} - -local function create_projectile(surface, position, target, name) - surface.create_entity( - { - name = name, - position = position, - source = position, - target = target, - max_range = 16, - speed = 0.3 - } - ) -end - -local function bounce(surface, position, ammo) - if math_random(1, 3) ~= 1 then - return - end - local valid_entities = {} - for _, e in pairs(surface.find_entities_filtered({area = {{position.x - radius, position.y - radius}, {position.x + radius, position.y + radius}}})) do - if e.health then - if e.force.name ~= 'player' then - --local distance_from_center = math_sqrt((e.position.x - position.x) ^ 2 + (e.position.y - position.y) ^ 2) - --if distance_from_center <= radius then - valid_entities[#valid_entities + 1] = e - --end - end - end - end - - if not valid_entities[1] then - return - end - - for _ = 1, math_random(3, 6), 1 do - create_projectile(surface, position, valid_entities[math_random(1, #valid_entities)].position, ammo) - end -end - -local function bouncy_shells(event) - if event.damage_type.name ~= 'physical' then - return false - end - local player = event.cause - if player.shooting_state.state == defines.shooting.not_shooting then - return false - end - local selected_weapon = player.get_inventory(defines.inventory.character_guns)[player.selected_gun_index] - if selected_weapon.name ~= 'combat-shotgun' and selected_weapon.name ~= 'shotgun' then - return false - end - - local selected_ammo = player.get_inventory(defines.inventory.character_ammo)[player.selected_gun_index] - if not selected_ammo then - return - end - if not ammo_to_projectile_translation[selected_ammo.name] then - return - end - - bounce(player.surface, event.entity.position, ammo_to_projectile_translation[selected_ammo.name]) -end - -return bouncy_shells diff --git a/maps/fish_defender/combat_balance.lua b/maps/fish_defender/combat_balance.lua deleted file mode 100644 index 9f728c4b1..000000000 --- a/maps/fish_defender/combat_balance.lua +++ /dev/null @@ -1,63 +0,0 @@ -local Event = require 'utils.event' -local gain_multiplier = 4 - -local balance_functions = { - ['land-mine'] = function (force_name) - if not storage.combat_balance[force_name].land_mine then - storage.combat_balance[force_name].land_mine = -0.5 - end - game.forces[force_name].set_ammo_damage_modifier('landmine', storage.combat_balance[force_name].land_mine) - end, - ['stronger-explosives'] = function (force_name) - if not storage.combat_balance[force_name].land_mine then - storage.combat_balance[force_name].land_mine = -0.5 - end - storage.combat_balance[force_name].land_mine = storage.combat_balance[force_name].land_mine + 0.05 - game.forces[force_name].set_ammo_damage_modifier('landmine', storage.combat_balance[force_name].land_mine) - end -} - -local function combat_balance(event) - local research_name = event.research.name - local force_name = event.research.force.name - local key - for b = 1, string.len(research_name), 1 do - key = string.sub(research_name, 0, b) - if balance_functions[key] then - if not storage.combat_balance[force_name] then - storage.combat_balance[force_name] = {} - end - balance_functions[key](force_name) - return - end - end -end - -local function on_research_finished(event) - local research = event.research - local force_name = research.force.name - - if not storage.shotgun_shell_damage_modifier_old[force_name] then - storage.shotgun_shell_damage_modifier_old[force_name] = game.forces[force_name].get_ammo_damage_modifier('shotgun-shell') - 0.1 - end - - if string.sub(research.name, 0, 26) == 'physical-projectile-damage' then - local current_damage = game.forces[force_name].get_ammo_damage_modifier('shotgun-shell') - local vanilla_gain = current_damage - storage.shotgun_shell_damage_modifier_old[force_name] - local additional_gain = vanilla_gain * (gain_multiplier - 1) - game.forces[force_name].set_ammo_damage_modifier('shotgun-shell', current_damage + additional_gain) - end - - storage.shotgun_shell_damage_modifier_old[force_name] = game.forces[force_name].get_ammo_damage_modifier('shotgun-shell') - - combat_balance(event) -end - -local function on_init() - game.forces.player.set_ammo_damage_modifier('shotgun-shell', 1) - storage.shotgun_shell_damage_modifier_old = {} - storage.combat_balance = {} -end - -Event.on_init(on_init) -Event.add(defines.events.on_research_finished, on_research_finished) diff --git a/maps/fish_defender/commands.lua b/maps/fish_defender/commands.lua deleted file mode 100644 index 00a101ae2..000000000 --- a/maps/fish_defender/commands.lua +++ /dev/null @@ -1,93 +0,0 @@ -local Server = require 'utils.server' -local FDT = require 'maps.fish_defender.table' - -local mapkeeper = '[color=blue]Mapkeeper:[/color]' - -commands.add_command( - 'scenario', - 'Usable only for admins - controls the scenario!', - function(cmd) - local p - local player = game.player - - if not player or not player.valid then - p = log - else - p = player.print - if not player.admin then - return - end - end - - local param = cmd.parameter - - if param == 'restart' or param == 'shutdown' or param == 'reset' or param == 'restartnow' then - goto continue - else - p('[ERROR] Arguments are:\nrestart\nshutdown\nreset\nrestartnow') - return - end - - ::continue:: - - local this = FDT.get() - local reset_map = require 'maps.fish_defender.main' - - if not this.reset_are_you_sure then - this.reset_are_you_sure = true - p('[WARNING] This command will disable the soft-reset feature, run this command again if you really want to do this!') - return - end - - if param == 'restart' then - if this.restart then - this.reset_are_you_sure = nil - this.restart = false - this.soft_reset = true - p('[SUCCESS] Soft-reset is enabled.') - return - else - this.reset_are_you_sure = nil - this.restart = true - this.soft_reset = false - if this.shutdown then - this.shutdown = false - end - p('[WARNING] Soft-reset is disabled! Server will restart from scenario.') - return - end - elseif param == 'restartnow' then - this.reset_are_you_sure = nil - p(player.name .. ' has restarted the game.') - Server.start_scenario('Fish_Defender') - return - elseif param == 'shutdown' then - if this.shutdown then - this.reset_are_you_sure = nil - this.shutdown = false - this.soft_reset = true - p('[SUCCESS] Soft-reset is enabled.') - return - else - this.reset_are_you_sure = nil - this.shutdown = true - this.soft_reset = false - if this.restart then - this.restart = false - end - p('[WARNING] Soft-reset is disabled! Server will shutdown.') - return - end - elseif param == 'reset' then - this.reset_are_you_sure = nil - if player and player.valid then - game.print(mapkeeper .. ' ' .. player.name .. ', has reset the game!', {r = 0.98, g = 0.66, b = 0.22}) - else - game.print(mapkeeper .. ' server, has reset the game!', {r = 0.98, g = 0.66, b = 0.22}) - end - reset_map(true) - p('[WARNING] Game has been reset!') - return - end - end -) diff --git a/maps/fish_defender/crumbly_walls.lua b/maps/fish_defender/crumbly_walls.lua deleted file mode 100644 index 8686015b0..000000000 --- a/maps/fish_defender/crumbly_walls.lua +++ /dev/null @@ -1,25 +0,0 @@ -local Event = require 'utils.event' -local FDT = require 'maps.fish_defender.table' -local math_random = math.random - -local rock_raffle = { 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' } - -local function on_entity_died(event) - local crumbly_walls_unlocked = FDT.get('crumbly_walls_unlocked') - if not crumbly_walls_unlocked then - return - end - local entity = event.entity - if not entity.valid then - return - end - if entity.name ~= 'stone-wall' then - return - end - if math_random(1, 4) == 1 then - return - end - entity.surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = entity.position, force = 'player' }) -end - -Event.add(defines.events.on_entity_died, on_entity_died) diff --git a/maps/fish_defender/explosive_gun_bullets.lua b/maps/fish_defender/explosive_gun_bullets.lua deleted file mode 100644 index 342fc5573..000000000 --- a/maps/fish_defender/explosive_gun_bullets.lua +++ /dev/null @@ -1,42 +0,0 @@ -local radius = 3 - -local function splash_damage(surface, position, final_damage_amount) - local damage = math.random(math.floor(final_damage_amount * 3), math.floor(final_damage_amount * 4)) - for _, e in pairs(surface.find_entities_filtered({area = {{position.x - radius, position.y - radius}, {position.x + radius, position.y + radius}}})) do - if e.valid and e.health then - local distance_from_center = math.sqrt((e.position.x - position.x) ^ 2 + (e.position.y - position.y) ^ 2) - if distance_from_center <= radius then - local damage_distance_modifier = 1 - distance_from_center / radius - if damage > 0 then - if math.random(1, 3) == 1 then - surface.create_entity({name = 'explosion', position = e.position}) - end - e.damage(damage * damage_distance_modifier, 'player', 'explosion') - end - end - end - end -end - -local function explosive_bullets(event) - if math.random(1, 3) ~= 1 then - return false - end - if event.damage_type.name ~= 'physical' then - return false - end - local player = event.cause - if player.shooting_state.state == defines.shooting.not_shooting then - return false - end - local selected_weapon = player.get_inventory(defines.inventory.character_guns)[player.selected_gun_index] - if selected_weapon.name ~= 'submachine-gun' and selected_weapon.name ~= 'pistol' then - return false - end - - player.surface.create_entity({name = 'explosion', position = event.entity.position}) - - splash_damage(player.surface, event.entity.position, event.final_damage_amount) -end - -return explosive_bullets diff --git a/maps/fish_defender/flame_boots.lua b/maps/fish_defender/flame_boots.lua deleted file mode 100644 index 919ec064e..000000000 --- a/maps/fish_defender/flame_boots.lua +++ /dev/null @@ -1,52 +0,0 @@ -local Event = require 'utils.event' -local FDT = require 'maps.fish_defender.table' - -local function on_player_changed_position(event) - local flame_boots = FDT.get('flame_boots') - if not flame_boots then - return - end - local player = game.players[event.player_index] - if not player.character then - return - end - if player.character.driving then - return - end - - if not flame_boots[player.index] then - flame_boots[player.index] = {} - end - - if not flame_boots[player.index].fuel then - return - end - - if flame_boots[player.index].fuel < 0 then - player.print('Your flame boots have worn out.', {r = 0.22, g = 0.77, b = 0.44}) - flame_boots[player.index] = {} - return - end - - if flame_boots[player.index].fuel % 500 == 0 then - player.print('Fuel remaining: ' .. flame_boots[player.index].fuel, {r = 0.22, g = 0.77, b = 0.44}) - end - - if not flame_boots[player.index].step_history then - flame_boots[player.index].step_history = {} - end - - local elements = #flame_boots[player.index].step_history - - flame_boots[player.index].step_history[elements + 1] = {x = player.position.x, y = player.position.y} - - if elements < 50 then - return - end - - player.surface.create_entity({name = 'fire-flame', position = flame_boots[player.index].step_history[elements - 2]}) - - flame_boots[player.index].fuel = flame_boots[player.index].fuel - 1 -end - -Event.add(defines.events.on_player_changed_position, on_player_changed_position) diff --git a/maps/fish_defender/laser_pointer.lua b/maps/fish_defender/laser_pointer.lua deleted file mode 100644 index 33f111fdd..000000000 --- a/maps/fish_defender/laser_pointer.lua +++ /dev/null @@ -1,37 +0,0 @@ -local Event = require 'utils.event' -local FDT = require 'maps.fish_defender.table' -local radius = 32 - -local function on_player_used_capsule(event) - local laser_pointer_unlocked = FDT.get('laser_pointer_unlocked') - if not laser_pointer_unlocked then - return - end - - local player = game.players[event.player_index] - local position = event.position - local used_item = event.item - if used_item.name ~= 'artillery-targeting-remote' then - return - end - - for _, unit in pairs(player.surface.find_enemy_units(position, radius, 'player')) do - if math.random(1, 2) == 1 then - unit.set_command( - { - type = defines.command.go_to_location, - destination = position, - radius = 2, - distraction = defines.distraction.none, - pathfind_flags = { - allow_destroy_friendly_entities = false, - prefer_straight_paths = false, - low_priority = false - } - } - ) - end - end -end - -Event.add(defines.events.on_player_used_capsule, on_player_used_capsule) diff --git a/maps/fish_defender/main.lua b/maps/fish_defender/main.lua deleted file mode 100644 index e074dceed..000000000 --- a/maps/fish_defender/main.lua +++ /dev/null @@ -1,1371 +0,0 @@ ---luacheck: ignore --- fish defender -- by mewmew -- - ---require "modules.rpg" - -require 'maps.fish_defender.market' -require 'maps.fish_defender.commands' -require 'maps.fish_defender.on_entity_damaged' -require 'modules.rocket_launch_always_yields_science' -require 'modules.biters_yield_coins' -require 'modules.dangerous_goods' -require 'modules.custom_death_messages' -require 'modules.launch_fish_to_win' - -local AntiGrief = require 'utils.antigrief' -local Terrain = require 'maps.fish_defender.terrain' -local Unit_health_booster = require 'modules.biter_health_booster' -local Session = require 'utils.datastore.session_data' -local Difficulty = require 'modules.difficulty_vote' -local Map = require 'modules.map_info' -local Event = require 'utils.event' -local Reset = require 'utils.functions.soft_reset' -local Server = require 'utils.server' -local Poll = require 'utils.gui.poll' -local boss_biter = require 'maps.fish_defender.boss_biters' -local FDT = require 'maps.fish_defender.table' -local Score = require 'utils.gui.score' -local math_random = math.random -local insert = table.insert -local enable_start_grace_period = true - -local starting_items = { ['pistol'] = 1, ['firearm-magazine'] = 16, ['raw-fish'] = 3, ['iron-plate'] = 32 } - -local biter_count_limit = 1024 --maximum biters on the east side of the map, next wave will be delayed if the maximum has been reached -local boss_waves = { - [50] = { { name = 'big-biter', count = 3 } }, - [100] = { { name = 'behemoth-biter', count = 1 } }, - [150] = { { name = 'behemoth-spitter', count = 4 }, { name = 'big-spitter', count = 16 } }, - [200] = { - { name = 'behemoth-biter', count = 4 }, - { name = 'behemoth-spitter', count = 2 }, - { name = 'big-biter', count = 32 } - }, - [250] = { - { name = 'behemoth-biter', count = 8 }, - { name = 'behemoth-spitter', count = 4 }, - { name = 'big-spitter', count = 32 } - }, - [300] = { { name = 'behemoth-biter', count = 16 }, { name = 'behemoth-spitter', count = 8 } } -} - -local difficulties_votes = { - [1] = { wave_interval = 4500, amount_modifier = 0.52, strength_modifier = 0.40, boss_modifier = 3.0 }, - [2] = { wave_interval = 4100, amount_modifier = 0.76, strength_modifier = 0.65, boss_modifier = 4.0 }, - [3] = { wave_interval = 3800, amount_modifier = 0.92, strength_modifier = 0.85, boss_modifier = 5.0 }, - [4] = { wave_interval = 3600, amount_modifier = 1.00, strength_modifier = 1.00, boss_modifier = 6.0 }, - [5] = { wave_interval = 3400, amount_modifier = 1.08, strength_modifier = 1.25, boss_modifier = 7.0 }, - [6] = { wave_interval = 3100, amount_modifier = 1.24, strength_modifier = 1.75, boss_modifier = 8.0 }, - [7] = { wave_interval = 2700, amount_modifier = 1.48, strength_modifier = 2.50, boss_modifier = 9.0 } -} - -local function shuffle(tbl) - local size = #tbl - for i = size, 1, -1 do - local rand = math.random(size) - tbl[i], tbl[rand] = tbl[rand], tbl[i] - end - return tbl -end - -local function create_wave_gui(player) - if player.gui.top['fish_defense_waves'] then - player.gui.top['fish_defense_waves'].destroy() - end - local this = FDT.get() - local frame = player.gui.top.add({ type = 'frame', name = 'fish_defense_waves', tooltip = 'Click to show map info' }) - frame.style.maximal_height = 38 - - local wave_count = 0 - if this.wave_count then - wave_count = this.wave_count - end - - if not this.wave_grace_period then - local label = frame.add({ type = 'label', caption = 'Wave: ' .. wave_count }) - label.style.font_color = { r = 0.88, g = 0.88, b = 0.88 } - label.style.font = 'default-listbox' - label.style.left_padding = 4 - label.style.right_padding = 4 - label.style.minimal_width = 68 - label.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - - local next_level_progress = game.tick % this.wave_interval / this.wave_interval - - local progressbar = frame.add({ type = 'progressbar', value = next_level_progress }) - progressbar.style.minimal_width = 120 - progressbar.style.maximal_width = 120 - progressbar.style.top_padding = 10 - progressbar.style.height = 20 - else - local time_remaining = math.floor(((this.wave_grace_period - (game.tick % this.wave_grace_period)) / 60) / 60) - if time_remaining <= 0 then - this.wave_grace_period = nil - return - end - - local label = frame.add({ type = 'label', caption = 'Waves will start in ' .. time_remaining .. ' minutes.' }) - label.style.font_color = { r = 0.88, g = 0.88, b = 0.88 } - label.style.font = 'default-listbox' - label.style.left_padding = 4 - label.style.right_padding = 4 - label.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - - if not enable_start_grace_period then - this.wave_grace_period = nil - return - end - end -end - -local function show_fd_stats(player) - local gui_id = 'fd-stats' - local table_id = gui_id .. 'table' - local entity_limits = FDT.get('entity_limits') - - if player.gui.left[gui_id] then - player.gui.left[gui_id].destroy() - end - - local frame = - player.gui.left.add { - type = 'frame', - name = gui_id - } - local table = - frame.add { - type = 'table', - name = table_id, - column_count = 2 - } - - local table_header = { 'Building', 'Placed' .. '/' .. 'Limit' } - for k, v in pairs(table_header) do - local h = table.add { type = 'label', caption = v } - h.style.font = 'heading-2' - end - - for k, v in pairs(entity_limits) do - local name = v.str - local placed = v.placed - local limit = v.limit - local entry = { name, placed .. '/' .. limit } - for k, v in pairs(entry) do - table.add { - type = 'label', - caption = v - } - end - end -end - -local function update_fd_stats() - for _, player in pairs(game.connected_players) do - if player.gui.left['fd-stats'] then - show_fd_stats(player) - end - end -end - -local function add_fd_stats_button(player) - local button_id = 'fd-stats-button' - if player.gui.top[button_id] then - player.gui.top[button_id].destroy() - end - local button = - player.gui.top.add { - type = 'sprite-button', - name = button_id, - sprite = 'item/submachine-gun' - } -end - -local function on_gui_click(event) - if not event.element.valid then - return - end - if event.element.name ~= 'fd-stats-button' then - return - end - local player = game.players[event.player_index] - local frame = player.gui.left['fd-stats'] - if frame == nil then - show_fd_stats(player) - else - frame.destroy() - end -end - -local function on_market_item_purchased(event) - update_fd_stats() -end - -local threat_values = { - ['small_biter'] = 1, - ['medium_biter'] = 3, - ['big_biter'] = 5, - ['behemoth_biter'] = 10, - ['small_spitter'] = 1, - ['medium_spitter'] = 3, - ['big_spitter'] = 5, - ['behemoth_spitter'] = 10 -} - -local function get_biter_initial_pool() - local wave_count = FDT.get('wave_count') - local biter_pool - if wave_count > 1750 then - biter_pool = { - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end - if wave_count > 1500 then - biter_pool = { - { name = 'big-biter', threat = threat_values.big_biter, weight = 1 }, - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end - if wave_count > 1250 then - biter_pool = { - { name = 'big-biter', threat = threat_values.big_biter, weight = 2 }, - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end - if wave_count > 1000 then - biter_pool = { - { name = 'big-biter', threat = threat_values.big_biter, weight = 3 }, - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.1 then - biter_pool = { - { name = 'small-biter', threat = threat_values.small_biter, weight = 3 }, - { name = 'small-spitter', threat = threat_values.small_spitter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.2 then - biter_pool = { - { name = 'small-biter', threat = threat_values.small_biter, weight = 10 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 2 }, - { name = 'small-spitter', threat = threat_values.small_spitter, weight = 5 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.3 then - biter_pool = { - { name = 'small-biter', threat = threat_values.small_biter, weight = 18 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 6 }, - { name = 'small-spitter', threat = threat_values.small_spitter, weight = 8 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 3 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.4 then - biter_pool = { - { name = 'small-biter', threat = threat_values.small_biter, weight = 2 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 8 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 2 }, - { name = 'small-spitter', threat = threat_values.small_spitter, weight = 1 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 4 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.5 then - biter_pool = { - { name = 'small-biter', threat = threat_values.small_biter, weight = 2 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 4 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 8 }, - { name = 'small-spitter', threat = threat_values.small_spitter, weight = 1 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 2 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 4 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.6 then - biter_pool = { - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 4 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 8 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 2 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 4 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.7 then - biter_pool = { - { name = 'behemoth-biter', threat = threat_values.small_biter, weight = 2 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 12 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 20 }, - { name = 'behemoth-spitter', threat = threat_values.small_spitter, weight = 1 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 6 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 10 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.8 then - biter_pool = { - { name = 'behemoth-biter', threat = threat_values.small_biter, weight = 2 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 4 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 10 }, - { name = 'behemoth-spitter', threat = threat_values.small_spitter, weight = 1 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 2 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 5 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor <= 0.9 then - biter_pool = { - { name = 'big-biter', threat = threat_values.big_biter, weight = 12 }, - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 6 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor <= 1 then - biter_pool = { - { name = 'big-biter', threat = threat_values.big_biter, weight = 4 }, - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 2 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end -end - -local function get_biter_pool() - local biter_pool = get_biter_initial_pool() - local biter_raffle = {} - for _, biter_type in pairs(biter_pool) do - for x = 1, biter_type.weight, 1 do - insert(biter_raffle, { name = biter_type.name, threat = biter_type.threat }) - end - end - return biter_raffle -end - -local function spawn_biter(pos, biter_pool) - local this = FDT.get() - if this.attack_wave_threat < 1 then - return false - end - - local surface = game.surfaces[this.active_surface_index] - biter_pool = shuffle(biter_pool) - this.attack_wave_threat = this.attack_wave_threat - biter_pool[1].threat - local valid_pos = surface.find_non_colliding_position(biter_pool[1].name, pos, 100, 2) - local biter = surface.create_entity({ name = biter_pool[1].name, position = valid_pos }) - biter.ai_settings.allow_destroy_when_commands_fail = false - biter.ai_settings.allow_try_return_to_spawner = false - return biter -end - -local function get_y_coord_raffle_table() - local t = {} - for y = -96, 96, 8 do - t[#t + 1] = y - end - table.shuffle_table(t) - return t -end - -local attack_group_count_thresholds = { - { 0, 1 }, - { 50, 2 }, - { 100, 3 }, - { 150, 4 }, - { 200, 5 }, - { 1000, 6 }, - { 2000, 7 }, - { 3000, 8 } -} - -local function get_number_of_attack_groups() - local n = 1 - local this = FDT.get() - for _, entry in pairs(attack_group_count_thresholds) do - if this.wave_count >= entry[1] then - n = entry[2] - end - end - return n -end - -local function clear_corpses(surface) - local wave_count = FDT.get('wave_count') - - if not wave_count then - return - end - local chance = 4 - if wave_count > 250 then - chance = 3 - end - if wave_count > 500 then - chance = 2 - end - for _, entity in pairs(surface.find_entities_filtered { type = 'corpse' }) do - if math_random(1, chance) == 1 then - entity.destroy() - end - end -end - -local function send_unit_group(unit_group) - local commands = {} - local market = FDT.get('market') - for x = unit_group.position.x, market.position.x, -48 do - local destination = unit_group.surface.find_non_colliding_position('stone-wall', { x = x, y = unit_group.position.y }, 32, 4) - if destination then - commands[#commands + 1] = { - type = defines.command.attack_area, - destination = destination, - radius = 16, - distraction = defines.distraction.by_enemy - } - end - end - commands[#commands + 1] = { - type = defines.command.attack_area, - destination = { x = market.position.x, y = unit_group.position.y }, - radius = 16, - distraction = defines.distraction.by_enemy - } - commands[#commands + 1] = { - type = defines.command.attack, - target = market, - distraction = defines.distraction.by_enemy - } - - unit_group.set_command( - { - type = defines.command.compound, - structure_type = defines.compound_command.logical_and, - commands = commands - } - ) -end - -local function spawn_boss_units(surface) - local Diff = Difficulty.get() - local this = FDT.get() - if this.wave_count <= 2000 then - game.print({ 'fish_defender.boss_message', this.wave_count, { 'fish_defender.' .. this.wave_count } }, { r = 0.8, g = 0.1, b = 0.1 }) - else - game.print({ 'fish_defender.boss_message', this.wave_count }, { r = 0.8, g = 0.1, b = 0.1 }) - end - - if not boss_waves[this.wave_count] then - local amount = this.wave_count - if amount > 1000 then - amount = 1000 - end - boss_waves[this.wave_count] = { - { name = 'behemoth-biter', count = math.floor(amount / 20) }, - { name = 'behemoth-spitter', count = math.floor(amount / 40) } - } - end - - local health_factor = difficulties_votes[Diff.difficulty_vote_index].boss_modifier - if this.wave_count == 100 then - health_factor = health_factor * 2 - end - - local position = { x = 216, y = 0 } - local biter_group = surface.create_unit_group({ position = position }) - for _, entry in pairs(boss_waves[this.wave_count]) do - for x = 1, entry.count, 1 do - local pos = surface.find_non_colliding_position(entry.name, position, 64, 3) - if pos then - local biter = surface.create_entity({ name = entry.name, position = pos }) - biter.ai_settings.allow_destroy_when_commands_fail = false - biter.ai_settings.allow_try_return_to_spawner = false - this.boss_biters[biter.unit_number] = biter - Unit_health_booster.add_boss_unit(biter, this.biter_health_boost * health_factor, 0.55) - biter_group.add_member(biter) - end - end - end - - send_unit_group(biter_group) -end - -local function wake_up_the_biters(surface) - local market = FDT.get('market') - if not market then - return - end - - local units = surface.find_entities_filtered({ type = 'unit' }) - units = shuffle(units) - local unit_groups = {} - local y_raffle = get_y_coord_raffle_table() - for i = 1, 2, 1 do - if not units[i] then - break - end - if not units[i].valid then - break - end - local x = units[i].position.x - if x > 256 then - x = 256 - end - local y = units[i].position.y - if y > 96 or y < -96 then - y = y_raffle[i] - end - - unit_groups[i] = surface.create_unit_group({ position = { x = x, y = y } }) - local biters = surface.find_enemy_units(units[i].position, 24, 'player') - for _, biter in pairs(biters) do - unit_groups[i].add_member(biter) - end - end - - for i = 1, #unit_groups, 1 do - if unit_groups[i].valid then - if #unit_groups[i].members > 0 then - send_unit_group(unit_groups[i]) - else - unit_groups[i].destroy() - end - end - end - - surface.set_multi_command( - { - command = { - type = defines.command.attack, - target = market, - distraction = defines.distraction.none - }, - unit_count = 16, - force = 'enemy', - unit_search_distance = 24 - } - ) -end - -local function damage_entity_outside_of_fence(e) - if not e.health then - return - end - if e.force.name == 'neutral' then - return - end - if e.type == 'unit' or e.type == 'unit-spawner' then - return - end - - e.surface.create_entity({ name = 'water-splash', position = e.position }) - - if e.type == 'entity-ghost' then - e.destroy() - return - end - - e.health = e.health - math_random(math.floor(e.max_health * 0.05), math.floor(e.max_health * 0.1)) - if e.health <= 0 then - e.die('enemy') - end -end - -local function biter_attack_wave() - local Diff = Difficulty.get() - local this = FDT.get() - - if not this.market then - return - end - if this.wave_grace_period then - return - end - local surface = game.surfaces[this.active_surface_index] - - clear_corpses(surface) - wake_up_the_biters(surface) - - if surface.count_entities_filtered({ type = 'unit' }) > biter_count_limit then - --game.print("Biter limit reached, wave delayed.", {r = 0.7, g = 0.1, b = 0.1}) - return - end - - if not this.wave_count then - this.wave_count = 1 - else - this.wave_count = this.wave_count + 1 - end - - local m = 0.0015 - if Diff.difficulty_vote_index then - m = m * difficulties_votes[Diff.difficulty_vote_index].strength_modifier - end - game.forces.enemy.set_ammo_damage_modifier('melee', this.wave_count * m) - game.forces.enemy.set_ammo_damage_modifier('biological', this.wave_count * m) - this.biter_health_boost = 1 + (this.wave_count * (m * 2)) - - local m = 4 - if Diff.difficulty_vote_index then - m = m * difficulties_votes[Diff.difficulty_vote_index].amount_modifier - end - - if this.wave_count % 50 == 0 then - this.attack_wave_threat = math.floor(this.wave_count * (m * 1.5)) - spawn_boss_units(surface) - if this.attack_wave_threat > 10000 then - this.attack_wave_threat = 10000 - end - else - this.attack_wave_threat = math.floor(this.wave_count * m) - if this.attack_wave_threat > 10000 then - this.attack_wave_threat = 10000 - end - end - - local evolution = this.wave_count * 0.00125 - if evolution > 1 then - evolution = 1 - end - game.forces.enemy.evolution_factor = evolution - - --if game.forces.enemy.evolution_factor == 1 then - -- if not this.endgame_modifier then - -- this.endgame_modifier = 1 - -- game.print("Endgame enemy evolution reached.", {r = 0.7, g = 0.1, b = 0.1}) - -- else - -- this.endgame_modifier = this.endgame_modifier + 1 - -- end - --end - - for _, e in pairs(surface.find_entities_filtered({ area = { { 160, -256 }, { 360, 256 } } })) do - damage_entity_outside_of_fence(e) - end - - local y_raffle = get_y_coord_raffle_table() - - local unit_groups = {} - if this.wave_count > 50 and math_random(1, 8) == 1 then - for i = 1, 10, 1 do - unit_groups[i] = surface.create_unit_group({ position = { x = 256, y = y_raffle[i] } }) - end - else - for i = 1, get_number_of_attack_groups(), 1 do - unit_groups[i] = surface.create_unit_group({ position = { x = 256, y = y_raffle[i] } }) - end - end - - local biter_pool = get_biter_pool() - --local spawners = surface.find_entities_filtered({type = "unit-spawner", area = {{160, -196},{512, 196}}}) - --table.shuffle_table(spawners) - - while this.attack_wave_threat > 0 do - for i = 1, #unit_groups, 1 do - --local biter - --if spawners[i] then - --biter = spawn_biter(spawners[i].position, biter_pool) - --else - --biter = spawn_biter(unit_groups[i].position, biter_pool) - --end - - local biter = spawn_biter(unit_groups[i].position, biter_pool) - if biter then - unit_groups[i].add_member(biter) - else - break - end - end - end - - for i = 1, #unit_groups, 1 do - send_unit_group(unit_groups[i]) - end -end - -local function get_sorted_list(column_name, score_list) - for x = 1, #score_list, 1 do - for y = 1, #score_list, 1 do - if not score_list[y + 1] then - break - end - if score_list[y][column_name] < score_list[y + 1][column_name] then - local key = score_list[y] - score_list[y] = score_list[y + 1] - score_list[y + 1] = key - end - end - end - return score_list -end - -local function get_mvps() - local get_score = Score.get_table().score_table - if not get_score['player'] then - return false - end - local score = get_score['player'] - local score_list = {} - for _, p in pairs(game.players) do - local killscore = 0 - if score.players[p.name].killscore then - killscore = score.players[p.name].killscore - end - local deaths = 0 - if score.players[p.name].deaths then - deaths = score.players[p.name].deaths - end - local built_entities = 0 - if score.players[p.name].built_entities then - built_entities = score.players[p.name].built_entities - end - local mined_entities = 0 - if score.players[p.name].mined_entities then - mined_entities = score.players[p.name].mined_entities - end - table.insert( - score_list, - { - name = p.name, - killscore = killscore, - deaths = deaths, - built_entities = built_entities, - mined_entities = mined_entities - } - ) - end - local mvp = {} - score_list = get_sorted_list('killscore', score_list) - mvp.killscore = { name = score_list[1].name, score = score_list[1].killscore } - score_list = get_sorted_list('deaths', score_list) - mvp.deaths = { name = score_list[1].name, score = score_list[1].deaths } - score_list = get_sorted_list('built_entities', score_list) - mvp.built_entities = { name = score_list[1].name, score = score_list[1].built_entities } - return mvp -end - -local function is_game_lost() - local market = FDT.get('market') - if market and market.valid then - return - end - - local this = FDT.get() - - for _, player in pairs(game.connected_players) do - if player.gui.left['fish_defense_game_lost'] then - return - end - local f = - player.gui.left.add( - { - type = 'frame', - name = 'fish_defense_game_lost', - caption = 'The fish market was overrun! The biters are having a feast :3', - direction = 'vertical' - } - ) - f.style.font_color = { r = 0.65, g = 0.1, b = 0.99 } - - local t = f.add({ type = 'table', column_count = 2 }) - local l = t.add({ type = 'label', caption = 'Survival Time >> ' }) - l.style.font = 'default-listbox' - l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - - if this.market_age >= 216000 then - local l = - t.add( - { - type = 'label', - caption = math.floor(((this.market_age / 60) / 60) / 60) .. ' hours ' .. math.ceil((this.market_age % 216000 / 60) / 60) .. ' minutes' - } - ) - l.style.font = 'default-bold' - l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - else - local l = t.add({ type = 'label', caption = math.ceil((this.market_age % 216000 / 60) / 60) .. ' minutes' }) - l.style.font = 'default-bold' - l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - end - - local mvp = get_mvps() - if mvp then - local l = t.add({ type = 'label', caption = 'MVP Defender >> ' }) - l.style.font = 'default-listbox' - l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score }) - l.style.font = 'default-bold' - l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - - local l = t.add({ type = 'label', caption = 'MVP Builder >> ' }) - l.style.font = 'default-listbox' - l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = - t.add( - { - type = 'label', - caption = mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things' - } - ) - l.style.font = 'default-bold' - l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - - local l = t.add({ type = 'label', caption = 'MVP Deaths >> ' }) - l.style.font = 'default-listbox' - l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times' }) - l.style.font = 'default-bold' - l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - - if not this.results_sent then - local result = {} - insert(result, 'MVP Defender: \\n') - insert(result, mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score .. '\\n') - insert(result, '\\n') - insert(result, 'MVP Builder: \\n') - insert(result, mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things\\n') - insert(result, '\\n') - insert(result, 'MVP Deaths: \\n') - insert(result, mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times') - local message = table.concat(result) - Server.to_discord_embed(message) - this.results_sent = true - end - end - - for _, player in pairs(game.connected_players) do - player.play_sound { path = 'utility/game_lost', volume_modifier = 0.75 } - end - end - - game.map_settings.enemy_expansion.enabled = true - game.map_settings.enemy_expansion.max_expansion_distance = 15 - game.map_settings.enemy_expansion.settler_group_min_size = 15 - game.map_settings.enemy_expansion.settler_group_max_size = 30 - game.map_settings.enemy_expansion.min_expansion_cooldown = 600 - game.map_settings.enemy_expansion.max_expansion_cooldown = 600 -end - -local function damage_entities_in_radius(surface, position, radius, damage) - local entities_to_damage = surface.find_entities_filtered({ area = { { position.x - radius, position.y - radius }, { position.x + radius, position.y + radius } } }) - for _, entity in pairs(entities_to_damage) do - if entity.valid then - if entity.health and entity.name ~= 'land-mine' then - if entity.force.name ~= 'enemy' then - if entity.name == 'character' then - entity.damage(damage, 'enemy') - else - entity.health = entity.health - damage - if entity.health <= 0 then - entity.die('enemy') - end - end - end - end - end - end -end - -local function market_kill_visuals() - local market = FDT.get('market') - local m = 32 - local m2 = m * 0.005 - for i = 1, 1024, 1 do - market.surface.create_particle( - { - name = 'branch-particle', - position = market.position, - frame_speed = 0.1, - vertical_speed = 0.1, - height = 0.1, - movement = { m2 - (math.random(0, m) * 0.01), m2 - (math.random(0, m) * 0.01) } - } - ) - end - for x = -5, 5, 0.5 do - for y = -5, 5, 0.5 do - if math_random(1, 2) == 1 then - market.surface.create_trivial_smoke( - { - name = 'smoke-fast', - position = { market.position.x + (x * 0.35), market.position.y + (y * 0.35) } - } - ) - end - if math_random(1, 3) == 1 then - market.surface.create_trivial_smoke( - { - name = 'train-smoke', - position = { market.position.x + (x * 0.35), market.position.y + (y * 0.35) } - } - ) - end - end - end - market.surface.spill_item_stack(market.position, { name = 'raw-fish', count = 1024 }, true) -end - -local biter_splash_damage = { - ['medium-biter'] = { - visuals = { 'blood-explosion-big', 'big-explosion' }, - radius = 1.5, - damage_min = 50, - damage_max = 100, - chance = 32 - }, - ['big-biter'] = { - visuals = { 'blood-explosion-huge', 'ground-explosion' }, - radius = 2, - damage_min = 75, - damage_max = 150, - chance = 48 - }, - ['behemoth-biter'] = { - visuals = { 'blood-explosion-huge', 'big-artillery-explosion' }, - radius = 2.5, - damage_min = 100, - damage_max = 200, - chance = 64 - } -} - -local function on_entity_died(event) - if not event.entity.valid then - return - end - - local this = FDT.get() - - if event.entity.force.name == 'enemy' then - local surface = event.entity.surface - - if this.boss_biters[event.entity.unit_number] then - boss_biter.died(event) - end - - local splash = biter_splash_damage[event.entity.name] - if splash then - if math_random(1, splash.chance) == 1 then - for _, visual in pairs(splash.visuals) do - surface.create_entity({ name = visual, position = event.entity.position }) - end - damage_entities_in_radius(surface, event.entity.position, splash.radius, math_random(splash.damage_min, splash.damage_max)) - return - end - end - - if event.entity.name == 'behemoth-biter' then - if math_random(1, 16) == 1 then - local p = surface.find_non_colliding_position('big-biter', event.entity.position, 3, 0.5) - if p then - surface.create_entity { name = 'big-biter', position = p } - end - end - for i = 1, math_random(1, 2), 1 do - local p = surface.find_non_colliding_position('medium-biter', event.entity.position, 3, 0.5) - if p then - surface.create_entity { name = 'medium-biter', position = p } - end - end - end - return - end - - if event.entity == this.market then - market_kill_visuals() - this.market = nil - this.market_age = game.tick - this.last_reset - is_game_lost() - end - - if this.entity_limits[event.entity.name] then - this.entity_limits[event.entity.name].placed = this.entity_limits[event.entity.name].placed - 1 - update_fd_stats() - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - local active_surface_index = FDT.get('active_surface_index') - - if player.online_time == 0 then - player.insert({ name = 'pistol', count = 1 }) - --player.insert({name = "iron-axe", count = 1}) - player.insert({ name = 'raw-fish', count = 3 }) - player.insert({ name = 'firearm-magazine', count = 16 }) - player.insert({ name = 'iron-plate', count = 32 }) - end - - local surface = game.surfaces[active_surface_index] - if not surface or not surface.valid then - return - end - - if player.surface.index ~= active_surface_index and surface.is_chunk_generated({ 0, 0 }) then - player.teleport(surface.find_non_colliding_position('character', game.forces['player'].get_spawn_position(surface), 50, 1), active_surface_index) - else - if player.surface.index ~= active_surface_index then - player.teleport(game.forces['player'].get_spawn_position(surface), active_surface_index) - end - end - - create_wave_gui(player) - add_fd_stats_button(player) - - if game.tick > 900 then - is_game_lost() - end - - --if this.charting_done then return end - --game.forces.player.chart(game.surfaces["fish_defender"], {{-256, -512},{768, 512}}) - --this.charting_done = true -end - -local function on_built_entity(event) - local get_score = Score.get_table().score_table - local this = FDT.get() - local entity = event.entity - if not entity.valid then - return - end - if this.entity_limits[entity.name] then - local surface = entity.surface - - if this.entity_limits[entity.name].placed < this.entity_limits[entity.name].limit then - this.entity_limits[entity.name].placed = this.entity_limits[entity.name].placed + 1 - surface.create_entity( - { - name = 'flying-text', - position = entity.position, - text = this.entity_limits[entity.name].placed .. ' / ' .. this.entity_limits[entity.name].limit .. ' ' .. this.entity_limits[entity.name].str .. 's', - color = { r = 0.98, g = 0.66, b = 0.22 } - } - ) - update_fd_stats() - else - surface.create_entity( - { - name = 'flying-text', - position = entity.position, - text = this.entity_limits[entity.name].str .. ' limit reached.', - color = { r = 0.82, g = 0.11, b = 0.11 } - } - ) - local player = game.players[event.player_index] - player.insert({ name = entity.name, count = 1 }) - if get_score then - if get_score[player.force.name] then - if get_score[player.force.name].players[player.name] then - get_score[player.force.name].players[player.name].built_entities = get_score[player.force.name].players[player.name].built_entities - 1 - end - end - end - entity.destroy() - end - end -end - -local function on_robot_built_entity(event) - local entity = event.entity - local entity_limits = FDT.get('entity_limits') - if entity_limits[entity.name] then - local surface = entity.surface - if entity_limits[entity.name].placed < entity_limits[entity.name].limit then - entity_limits[entity.name].placed = entity_limits[entity.name].placed + 1 - surface.create_entity( - { - name = 'flying-text', - position = entity.position, - text = entity_limits[entity.name].placed .. ' / ' .. entity_limits[entity.name].limit .. ' ' .. entity_limits[entity.name].str .. 's', - color = { r = 0.98, g = 0.66, b = 0.22 } - } - ) - update_fd_stats() - else - surface.create_entity( - { - name = 'flying-text', - position = entity.position, - text = entity_limits[entity.name].str .. ' limit reached.', - color = { r = 0.82, g = 0.11, b = 0.11 } - } - ) - local inventory = event.robot.get_inventory(defines.inventory.robot_cargo) - inventory.insert({ name = entity.name, count = 1 }) - entity.destroy() - end - end -end - -local function on_init(reset) - local Diff = Difficulty.get() - local get_score = Score.get_table() - - local this = FDT.get() - - AntiGrief.reset_tables() - FDT.reset_table() - Poll.reset() - storage.fish_in_space = 0 - - local difficulties = { - [1] = { - name = 'Normal', - value = 1, - color = { r = 0.00, g = 0.00, b = 0.25 }, - print_color = { r = 0.0, g = 0.0, b = 0.5 } - }, - [2] = { - name = 'Hard', - value = 1.5, - color = { r = 0.25, g = 0.00, b = 0.00 }, - print_color = { r = 0.4, g = 0.0, b = 0.00 } - }, - [3] = { - name = 'Nightmare', - value = 3, - color = { r = 0.35, g = 0.00, b = 0.00 }, - print_color = { r = 0.6, g = 0.0, b = 0.00 } - }, - [4] = { - name = 'Impossible', - value = 5, - color = { r = 0.45, g = 0.00, b = 0.00 }, - print_color = { r = 0.8, g = 0.0, b = 0.00 } - } - } - Difficulty.set_difficulties(difficulties) - - Diff.difficulty_poll_closing_timeout = this.wave_grace_period - get_score.score_table = {} - - local players = game.players - for i = 1, #players do - local player = players[i] - Session.clear_player(player) - end - - game.remove_offline_players() - - local map_gen_settings = {} - map_gen_settings.height = 2048 - map_gen_settings.water = 0.10 - map_gen_settings.seed = math_random(10000, 99999) - map_gen_settings.terrain_segmentation = 3 - map_gen_settings.cliff_settings = { cliff_elevation_interval = 32, cliff_elevation_0 = 32 } - map_gen_settings.autoplace_controls = { - ['coal'] = { frequency = 3, size = 1.5, richness = 1 }, - ['stone'] = { frequency = 3, size = 1.5, richness = 1 }, - ['copper-ore'] = { frequency = 3, size = 1.5, richness = 1 }, - ['iron-ore'] = { frequency = 3, size = 1.5, richness = 1 }, - ['uranium-ore'] = { frequency = 0, size = 0, richness = 0 }, - ['crude-oil'] = { frequency = 5, size = 1.25, richness = 2 }, - ['trees'] = { frequency = 2, size = 1, richness = 1 }, - ['enemy-base'] = { frequency = 'none', size = 'none', richness = 'none' } - } - - if not this.active_surface_index then - this.active_surface_index = game.create_surface('fish_defender', map_gen_settings).index - elseif reset then - this.active_surface_index = Reset.soft_reset_map(game.surfaces[this.active_surface_index], map_gen_settings, starting_items).index - end - - local surface = game.surfaces[this.active_surface_index] - - surface.peaceful_mode = false - - game.map_settings.enemy_expansion.enabled = false - game.map_settings.enemy_evolution.destroy_factor = 0 - game.map_settings.enemy_evolution.time_factor = 0 - game.map_settings.enemy_evolution.pollution_factor = 0 - game.map_settings.pollution.enabled = false - - Difficulty.reset_difficulty_poll() - Difficulty.set_poll_closing_timeout(game.tick + 35 * 60 * 60) - - game.forces.player.technologies['atomic-bomb'].enabled = false - --game.forces["player"].technologies["landfill"].enabled = false - - if not game.forces.decoratives then - game.create_force('decoratives') - end - game.forces['decoratives'].set_cease_fire('enemy', true) - game.forces['enemy'].set_cease_fire('decoratives', true) - game.forces.player.set_cease_fire('decoratives', true) - - Terrain.fish_eye(surface, { x = -2150, y = -300 }) - - game.map_settings.enemy_expansion.enabled = false - game.forces.player.technologies['artillery'].researched = false - game.forces.player.technologies['spidertron'].enabled = false - game.forces.player.technologies['spidertron'].researched = false - game.reset_time_played() - - local T = Map.get_map_information() - T.localised_category = 'fish_defender' - T.main_caption_color = { r = 0.11, g = 0.8, b = 0.44 } - T.sub_caption_color = { r = 0.33, g = 0.66, b = 0.9 } - - for _, player in pairs(game.connected_players) do - if player.gui.left['fish_defense_game_lost'] then - player.gui.left['fish_defense_game_lost'].destroy() - end - end - - local mgs = game.surfaces['nauvis'].map_gen_settings - mgs.width = 16 - mgs.height = 16 - game.surfaces['nauvis'].map_gen_settings = mgs - game.surfaces['nauvis'].clear() -end - -local function on_tick() - local Diff = Difficulty.get() - local this = FDT.get() - local surface = game.surfaces[this.active_surface_index] - if not surface or not surface.valid then - return - end - if game.tick % 30 == 0 then - if this.market and this.market.valid then - for _, player in pairs(game.connected_players) do - if surface.peaceful_mode == false then - create_wave_gui(player) - end - end - end - if game.tick % 180 == 0 then - if surface then - game.forces.player.chart(surface, { { -160, -128 }, { 192, 128 } }) - if Diff.difficulty_vote_index then - this.wave_interval = difficulties_votes[Diff.difficulty_vote_index].wave_interval - end - end - end - - if this.market_age then - if not this.game_restart_timer then - this.game_restart_timer = 10800 - else - if this.game_restart_timer < 0 then - return - end - this.game_restart_timer = this.game_restart_timer - 30 - end - if this.game_restart_timer % 1800 == 0 then - if this.game_restart_timer > 0 then - this.game_reset = true - this.game_has_ended = true - game.print('Map will restart in ' .. this.game_restart_timer / 60 .. ' seconds!', { r = 0.22, g = 0.88, b = 0.22 }) - end - if this.game_restart_timer == 0 then - on_init(true) - end - end - end - end - - if this.wave_count >= this.wave_limit then - if this.market and this.market.valid then - this.market.die() - game.print('Game wave limit reached! Game will soft-reset shortly.', { r = 0.22, g = 0.88, b = 0.22 }) - end - end - - if game.tick % this.wave_interval == this.wave_interval - 1 then - if surface.peaceful_mode == true then - return - end - biter_attack_wave() - end -end - -local function on_player_changed_position(event) - local player = game.players[event.player_index] - local active_surface_index = FDT.get('active_surface_index') - local map_height = FDT.get('map_height') - local surface = game.surfaces[active_surface_index] - if not surface or not surface.valid then - return - end - - if player.position.x + player.position.y < 0 then - return - end - if player.position.x < player.position.y then - return - end - if player.position.x >= 160 then - player.teleport({ player.position.x - 1, player.position.y }, surface) - if player.position.y > map_height or player.position.y < map_height * -1 then - player.teleport({ player.position.x, 0 }, surface) - end - if player.character then - player.character.health = player.character.health - 25 - player.character.surface.create_entity({ name = 'water-splash', position = player.position }) - if player.character.health <= 0 then - player.character.die('enemy') - end - end - end -end - -local function on_player_mined_entity(event) - local this = FDT.get() - if this.entity_limits[event.entity.name] then - this.entity_limits[event.entity.name].placed = this.entity_limits[event.entity.name].placed - 1 - update_fd_stats() - end -end - -local function on_robot_mined_entity(event) - local this = FDT.get() - if this.entity_limits[event.entity.name] then - this.entity_limits[event.entity.name].placed = this.entity_limits[event.entity.name].placed - 1 - update_fd_stats() - end -end - -local function on_research_finished(event) - local research = event.research.name - if research ~= 'tank' then - return - end - game.forces['player'].technologies['artillery'].researched = true - game.forces.player.recipes['artillery-wagon'].enabled = false -end - -local function on_player_respawned(event) - local market_age = FDT.get('market_age') - if not market_age then - return - end - local player = game.players[event.player_index] - player.character.destructible = false -end - -Event.add(defines.events.on_gui_click, on_gui_click) -Event.add(defines.events.on_market_item_purchased, on_market_item_purchased) -Event.add(defines.events.on_player_respawned, on_player_respawned) -Event.add(defines.events.on_built_entity, on_built_entity) -Event.add(defines.events.on_entity_died, on_entity_died) -Event.add(defines.events.on_player_changed_position, on_player_changed_position) -Event.add(defines.events.on_player_joined_game, on_player_joined_game) -Event.add(defines.events.on_player_mined_entity, on_player_mined_entity) -Event.add(defines.events.on_research_finished, on_research_finished) -Event.add(defines.events.on_robot_built_entity, on_robot_built_entity) -Event.add(defines.events.on_robot_mined_entity, on_robot_mined_entity) -Event.add(defines.events.on_tick, on_tick) -Event.on_init(on_init) - -return on_init diff --git a/maps/fish_defender/market.lua b/maps/fish_defender/market.lua deleted file mode 100644 index 30c22cda2..000000000 --- a/maps/fish_defender/market.lua +++ /dev/null @@ -1,328 +0,0 @@ -require 'maps.fish_defender.flame_boots' -require 'maps.fish_defender.trapped_capsules' -require 'maps.fish_defender.ultra_mines' -require 'maps.fish_defender.crumbly_walls' -require 'maps.fish_defender.vehicle_nanobots' -require 'maps.fish_defender.laser_pointer' - -local Event = require 'utils.event' -local FDT = require 'maps.fish_defender.table' -local Server = require 'utils.server' - -local slot_upgrade_offers = { - [1] = {'gun-turret', 'gun turret'}, - [2] = {'laser-turret', 'laser turret'}, - [3] = {'artillery-turret', 'artillery turret'}, - [4] = {'flamethrower-turret', 'flamethrower turret'}, - [5] = {'land-mine', 'land mine'} -} - -local special_descriptions = { - ['flame-boots'] = 'Flame Boots - Get yourself some hot boots.', - ['explosive-bullets'] = 'Unlock Explosive Bullets - Submachine-Gun and Pistol gains a chance to deal splash damage.', - ['bouncy-shells'] = 'Unlock Bouncy Shells - Shotgun projectiles may bounce to multiple targets.', - ['trapped-capsules'] = 'Unlock Trapped Capsules - Combat robots will send a last deadly projectile to a nearby enemy when killed.', - ['ultra-mines'] = 'Unlock Ultra Mines - Careful with these...', - ['railgun-enhancer'] = 'Unlock Railgun Enhancer - Turns the railgun into a powerful forking gun.', - ['crumbly-walls'] = 'Unlock Crumbly Walls - Fortifications which crumble, may turn into rocks.', - ['vehicle-nanobots'] = 'Unlock Vehicle Nanobots - Vehicles repair rapidly while driving.', - ['laser-pointer'] = 'Unlock Laser Pointer - The biters are on a quest to slay the red (artillery) dot.' -} - -local function place_fish_market(surface, position) - local market = surface.create_entity({name = 'market', position = position, force = 'player'}) - market.minable = false - return market -end - -local function refresh_market_offers() - local this = FDT.get() - if not this.market then - return - end - for i = 1, 100, 1 do - local a = this.market.remove_market_item(1) - if a == false then - break - end - end - - local str1 = 'Gun Turret Slot for ' .. tostring(this.entity_limits['gun-turret'].limit * this.entity_limits['gun-turret'].slot_price) - str1 = str1 .. ' Coins.' - - local str2 = 'Laser Turret Slot for ' .. tostring(this.entity_limits['laser-turret'].limit * this.entity_limits['laser-turret'].slot_price) - str2 = str2 .. ' Coins.' - - local str3 = 'Artillery Slot for ' .. tostring(this.entity_limits['artillery-turret'].limit * this.entity_limits['artillery-turret'].slot_price) - str3 = str3 .. ' Coins.' - - local current_limit = 1 - if this.entity_limits['flamethrower-turret'].limit ~= 0 then - current_limit = current_limit + this.entity_limits['flamethrower-turret'].limit - end - local str4 = 'Flamethrower Turret Slot for ' .. tostring(current_limit * this.entity_limits['flamethrower-turret'].slot_price) - str4 = str4 .. ' Coins.' - - local str5 = 'Landmine Slot for ' .. tostring(math.ceil((this.entity_limits['land-mine'].limit / 3) * this.entity_limits['land-mine'].slot_price)) - str5 = str5 .. ' Coins.' - - local market_items = { - {price = {}, offer = {type = 'nothing', effect_description = str1}}, - {price = {}, offer = {type = 'nothing', effect_description = str2}}, - {price = {}, offer = {type = 'nothing', effect_description = str3}}, - {price = {}, offer = {type = 'nothing', effect_description = str4}}, - {price = {}, offer = {type = 'nothing', effect_description = str5}}, - {price = {{'coin', 5}}, offer = {type = 'give-item', item = 'raw-fish', count = 1}}, - {price = {{'coin', 1}}, offer = {type = 'give-item', item = 'wood', count = 8}}, - {price = {{'coin', 8}}, offer = {type = 'give-item', item = 'grenade', count = 1}}, - {price = {{'coin', 32}}, offer = {type = 'give-item', item = 'cluster-grenade', count = 1}}, - {price = {{'coin', 1}}, offer = {type = 'give-item', item = 'land-mine', count = 1}}, - {price = {{'small-plane', 40}}, offer = {type = 'give-item', item = 'spidertron', count = 1}}, - {price = {{'coin', 5000}}, offer = {type = 'give-item', item = 'small-plane', count = 1}}, - {price = {{'coin', 80}}, offer = {type = 'give-item', item = 'car', count = 1}}, - {price = {{'coin', 1200}}, offer = {type = 'give-item', item = 'tank', count = 1}}, - {price = {{'coin', 3}}, offer = {type = 'give-item', item = 'cannon-shell', count = 1}}, - {price = {{'coin', 7}}, offer = {type = 'give-item', item = 'explosive-cannon-shell', count = 1}}, - {price = {{'coin', 50}}, offer = {type = 'give-item', item = 'gun-turret', count = 1}}, - {price = {{'coin', 300}}, offer = {type = 'give-item', item = 'laser-turret', count = 1}}, - {price = {{'coin', 450}}, offer = {type = 'give-item', item = 'artillery-turret', count = 1}}, - {price = {{'coin', 10}}, offer = {type = 'give-item', item = 'artillery-shell', count = 1}}, - {price = {{'coin', 25}}, offer = {type = 'give-item', item = 'artillery-targeting-remote', count = 1}}, - {price = {{'coin', 1}}, offer = {type = 'give-item', item = 'firearm-magazine', count = 1}}, - {price = {{'coin', 4}}, offer = {type = 'give-item', item = 'piercing-rounds-magazine', count = 1}}, - {price = {{'coin', 2}}, offer = {type = 'give-item', item = 'shotgun-shell', count = 1}}, - {price = {{'coin', 6}}, offer = {type = 'give-item', item = 'piercing-shotgun-shell', count = 1}}, - {price = {{'coin', 30}}, offer = {type = 'give-item', item = 'submachine-gun', count = 1}}, - {price = {{'coin', 250}}, offer = {type = 'give-item', item = 'combat-shotgun', count = 1}}, - {price = {{'coin', 450}}, offer = {type = 'give-item', item = 'flamethrower', count = 1}}, - {price = {{'coin', 25}}, offer = {type = 'give-item', item = 'flamethrower-ammo', count = 1}}, - {price = {{'coin', 125}}, offer = {type = 'give-item', item = 'rocket-launcher', count = 1}}, - {price = {{'coin', 2}}, offer = {type = 'give-item', item = 'rocket', count = 1}}, - {price = {{'coin', 7}}, offer = {type = 'give-item', item = 'explosive-rocket', count = 1}}, - {price = {{'coin', 7500}}, offer = {type = 'give-item', item = 'atomic-bomb', count = 1}}, - {price = {{'coin', 40}}, offer = {type = 'give-item', item = 'poison-capsule', count = 1}}, - {price = {{'coin', 4}}, offer = {type = 'give-item', item = 'defender-capsule', count = 1}}, - {price = {{'coin', 10}}, offer = {type = 'give-item', item = 'light-armor', count = 1}}, - {price = {{'coin', 125}}, offer = {type = 'give-item', item = 'heavy-armor', count = 1}}, - {price = {{'coin', 350}}, offer = {type = 'give-item', item = 'modular-armor', count = 1}}, - {price = {{'coin', 1500}}, offer = {type = 'give-item', item = 'power-armor', count = 1}}, - {price = {{'coin', 12000}}, offer = {type = 'give-item', item = 'power-armor-mk2', count = 1}}, - {price = {{'coin', 50}}, offer = {type = 'give-item', item = 'solar-panel-equipment', count = 1}}, - {price = {{'coin', 2250}}, offer = {type = 'give-item', item = 'fusion-reactor-equipment', count = 1}}, - {price = {{'coin', 100}}, offer = {type = 'give-item', item = 'battery-equipment', count = 1}}, - {price = {{'coin', 200}}, offer = {type = 'give-item', item = 'energy-shield-equipment', count = 1}}, - {price = {{'coin', 850}}, offer = {type = 'give-item', item = 'personal-laser-defense-equipment', count = 1}}, - {price = {{'coin', 175}}, offer = {type = 'give-item', item = 'exoskeleton-equipment', count = 1}}, - {price = {{'coin', 125}}, offer = {type = 'give-item', item = 'night-vision-equipment', count = 1}}, - {price = {{'coin', 200}}, offer = {type = 'give-item', item = 'belt-immunity-equipment', count = 1}}, - {price = {{'coin', 250}}, offer = {type = 'give-item', item = 'personal-roboport-equipment', count = 1}}, - {price = {{'coin', 35}}, offer = {type = 'give-item', item = 'construction-robot', count = 1}}, - {price = {{'coin', 25}}, offer = {type = 'give-item', item = 'cliff-explosives', count = 1}}, - {price = {{'coin', 80}}, offer = {type = 'nothing', effect_description = special_descriptions['flame-boots']}} - } - - for _, item in pairs(market_items) do - this.market.add_market_item(item) - end - - if not this.railgun_enhancer_unlocked then - this.market.add_market_item( - { - price = {{'coin', 1500}}, - offer = {type = 'nothing', effect_description = special_descriptions['railgun-enhancer']} - } - ) - end - if not this.trapped_capsules_unlocked then - this.market.add_market_item( - { - price = {{'coin', 3500}}, - offer = {type = 'nothing', effect_description = special_descriptions['trapped-capsules']} - } - ) - end - if not this.explosive_bullets_unlocked then - this.market.add_market_item( - { - price = {{'coin', 4500}}, - offer = {type = 'nothing', effect_description = special_descriptions['explosive-bullets']} - } - ) - end - if not this.bouncy_shells_unlocked then - this.market.add_market_item( - { - price = {{'coin', 10000}}, - offer = {type = 'nothing', effect_description = special_descriptions['bouncy-shells']} - } - ) - end - if not this.vehicle_nanobots_unlocked then - this.market.add_market_item( - { - price = {{'coin', 15000}}, - offer = {type = 'nothing', effect_description = special_descriptions['vehicle-nanobots']} - } - ) - end - --[[ - if not this.crumbly_walls_unlocked then - this.market.add_market_item({price = {{"coin", 35000}}, offer = {type = 'nothing', effect_description = special_descriptions["crumbly-walls"]}}) - end - if not this.ultra_mines_unlocked then - this.market.add_market_item({price = {{"coin", 45000}}, offer = {type = 'nothing', effect_description = special_descriptions["ultra-mines"]}}) - end - ]] - if not this.laser_pointer_unlocked then - this.market.add_market_item( - { - price = {{'coin', 65000}}, - offer = {type = 'nothing', effect_description = special_descriptions['laser-pointer']} - } - ) - end -end - -local function slot_upgrade(player, offer_index) - local this = FDT.get() - local price = this.entity_limits[slot_upgrade_offers[offer_index][1]].limit * this.entity_limits[slot_upgrade_offers[offer_index][1]].slot_price - - local gain = 1 - if offer_index == 5 then - price = math.ceil((this.entity_limits[slot_upgrade_offers[offer_index][1]].limit / 3) * this.entity_limits[slot_upgrade_offers[offer_index][1]].slot_price) - gain = 3 - end - - if slot_upgrade_offers[offer_index][1] == 'flamethrower-turret' then - price = (this.entity_limits[slot_upgrade_offers[offer_index][1]].limit + 1) * this.entity_limits[slot_upgrade_offers[offer_index][1]].slot_price - end - - local coins_removed = player.remove_item({name = 'coin', count = price}) - if coins_removed ~= price then - if coins_removed > 0 then - player.insert({name = 'coin', count = coins_removed}) - end - player.print('Not enough coins.', {r = 0.22, g = 0.77, b = 0.44}) - return false - end - - this.entity_limits[slot_upgrade_offers[offer_index][1]].limit = this.entity_limits[slot_upgrade_offers[offer_index][1]].limit + gain - game.print(player.name .. ' has bought a ' .. slot_upgrade_offers[offer_index][2] .. ' slot for ' .. price .. ' coins!', {r = 0.22, g = 0.77, b = 0.44}) - if math.random(1, 2) == 1 then - Server.to_discord_bold( - table.concat { - '*** ' .. player.name .. ' has bought a ' .. slot_upgrade_offers[offer_index][2] .. ' slot for ' .. price .. ' coins! ***' - } - ) - end - refresh_market_offers() -end - -local function on_market_item_purchased(event) - local player = game.players[event.player_index] - local market = event.market - local offer_index = event.offer_index - local offers = market.get_market_items() - local bought_offer = offers[offer_index].offer - if bought_offer.type ~= 'nothing' then - return - end - local this = FDT.get() - - if slot_upgrade_offers[offer_index] then - if slot_upgrade(player, offer_index) then - return - end - end - - if offer_index < 50 then - return - end - - if bought_offer.effect_description == special_descriptions['flame-boots'] then - game.print(player.name .. ' has bought themselves some flame boots.', {r = 0.22, g = 0.77, b = 0.44}) - if not this.flame_boots[player.index].fuel then - this.flame_boots[player.index].fuel = math.random(1500, 3000) - else - this.flame_boots[player.index].fuel = this.flame_boots[player.index].fuel + math.random(1500, 3000) - end - - player.print('Fuel remaining: ' .. this.flame_boots[player.index].fuel, {r = 0.22, g = 0.77, b = 0.44}) - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['explosive-bullets'] then - game.print(player.name .. ' has unlocked explosive bullets.', {r = 0.22, g = 0.77, b = 0.44}) - this.explosive_bullets_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['bouncy-shells'] then - game.print(player.name .. ' has unlocked bouncy shells.', {r = 0.22, g = 0.77, b = 0.44}) - this.bouncy_shells_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['trapped-capsules'] then - game.print(player.name .. ' has unlocked trapped capsules!', {r = 0.22, g = 0.77, b = 0.44}) - this.trapped_capsules_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['ultra-mines'] then - game.print(player.name .. ' has unlocked ultra mines!', {r = 0.22, g = 0.77, b = 0.44}) - this.ultra_mines_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['laser-pointer'] then - game.print(player.name .. ' has unleashed the quest to slay the red dot!', {r = 0.22, g = 0.77, b = 0.44}) - this.laser_pointer_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['railgun-enhancer'] then - game.print(player.name .. ' has unlocked the enhanced railgun!', {r = 0.22, g = 0.77, b = 0.44}) - this.railgun_enhancer_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['crumbly-walls'] then - game.print(player.name .. ' has unlocked crumbly walls!', {r = 0.22, g = 0.77, b = 0.44}) - this.crumbly_walls_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['vehicle-nanobots'] then - game.print(player.name .. ' has unlocked vehicle nanobots!', {r = 0.22, g = 0.77, b = 0.44}) - this.vehicle_nanobots_unlocked = true - refresh_market_offers() - return - end -end - -local function on_gui_opened(event) - if not event.entity then - return - end - if not event.entity.valid then - return - end - if event.entity.name == 'market' then - refresh_market_offers() - return - end -end - -Event.add(defines.events.on_market_item_purchased, on_market_item_purchased) -Event.add(defines.events.on_gui_opened, on_gui_opened) - -return place_fish_market diff --git a/maps/fish_defender/on_entity_damaged.lua b/maps/fish_defender/on_entity_damaged.lua deleted file mode 100644 index 8493bd8d6..000000000 --- a/maps/fish_defender/on_entity_damaged.lua +++ /dev/null @@ -1,65 +0,0 @@ -require 'maps.fish_defender.boss_biters' - -local Event = require 'utils.event' -local enhance_railgun = require 'maps.fish_defender.railgun_enhancer' -local explosive_bullets = require 'maps.fish_defender.explosive_gun_bullets' -local bouncy_shells = require 'maps.fish_defender.bouncy_shells' -local FDT = require 'maps.fish_defender.table' - -local function protect_market(event) - if event.entity.name ~= 'market' then - return - end - if event.cause then - if event.cause.force.name == 'enemy' then - return - end - end - event.entity.health = event.entity.health + event.final_damage_amount - return true -end - -local function on_entity_damaged(event) - if not event.entity then - return - end - if not event.entity.valid then - return - end - - if protect_market(event) then - return - end - - if not event.cause then - return - end - local explosive_bullets_unlocked = FDT.get('explosive_bullets_unlocked') - local bouncy_shells_unlocked = FDT.get('bouncy_shells_unlocked') - - --if event.cause.unit_number then - -- if this.boss_biters[event.cause.unit_number] then - -- boss_biter.damaged_entity(event) - -- end - --end - - if event.cause.name ~= 'character' then - return - end - - if enhance_railgun(event) then - return - end - if explosive_bullets_unlocked then - if explosive_bullets(event) then - return - end - end - if bouncy_shells_unlocked then - if bouncy_shells(event) then - return - end - end -end - -Event.add(defines.events.on_entity_damaged, on_entity_damaged) diff --git a/maps/fish_defender/railgun_enhancer.lua b/maps/fish_defender/railgun_enhancer.lua deleted file mode 100644 index f9a9cd50d..000000000 --- a/maps/fish_defender/railgun_enhancer.lua +++ /dev/null @@ -1,152 +0,0 @@ --- improves the damage of the railgun and adds visual effects -- by mewmew --- laser turret research will increase it´s damage even further -- - -local FDT = require 'maps.fish_defender.table' - -local damage_min = 400 -local damage_max = 800 -local math_random = math.random -local additional_visual_effects = true - -local biological_target_types = { - ['unit'] = true, - ['player'] = true, - ['turret'] = true, - ['unit-spawner'] = true -} - -local function create_visuals(source_entity, target_entity) - if not source_entity.valid then - return - end - if not target_entity.valid then - return - end - if not additional_visual_effects then - return - end - local surface = target_entity.surface - surface.create_entity({name = 'water-splash', position = target_entity.position}) - if biological_target_types[target_entity.type] then - surface.create_entity({name = 'blood-explosion-big', position = target_entity.position}) - for x = -8, 8, 1 do - for y = -8, 8, 1 do - if math_random(1, 16) == 1 then - surface.create_entity( - { - name = 'blood-fountain', - position = {target_entity.position.x + (x * 0.1), target_entity.position.y + (y * 0.1)} - } - ) - surface.create_entity( - { - name = 'blood-fountain-big', - position = {target_entity.position.x + (x * 0.1), target_entity.position.y + (y * 0.1)} - } - ) - end - end - end - else - if math_random(1, 3) ~= 1 then - surface.create_entity({name = 'fire-flame', position = target_entity.position}) - end - for x = -3, 3, 1 do - for y = -3, 3, 1 do - if math_random(1, 3) == 1 then - surface.create_trivial_smoke( - { - name = 'smoke-fast', - position = {target_entity.position.x + (x * 0.35), target_entity.position.y + (y * 0.35)} - } - ) - end - if math_random(1, 5) == 1 then - surface.create_trivial_smoke( - { - name = 'train-smoke', - position = {target_entity.position.x + (x * 0.35), target_entity.position.y + (y * 0.35)} - } - ) - end - end - end - end -end - -local function do_splash_damage_around_entity(source_entity, player) - if not source_entity.valid then - return - end - local research_damage_bonus = player.force.get_ammo_damage_modifier('laser-turret') + 1 - local research_splash_radius_bonus = player.force.get_ammo_damage_modifier('laser-turret') * 0.5 - local splash_area = { - { - source_entity.position.x - (2.5 + research_splash_radius_bonus), - source_entity.position.y - (2.5 + research_splash_radius_bonus) - }, - { - source_entity.position.x + (2.5 + research_splash_radius_bonus), - source_entity.position.y + (2.5 + research_splash_radius_bonus) - } - } - local entities = source_entity.surface.find_entities_filtered({area = splash_area}) - for _, entity in pairs(entities) do - if entity.valid then - if entity.health and entity ~= source_entity and entity ~= player then - if additional_visual_effects then - local surface = entity.surface - surface.create_entity( - { - name = 'railgun-beam', - position = source_entity.position, - source = source_entity.position, - target = entity.position - } - ) - surface.create_entity({name = 'water-splash', position = entity.position}) - if biological_target_types[entity.type] then - surface.create_entity({name = 'blood-fountain', position = entity.position}) - end - end - local damage = math_random(math.ceil((damage_min * research_damage_bonus) / 16), math.ceil((damage_max * research_damage_bonus) / 16)) - entity.damage(damage, player.force, 'physical') - end - end - end -end - -local function enhance(event) - local railgun_enhancer_unlocked = FDT.get('railgun_enhancer_unlocked') - if not railgun_enhancer_unlocked then - return - end - if event.damage_type.name ~= 'physical' then - return - end - if event.original_damage_amount ~= 100 then - return - end - - local player = event.cause - if player.shooting_state.state == defines.shooting.not_shooting then - return - end - local selected_weapon = player.get_inventory(defines.inventory.character_guns)[player.selected_gun_index] - if selected_weapon.name ~= 'railgun' then - return - end - - create_visuals(event.cause, event.entity) - - do_splash_damage_around_entity(event.entity, player) - - event.entity.health = event.entity.health + event.final_damage_amount - - local research_damage_bonus = player.force.get_ammo_damage_modifier('laser-turret') + 1 - local damage = math_random(math.ceil(damage_min * research_damage_bonus), math.ceil(damage_max * research_damage_bonus)) - event.entity.damage(damage, player.force, 'physical') - return true -end - -return enhance diff --git a/maps/fish_defender/table.lua b/maps/fish_defender/table.lua deleted file mode 100644 index 92bddbcbb..000000000 --- a/maps/fish_defender/table.lua +++ /dev/null @@ -1,83 +0,0 @@ --- one table to rule them all! -local Global = require 'utils.global' -local Event = require 'utils.event' - -local this = { - players = {}, - offline_players = {}, - hidden_dimension = { - logistic_research_level = 0, - reset_counter = 1 - }, - power_sources = {}, - refill_turrets = {index = 1}, - magic_crafters = {index = 1}, - magic_fluid_crafters = {index = 1}, - breached_wall = 1, - entity_limits = {}, - traps = {} -} -local Public = {} - -Global.register( - this, - function(tbl) - this = tbl - end -) - -function Public.reset_table() - this.chunk_queue = {} - this.game_has_ended = false - this.game_reset = false - this.spawn_area_generated = false - this.results_sent = false - this.explosive_bullets_unlocked = false - this.bouncy_shells_unlocked = false - this.trapped_capsules_unlocked = false - this.ultra_mines_unlocked = false - this.laser_pointer_unlocked = false - this.railgun_enhancer_unlocked = false - this.crumbly_walls_unlocked = false - this.vehicle_nanobots_unlocked = false - this.game_restart_timer = nil - this.wave_count = 1 - this.market = nil - this.wave_limit = 9999 - this.market_age = nil - this.last_reset = game.tick - this.wave_interval = 3600 - this.wave_grace_period = game.tick + 3600 * 20 - this.boss_biters = {} - this.acid_lines_delay = {} - this.entity_limits = { - ['gun-turret'] = {placed = 1, limit = 1, str = 'gun turret', slot_price = 75}, - ['laser-turret'] = {placed = 0, limit = 1, str = 'laser turret', slot_price = 300}, - ['artillery-turret'] = {placed = 0, limit = 1, str = 'artillery turret', slot_price = 500}, - ['flamethrower-turret'] = {placed = 0, limit = 0, str = 'flamethrower turret', slot_price = 50000}, - ['land-mine'] = {placed = 0, limit = 1, str = 'mine', slot_price = 1} - } - this.comfylatron_habitat = { - left_top = {x = -1500, y = -1500}, - right_bottom = {x = -80, y = 1500} - } - this.map_height = 96 - this.shotgun_shell_damage_modifier_old = {} - this.flame_boots = {} -end - -function Public.get(key) - if key then - return this[key] - else - return this - end -end - -local on_init = function() - Public.reset_table() -end - -Event.on_init(on_init) - -return Public diff --git a/maps/fish_defender/terrain.lua b/maps/fish_defender/terrain.lua deleted file mode 100644 index fa04f4b2b..000000000 --- a/maps/fish_defender/terrain.lua +++ /dev/null @@ -1,500 +0,0 @@ ---luacheck: ignore -local Event = require 'utils.event' -local map_functions = require 'utils.tools.map_functions' -local simplex_noise = require 'utils.math.simplex_noise'.d2 -local FDT = require 'maps.fish_defender.table' -local math_random = math.random -local math_abs = math.abs -local math_floor = math.floor -local math_sqrt = math.sqrt - -local Public = {} - -local rock_raffle = { - 'big-sand-rock', - 'big-sand-rock', - 'big-rock', - 'big-rock', - 'big-rock', - 'big-rock', - 'big-rock', - 'big-rock', - 'huge-rock' -} - -local function get_replacement_tile(surface, position) - for i = 1, 128, 1 do - local vectors = { { 0, i }, { 0, i * -1 }, { i, 0 }, { i * -1, 0 } } - table.shuffle_table(vectors) - for k, v in pairs(vectors) do - local tile = surface.get_tile(position.x + v[1], position.y + v[2]) - if not tile.collides_with('resource') then - return tile.name - end - end - end - return 'grass-1' -end - -local function is_enemy_territory(p) - if p.x - 64 < math_abs(p.y) then - return false - end - --if p.x - 64 < p.y then return false end - if p.x < 160 then - return false - end - if p.x > 1024 then - return false - end - if p.y > 512 then - return false - end - if p.y < -512 then - return false - end - local noise = math_abs(simplex_noise(0, p.y * 0.015, game.surfaces[1].map_gen_settings.seed) * 96) - local noise_2 = math_abs(simplex_noise(0, p.y * 0.1, game.surfaces[1].map_gen_settings.seed) * 16) - if p.x > 288 + noise + noise_2 + math_abs(p.y * 0.75) then - return false - end - return true -end - -local body_radius = 3072 -local body_square_radius = body_radius ^ 2 -local body_center_position = { x = -1500, y = 0 } -local body_spacing = math_floor(body_radius * 0.82) -local body_circle_center_1 = { x = body_center_position.x, y = body_center_position.y - body_spacing } -local body_circle_center_2 = { x = body_center_position.x, y = body_center_position.y + body_spacing } - -local fin_radius = 800 -local square_fin_radius = fin_radius ^ 2 -local fin_circle_center_1 = { x = -480, y = 0 } -local fin_circle_center_2 = { x = -480 - 360, y = 0 } - -local function is_body(p) - local this = FDT.get() - if p.y <= this.map_height and p.y >= this.map_height * -1 and p.x <= 160 and p.x > body_center_position.x then - return true - end - - --Main Fish Body - local distance_to_center_1 = ((p.x - body_circle_center_1.x) ^ 2 + (p.y - body_circle_center_1.y) ^ 2) - local distance_to_center_2 = ((p.x - body_circle_center_2.x) ^ 2 + (p.y - body_circle_center_2.y) ^ 2) - --if distance_to_center_1 < body_square_radius and distance_to_center_2 < body_square_radius then return true end - if distance_to_center_1 < body_square_radius then - if distance_to_center_2 < body_square_radius then - return true - end - end - - --Fish Fins - distance_to_center_1 = ((p.x - fin_circle_center_1.x) ^ 2 + (p.y - fin_circle_center_1.y) ^ 2) - if distance_to_center_1 + math_abs(simplex_noise(0, p.y * 0.075, game.surfaces[1].map_gen_settings.seed) * 32000) > square_fin_radius then - distance_to_center_2 = ((p.x - fin_circle_center_2.x) ^ 2 + (p.y - fin_circle_center_2.y) ^ 2) - if distance_to_center_2 < square_fin_radius then - return true - end - end - - return false -end - -local function is_out_of_map_tile(p) - if p.y > 850 then - return true - end - if p.y < -850 then - return true - end - if p.x < -3264 then - return true - end - if p.x > 800 then - return true - end - if is_enemy_territory(p) then - return false - end - if is_body(p) then - return false - end - return true -end - -local function place_fish_market(surface, position) - local market = surface.create_entity({ name = 'market', position = position, force = 'player' }) - market.minable = false - return market -end - -local function generate_spawn_area(surface) - surface.request_to_generate_chunks({ x = 0, y = 0 }, 7) - surface.request_to_generate_chunks({ x = 160, y = 0 }, 4) - --surface.force_generate_chunk_requests() - local spawn_area_generated = FDT.get('spawn_area_generated') - if spawn_area_generated then - return - end - if not surface.is_chunk_generated({ -7, 0 }) then - return - end - if not surface.is_chunk_generated({ 5, 0 }) then - return - end - FDT.get().spawn_area_generated = true - - local spawn_position_x = -128 - - surface.create_entity({ name = 'electric-beam', position = { 160, -96 }, source = { 160, -96 }, target = { 160, 96 } }) - - for _, tile in pairs(surface.find_tiles_filtered({ name = { 'water', 'deepwater' }, area = { { -160, -160 }, { 160, 160 } } })) do - local noise = math_abs(simplex_noise(tile.position.x * 0.02, tile.position.y * 0.02, game.surfaces[1].map_gen_settings.seed) * 16) - if tile.position.x > -160 + noise then - surface.set_tiles({ { name = get_replacement_tile(surface, tile.position), position = { tile.position.x, tile.position.y } } }, true) - end - end - - for _, entity in pairs(surface.find_entities_filtered({ type = { 'resource', 'cliff' }, area = { { spawn_position_x - 32, -256 }, { 160, 256 } } })) do - if is_body(entity.position) then - if entity.position.x > spawn_position_x - 32 + math_abs(simplex_noise(entity.position.x * 0.02, entity.position.y * 0.02, game.surfaces[1].map_gen_settings.seed) * 16) then - entity.destroy() - end - end - end - - local decorative_names = {} - for k, v in pairs(prototypes.decorative) do - if v.autoplace_specification then - decorative_names[#decorative_names + 1] = k - end - end - for x = -4, 4, 1 do - for y = -3, 3, 1 do - surface.regenerate_decorative(decorative_names, { { x, y } }) - end - end - - local y = 80 - local ore_positions = { - { x = spawn_position_x - 52, y = y }, - { x = spawn_position_x - 52, y = y * 0.5 }, - { x = spawn_position_x - 52, y = 0 }, - { x = spawn_position_x - 52, y = y * -0.5 }, - { x = spawn_position_x - 52, y = y * -1 } - } - table.shuffle_table(ore_positions) - map_functions.draw_smoothed_out_ore_circle(ore_positions[1], 'copper-ore', surface, 15, 2500) - map_functions.draw_smoothed_out_ore_circle(ore_positions[2], 'iron-ore', surface, 15, 2500) - map_functions.draw_smoothed_out_ore_circle(ore_positions[3], 'coal', surface, 15, 1500) - map_functions.draw_smoothed_out_ore_circle(ore_positions[4], 'stone', surface, 15, 1500) - map_functions.draw_noise_tile_circle({ x = spawn_position_x - 20, y = 0 }, 'water', surface, 16) - map_functions.draw_oil_circle(ore_positions[5], 'crude-oil', surface, 8, 200000) - - local pos = surface.find_non_colliding_position('market', { spawn_position_x, 0 }, 50, 1) - FDT.get().market = place_fish_market(surface, pos) - local market = FDT.get('market') - - local r = 16 - for _, entity in pairs( - surface.find_entities_filtered( - { - area = { - { market.position.x - r, market.position.y - r }, - { market.position.x + r, market.position.y + r } - }, - type = 'tree' - } - ) - ) do - local distance_to_center = math_sqrt((entity.position.x - market.position.x) ^ 2 + (entity.position.y - market.position.y) ^ 2) - if distance_to_center < r then - if math_random(1, r) > distance_to_center then - entity.destroy() - end - end - end - - local pos = surface.find_non_colliding_position('gun-turret', { spawn_position_x + 5, 1 }, 50, 1) - local turret = surface.create_entity({ name = 'gun-turret', position = pos, force = 'player' }) - turret.insert({ name = 'firearm-magazine', count = 32 }) - - for x = -20, 20, 1 do - for y = -20, 20, 1 do - local pos = { x = market.position.x + x, y = market.position.y + y } - --local distance_to_center = math_sqrt(x^2 + y^2) - --if distance_to_center > 8 and distance_to_center < 15 then - local distance_to_center = x ^ 2 + y ^ 2 - if distance_to_center > 64 and distance_to_center < 225 then - if math_random(1, 3) == 1 and surface.can_place_entity({ name = 'wooden-chest', position = pos, force = 'player' }) then - local chest = surface.create_entity({ name = 'wooden-chest', position = pos, force = 'player' }) - end - end - end - end - - local area = { { x = -160, y = -96 }, { x = 160, y = 96 } } - for _, tile in pairs(surface.find_tiles_filtered({ name = 'water', area = area })) do - if math_random(1, 32) == 1 then - surface.create_entity({ name = 'fish', position = tile.position }) - end - end - - local pos = surface.find_non_colliding_position('character', { spawn_position_x + 1, 4 }, 50, 1) - game.forces['player'].set_spawn_position(pos, surface) - for _, player in pairs(game.connected_players) do - local pos = surface.find_non_colliding_position('character', { spawn_position_x + 1, 4 }, 50, 1) - player.teleport(pos, surface) - end -end - -local function enemy_territory(surface, left_top) - --surface.request_to_generate_chunks({x = 256, y = 0}, 16) - --surface.force_generate_chunk_requests() - - if left_top.x < 160 then - return - end - if left_top.x > 750 then - return - end - if left_top.y > 512 then - return - end - if left_top.y < -512 then - return - end - - local area = { { left_top.x, left_top.y }, { left_top.x + 32, left_top.y + 32 } } - - --local area = {{160, -512},{750, 512}} - --for _, tile in pairs(surface.find_tiles_filtered({area = area})) do - -- if is_enemy_territory(tile.position) then - -- surface.set_tiles({{name = "water-mud", position = {tile.position.x, tile.position.y}}}, true) - -- end - --end - if left_top.x > 256 then - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - if is_enemy_territory(pos) then - if math_random(1, 512) == 1 then - if surface.can_place_entity({ name = 'biter-spawner', force = 'decoratives', position = pos }) then - local entity - if math_random(1, 4) == 1 then - entity = surface.create_entity({ name = 'spitter-spawner', force = 'decoratives', position = pos }) - else - entity = surface.create_entity({ name = 'biter-spawner', force = 'decoratives', position = pos }) - end - entity.active = false - entity.destructible = false - end - end - --if pos.x % 32 == 0 and pos.y % 32 == 0 then - -- local decorative_names = {} - -- for k,v in pairs(prototypes.decorative) do - -- if v.autoplace_specification then - -- decorative_names[#decorative_names+1] = k - -- end - -- end - -- surface.regenerate_decorative(decorative_names, {{x=math_floor(pos.x/32),y=math_floor(pos.y/32)}}) - --end - end - end - end - end - for _, entity in pairs(surface.find_entities_filtered({ area = area, type = { 'tree', 'cliff' } })) do - if is_enemy_territory(entity.position) then - entity.destroy() - end - end - for _, entity in pairs(surface.find_entities_filtered({ area = area, type = 'resource' })) do - if is_enemy_territory(entity.position) then - surface.create_entity({ name = 'uranium-ore', position = entity.position, amount = math_random(200, 8000) }) - entity.destroy() - end - end - for _, tile in pairs(surface.find_tiles_filtered({ name = { 'water', 'deepwater' }, area = area })) do - if is_enemy_territory(tile.position) then - surface.set_tiles({ { name = get_replacement_tile(surface, tile.position), position = { tile.position.x, tile.position.y } } }, true) - end - end -end - -local function fish_mouth(surface, left_top) - if left_top.x > -2300 then - return - end - if left_top.y > 64 then - return - end - if left_top.y < -64 then - return - end - if left_top.x < -3292 then - return - end - - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - local noise = simplex_noise(pos.x * 0.006, 0, game.surfaces[1].map_gen_settings.seed) * 20 - if pos.y <= 12 + noise and pos.y >= -12 + noise then - surface.set_tiles({ { name = 'water', position = pos } }) - end - end - end -end - -function Public.fish_eye(surface, position) - surface.request_to_generate_chunks(position, 2) - surface.force_generate_chunk_requests() - for x = -48, 48, 1 do - for y = -48, 48, 1 do - local p = { x = position.x + x, y = position.y + y } - --local distance = math_sqrt(((position.x - p.x) ^ 2) + ((position.y - p.y) ^ 2)) - --if distance < 44 then - -- surface.set_tiles({{name = "water-green", position = p}}, true) - --end - --if distance < 22 then - -- surface.set_tiles({{name = "out-of-map", position = p}}, true) - --end - - local distance = ((position.x - p.x) ^ 2) + ((position.y - p.y) ^ 2) - if distance < 1936 then - if distance < 484 then - surface.set_tiles({ { name = 'out-of-map', position = p } }, true) - else - surface.set_tiles({ { name = 'water-green', position = p } }, true) - end - end - end - end -end - -local ores = { 'coal', 'iron-ore', 'copper-ore', 'stone' } - -local function plankton_territory(surface, position, seed) - local snoise = simplex_noise - local noise = snoise(position.x * 0.009, position.y * 0.009, seed) - local d = 196 - if position.x + position.y > (d * -1) - (math_abs(noise) * d * 3) and position.x > position.y - (d + (math_abs(noise) * d * 3)) then - return 'out-of-map' - end - - local noise_2 = snoise(position.x * 0.0075, position.y * 0.0075, seed + 10000) - --if noise_2 > 0.87 then surface.set_tiles({{name = "deepwater-green", position = position}}, true) return true end - if noise_2 > 0.87 then - return 'deepwater-green' - end - if noise_2 > 0.75 then - local i = math_floor(noise * 6) % 4 + 1 - --surface.set_tiles({{name = "grass-" .. i, position = position}}, true) - surface.create_entity({ name = ores[i], position = position, amount = 1 + 2500 * math_abs(noise_2 * 3) }) - return ('grass-' .. i) - end - if noise_2 < -0.76 then - local i = math_floor(noise * 6) % 4 + 1 - --surface.set_tiles({{name = "grass-" .. i, position = position}}, true) - if noise_2 < -0.86 then - surface.create_entity({ name = 'uranium-ore', position = position, amount = 1 + 1000 * math_abs(noise_2 * 2) }) - return ('grass-' .. i) - end - if math_random(1, 3) ~= 1 then - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = position }) - end - return ('grass-' .. i) - end - - if noise < 0.12 and noise > -0.12 then - local i = math_floor(noise * 32) % 4 + 1 - --surface.set_tiles({{name = "grass-" .. i, position = position}}, true) - if math_random(1, 5) == 1 then - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = position }) - end - return ('grass-' .. i) - end - - --surface.set_tiles({{name = "water", position = position}}, true) - if math_random(1, 128) == 1 then - surface.create_entity({ name = 'fish', position = position }) - end - - return 'water' -end - -local function process_chunk(left_top) - local active_surface_index = FDT.get('active_surface_index') - local surface = game.surfaces[active_surface_index] - if not surface or not surface.valid then - return - end - - local market = FDT.get('market') - - local seed = game.surfaces[1].map_gen_settings.seed - - generate_spawn_area(surface) - enemy_territory(surface, left_top) - fish_mouth(surface, left_top) - - local tiles = {} - - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - if is_out_of_map_tile(pos) then - --if not plankton_territory(surface, pos, seed) then surface.set_tiles({{name = "out-of-map", position = pos}}, true) end - local tile_to_set = plankton_territory(surface, pos, seed) - --local tile_to_set = "out-of-map" - tiles[#tiles + 1] = { name = tile_to_set, position = pos } - end - end - end - - surface.set_tiles(tiles, true) - - --if game.tick == 0 then return end - --if game.forces.player.is_chunk_charted(surface, {left_top.x / 32, left_top.y / 32}) then - game.forces.player.chart(surface, { { left_top.x, left_top.y }, { left_top.x + 31, left_top.y + 31 } }) - --end - if market and market.valid then - FDT.get().game_reset = false - end -end - -local function process_chunk_queue() - local chunk_queue = FDT.get('chunk_queue') - for k, left_top in next, chunk_queue do - process_chunk(left_top) - table.remove(chunk_queue, k) - return - end -end - -local function on_chunk_generated(event) - local map_name = 'fish_defender' - - if string.sub(event.surface.name, 0, #map_name) ~= map_name then - return - end - local left_top = event.area.left_top - local game_reset = FDT.get('game_reset') - local game_has_ended = FDT.get('game_has_ended') - local this = FDT.get() - - if game.tick == 0 or game_reset then - process_chunk(left_top) - else - if game_has_ended then - return - end - this.chunk_queue[#this.chunk_queue + 1] = { x = left_top.x, y = left_top.y } - end -end - -Event.on_nth_tick(25, process_chunk_queue) -Event.add(defines.events.on_chunk_generated, on_chunk_generated) - -return Public diff --git a/maps/fish_defender/trapped_capsules.lua b/maps/fish_defender/trapped_capsules.lua deleted file mode 100644 index fdd9f89d5..000000000 --- a/maps/fish_defender/trapped_capsules.lua +++ /dev/null @@ -1,61 +0,0 @@ -local Event = require 'utils.event' -local FDT = require 'maps.fish_defender.table' - -local radius = 20 - -local whitelist = { - ['defender'] = 'explosive-cannon-projectile', - ['distractor'] = 'explosive-uranium-cannon-projectile', - ['destroyer'] = 'explosive-uranium-cannon-projectile' -} - -local function on_entity_died(event) - local trapped_capsules_unlocked = FDT.get('trapped_capsules_unlocked') - if not trapped_capsules_unlocked then - return - end - - if not event.entity.valid then - return - end - if not whitelist[event.entity.name] then - return - end - - local valid_targets = {} - local position = event.entity.position - - for _, e in pairs( - event.entity.surface.find_entities_filtered( - { - area = {{position.x - radius, position.y - radius}, {position.x + radius, position.y + radius}}, - force = 'enemy' - } - ) - ) do - if e.health then - local distance_from_center = math.sqrt((e.position.x - position.x) ^ 2 + (e.position.y - position.y) ^ 2) - if distance_from_center <= radius then - valid_targets[#valid_targets + 1] = e - end - end - end - - if not valid_targets[1] then - return - end - - event.entity.surface.create_entity( - { - name = whitelist[event.entity.name], - position = position, - force = 'player', - source = position, - target = valid_targets[math.random(1, #valid_targets)].position, - max_range = 20, - speed = 0.1 - } - ) -end - -Event.add(defines.events.on_entity_died, on_entity_died) diff --git a/maps/fish_defender/ultra_mines.lua b/maps/fish_defender/ultra_mines.lua deleted file mode 100644 index cdd3d145f..000000000 --- a/maps/fish_defender/ultra_mines.lua +++ /dev/null @@ -1,51 +0,0 @@ -local Event = require 'utils.event' -local FDT = require 'maps.fish_defender.table' -local radius = 8 - -local function damage_entities_around_target(entity, damage) - for _, e in pairs( - entity.surface.find_entities_filtered( - { - area = { - {entity.position.x - radius, entity.position.y - radius}, - {entity.position.x + radius, entity.position.y + radius} - } - } - ) - ) do - if e.health then - if e.force.name ~= 'player' then - local distance_from_center = math.sqrt((e.position.x - entity.position.x) ^ 2 + (e.position.y - entity.position.y) ^ 2) - if distance_from_center <= radius then - e.damage(damage, 'player', 'explosion') - end - end - end - end -end - -local function on_entity_died(event) - local ultra_mines_unlocked = FDT.get('ultra_mines_unlocked') - if not ultra_mines_unlocked then - return - end - if not event.entity.valid then - return - end - if event.entity.name ~= 'land-mine' then - return - end - - event.entity.surface.create_entity( - { - name = 'big-artillery-explosion', - position = event.entity.position - } - ) - - local damage = (1 + event.entity.force.get_ammo_damage_modifier('grenade')) * 250 - - damage_entities_around_target(event.entity, damage) -end - -Event.add(defines.events.on_entity_died, on_entity_died) diff --git a/maps/fish_defender/vehicle_nanobots.lua b/maps/fish_defender/vehicle_nanobots.lua deleted file mode 100644 index 5845380bc..000000000 --- a/maps/fish_defender/vehicle_nanobots.lua +++ /dev/null @@ -1,29 +0,0 @@ -local Event = require 'utils.event' -local FDT = require 'maps.fish_defender.table' - -local function on_player_changed_position(event) - local vehicle_nanobots_unlocked = FDT.get('vehicle_nanobots_unlocked') - - if not vehicle_nanobots_unlocked then - return - end - local player = game.players[event.player_index] - if not player.character then - return - end - if not player.character.driving then - return - end - if not player.vehicle then - return - end - if not player.vehicle.valid then - return - end - if player.vehicle.health == player.vehicle.max_health then - return - end - player.vehicle.health = player.vehicle.health + player.vehicle.max_health * 0.005 -end - -Event.add(defines.events.on_player_changed_position, on_player_changed_position) diff --git a/maps/fish_defender_v1/boss_biters.lua b/maps/fish_defender_v1/boss_biters.lua deleted file mode 100644 index 2a0ad5795..000000000 --- a/maps/fish_defender_v1/boss_biters.lua +++ /dev/null @@ -1,84 +0,0 @@ -local boss_biter = {} -local math_random = math.random -local radius = 6 -local targets = {} -local acid_splashes = { - ['big-biter'] = 'acid-stream-worm-medium', - ['behemoth-biter'] = 'acid-stream-worm-big' -} -local acid_lines = { - ['big-spitter'] = 'acid-stream-spitter-medium', - ['behemoth-spitter'] = 'acid-stream-spitter-big' -} -for x = radius * -1, radius, 1 do - for y = radius * -1, radius, 1 do - if math.sqrt(x ^ 2 + y ^ 2) <= radius then - targets[#targets + 1] = { x = x, y = y } - end - end -end - -local function acid_nova(event) - for _ = 1, math.random(20, 40) do - local i = math.random(1, #targets) - event.entity.surface.create_entity( - { - name = acid_splashes[event.entity.name], - position = event.entity.position, - force = event.entity.force.name, - source = event.entity.position, - target = { x = event.entity.position.x + targets[i].x, y = event.entity.position.y + targets[i].y }, - max_range = radius, - speed = 0.001 - } - ) - end -end - -boss_biter.died = function (event) - if acid_splashes[event.entity.name] then - acid_nova(event) - end - if storage.acid_lines_delay[event.entity.unit_number] then - storage.acid_lines_delay[event.entity.unit_number] = nil - end - storage.boss_biters[event.entity.unit_number] = nil -end - -local function acid_line(surface, name, source, target) - local distance = math.sqrt((source.x - target.x) ^ 2 + (source.y - target.y) ^ 2) - local modifier = { (target.x - source.x) / distance, (target.y - source.y) / distance } - - local position = { source.x, source.y } - - for i = 1, distance * 1.5, 1 do - if math_random(1, 2) ~= 1 then - surface.create_entity( - { - name = name, - position = source, - force = 'enemy', - source = source, - target = position, - max_range = 25, - speed = 1 - } - ) - end - position = { position[1] + modifier[1], position[2] + modifier[2] } - end -end - -boss_biter.damaged_entity = function (event) - if acid_lines[event.cause.name] then - if not storage.acid_lines_delay[event.cause.unit_number] then - storage.acid_lines_delay[event.cause.unit_number] = 0 - end - if storage.acid_lines_delay[event.cause.unit_number] < game.tick then - acid_line(event.cause.surface, acid_lines[event.cause.name], event.cause.position, event.entity.position) - storage.acid_lines_delay[event.cause.unit_number] = game.tick + 180 - end - end -end - -return boss_biter diff --git a/maps/fish_defender_v1/bouncy_shells.lua b/maps/fish_defender_v1/bouncy_shells.lua deleted file mode 100644 index 554326e1c..000000000 --- a/maps/fish_defender_v1/bouncy_shells.lua +++ /dev/null @@ -1,71 +0,0 @@ -local radius = 9 -local math_random = math.random - -local ammo_to_projectile_translation = { - ['shotgun-shell'] = 'shotgun-pellet', - ['piercing-shotgun-shell'] = 'piercing-shotgun-pellet' -} - -local function create_projectile(surface, position, target, name) - surface.create_entity( - { - name = name, - position = position, - source = position, - target = target, - max_range = 16, - speed = 0.3 - } - ) -end - -local function bounce(surface, position, ammo) - if math_random(1, 3) ~= 1 then - return - end - local valid_entities = {} - for _, e in pairs(surface.find_entities_filtered({area = {{position.x - radius, position.y - radius}, {position.x + radius, position.y + radius}}})) do - if e.health then - if e.force.name ~= 'player' then - --local distance_from_center = math_sqrt((e.position.x - position.x) ^ 2 + (e.position.y - position.y) ^ 2) - --if distance_from_center <= radius then - valid_entities[#valid_entities + 1] = e - --end - end - end - end - - if not valid_entities[1] then - return - end - - for _ = 1, math_random(3, 6), 1 do - create_projectile(surface, position, valid_entities[math_random(1, #valid_entities)].position, ammo) - end -end - -local function bouncy_shells(event) - if event.damage_type.name ~= 'physical' then - return false - end - local player = event.cause - if player.shooting_state.state == defines.shooting.not_shooting then - return false - end - local selected_weapon = player.get_inventory(defines.inventory.character_guns)[player.selected_gun_index] - if selected_weapon.name ~= 'combat-shotgun' and selected_weapon.name ~= 'shotgun' then - return false - end - - local selected_ammo = player.get_inventory(defines.inventory.character_ammo)[player.selected_gun_index] - if not selected_ammo then - return - end - if not ammo_to_projectile_translation[selected_ammo.name] then - return - end - - bounce(player.surface, event.entity.position, ammo_to_projectile_translation[selected_ammo.name]) -end - -return bouncy_shells diff --git a/maps/fish_defender_v1/crumbly_walls.lua b/maps/fish_defender_v1/crumbly_walls.lua deleted file mode 100644 index e3a901092..000000000 --- a/maps/fish_defender_v1/crumbly_walls.lua +++ /dev/null @@ -1,23 +0,0 @@ -local Event = require 'utils.event' -local math_random = math.random - -local rock_raffle = { 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' } - -local function on_entity_died(event) - if not storage.crumbly_walls_unlocked then - return - end - local entity = event.entity - if not entity.valid then - return - end - if entity.name ~= 'stone-wall' then - return - end - if math_random(1, 4) == 1 then - return - end - entity.surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = entity.position, force = 'player' }) -end - -Event.add(defines.events.on_entity_died, on_entity_died) diff --git a/maps/fish_defender_v1/explosive_gun_bullets.lua b/maps/fish_defender_v1/explosive_gun_bullets.lua deleted file mode 100644 index 342fc5573..000000000 --- a/maps/fish_defender_v1/explosive_gun_bullets.lua +++ /dev/null @@ -1,42 +0,0 @@ -local radius = 3 - -local function splash_damage(surface, position, final_damage_amount) - local damage = math.random(math.floor(final_damage_amount * 3), math.floor(final_damage_amount * 4)) - for _, e in pairs(surface.find_entities_filtered({area = {{position.x - radius, position.y - radius}, {position.x + radius, position.y + radius}}})) do - if e.valid and e.health then - local distance_from_center = math.sqrt((e.position.x - position.x) ^ 2 + (e.position.y - position.y) ^ 2) - if distance_from_center <= radius then - local damage_distance_modifier = 1 - distance_from_center / radius - if damage > 0 then - if math.random(1, 3) == 1 then - surface.create_entity({name = 'explosion', position = e.position}) - end - e.damage(damage * damage_distance_modifier, 'player', 'explosion') - end - end - end - end -end - -local function explosive_bullets(event) - if math.random(1, 3) ~= 1 then - return false - end - if event.damage_type.name ~= 'physical' then - return false - end - local player = event.cause - if player.shooting_state.state == defines.shooting.not_shooting then - return false - end - local selected_weapon = player.get_inventory(defines.inventory.character_guns)[player.selected_gun_index] - if selected_weapon.name ~= 'submachine-gun' and selected_weapon.name ~= 'pistol' then - return false - end - - player.surface.create_entity({name = 'explosion', position = event.entity.position}) - - splash_damage(player.surface, event.entity.position, event.final_damage_amount) -end - -return explosive_bullets diff --git a/maps/fish_defender_v1/fish_defender.lua b/maps/fish_defender_v1/fish_defender.lua deleted file mode 100644 index afb8a85ad..000000000 --- a/maps/fish_defender_v1/fish_defender.lua +++ /dev/null @@ -1,1760 +0,0 @@ ---luacheck: ignore --- fish defender -- by mewmew -- - -require 'maps.fish_defender_v1.map_intro' -require 'maps.fish_defender_v1.market' -require 'maps.fish_defender_v1.shotgun_buff' -require 'maps.fish_defender_v1.on_entity_damaged' - -require 'modules.rocket_launch_always_yields_science' -require 'modules.launch_fish_to_win' -require 'modules.biters_yield_coins' -require 'modules.dynamic_landfill' -require 'modules.dangerous_goods' -require 'modules.custom_death_messages' -require 'modules.biter_evasion_hp_increaser' - -local event = require 'utils.event' -local Server = require 'utils.server' -local boss_biter = require 'maps.fish_defender.boss_biters' -local Score = require 'utils.gui.score' -require 'utils.functions.boss_unit' -local map_functions = require 'utils.tools.map_functions' -local Difficulty = require 'modules.difficulty_vote' -local math_random = math.random -local insert = table.insert -local enable_start_grace_period = true - -local biter_count_limit = 1024 --maximum biters on the east side of the map, next wave will be delayed if the maximum has been reached -local boss_waves = { - [50] = { { name = 'big-biter', count = 3 } }, - [100] = { { name = 'behemoth-biter', count = 1 } }, - [150] = { { name = 'behemoth-spitter', count = 4 }, { name = 'big-spitter', count = 16 } }, - [200] = { - { name = 'behemoth-biter', count = 4 }, - { name = 'behemoth-spitter', count = 2 }, - { name = 'big-biter', count = 32 } - }, - [250] = { - { name = 'behemoth-biter', count = 8 }, - { name = 'behemoth-spitter', count = 4 }, - { name = 'big-spitter', count = 32 } - }, - [300] = { { name = 'behemoth-biter', count = 16 }, { name = 'behemoth-spitter', count = 8 } } -} - -local difficulties_votes = { - [1] = { wave_interval = 5100, amount_modifier = 0.55, strength_modifier = 0.40 }, - [2] = { wave_interval = 4500, amount_modifier = 0.75, strength_modifier = 0.65 }, - [3] = { wave_interval = 4000, amount_modifier = 0.90, strength_modifier = 0.85 }, - [4] = { wave_interval = 3600, amount_modifier = 1.00, strength_modifier = 1.00 }, - [5] = { wave_interval = 3200, amount_modifier = 1.10, strength_modifier = 1.25 }, - [6] = { wave_interval = 2700, amount_modifier = 1.25, strength_modifier = 1.75 }, - [7] = { wave_interval = 2100, amount_modifier = 1.50, strength_modifier = 2.50 } -} - -local function shuffle(tbl) - local size = #tbl - for i = size, 1, -1 do - local rand = math.random(size) - tbl[i], tbl[rand] = tbl[rand], tbl[i] - end - return tbl -end - -local function create_wave_gui(player) - if player.gui.top['fish_defense_waves'] then - player.gui.top['fish_defense_waves'].destroy() - end - local frame = player.gui.top.add({ type = 'frame', name = 'fish_defense_waves', tooltip = 'Click to show map info' }) - frame.style.maximal_height = 38 - - local wave_count = 0 - if storage.wave_count then - wave_count = storage.wave_count - end - - if not storage.wave_grace_period then - local label = frame.add({ type = 'label', caption = 'Wave: ' .. wave_count }) - label.style.font_color = { r = 0.88, g = 0.88, b = 0.88 } - label.style.font = 'default-listbox' - label.style.left_padding = 4 - label.style.right_padding = 4 - label.style.minimal_width = 68 - label.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - - local next_level_progress = game.tick % storage.wave_interval / storage.wave_interval - - local progressbar = frame.add({ type = 'progressbar', value = next_level_progress }) - progressbar.style.minimal_width = 120 - progressbar.style.maximal_width = 120 - progressbar.style.top_padding = 10 - progressbar.style.height = 20 - else - local time_remaining = math.floor(((storage.wave_grace_period - (game.tick % storage.wave_grace_period)) / 60) / 60) - if time_remaining <= 0 then - storage.wave_grace_period = nil - return - end - - local label = frame.add({ type = 'label', caption = 'Waves will start in ' .. time_remaining .. ' minutes.' }) - label.style.font_color = { r = 0.88, g = 0.88, b = 0.88 } - label.style.font = 'default-listbox' - label.style.left_padding = 4 - label.style.right_padding = 4 - label.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - - if not enable_start_grace_period then - storage.wave_grace_period = nil - return - end - end -end - -local function show_fd_stats(player) - local gui_id = 'fd-stats' - local table_id = gui_id .. 'table' - - if player.gui.left[gui_id] then - player.gui.left[gui_id].destroy() - end - - local frame = - player.gui.left.add { - type = 'frame', - name = gui_id - } - local table = - frame.add { - type = 'table', - name = table_id, - column_count = 2 - } - - local table_header = { 'Building', 'Placed' .. '/' .. 'Limit' } - for k, v in pairs(table_header) do - local h = table.add { type = 'label', caption = v } - h.style.font = 'heading-2' - end - - for k, v in pairs(storage.entity_limits) do - local name = v.str - local placed = v.placed - local limit = v.limit - local entry = { name, placed .. '/' .. limit } - for k, v in pairs(entry) do - table.add { - type = 'label', - caption = v - } - end - end -end - -local function update_fd_stats() - for _, player in pairs(game.connected_players) do - if player.gui.left['fd-stats'] then - show_fd_stats(player) - end - end -end - -local function add_fd_stats_button(player) - local button_id = 'fd-stats-button' - if player.gui.top[button_id] then - player.gui.top[button_id].destroy() - end - local button = - player.gui.top.add { - type = 'sprite-button', - name = button_id, - sprite = 'item/submachine-gun' - } -end - -local function on_gui_click(event) - if not event.element.valid then - return - end - if event.element.name ~= 'fd-stats-button' then - return - end - local player = game.players[event.player_index] - local frame = player.gui.left['fd-stats'] - if frame == nil then - show_fd_stats(player) - else - frame.destroy() - end -end - -local function on_market_item_purchased(event) - update_fd_stats() -end - -local threat_values = { - ['small_biter'] = 1, - ['medium_biter'] = 3, - ['big_biter'] = 5, - ['behemoth_biter'] = 10, - ['small_spitter'] = 1, - ['medium_spitter'] = 3, - ['big_spitter'] = 5, - ['behemoth_spitter'] = 10 -} - -local function get_biter_initial_pool() - local biter_pool = {} - if storage.wave_count > 1750 then - biter_pool = { - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end - if storage.wave_count > 1500 then - biter_pool = { - { name = 'big-biter', threat = threat_values.big_biter, weight = 1 }, - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end - if storage.wave_count > 1250 then - biter_pool = { - { name = 'big-biter', threat = threat_values.big_biter, weight = 2 }, - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end - if storage.wave_count > 1000 then - biter_pool = { - { name = 'big-biter', threat = threat_values.big_biter, weight = 3 }, - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.1 then - biter_pool = { - { name = 'small-biter', threat = threat_values.small_biter, weight = 3 }, - { name = 'small-spitter', threat = threat_values.small_spitter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.2 then - biter_pool = { - { name = 'small-biter', threat = threat_values.small_biter, weight = 10 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 2 }, - { name = 'small-spitter', threat = threat_values.small_spitter, weight = 5 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.3 then - biter_pool = { - { name = 'small-biter', threat = threat_values.small_biter, weight = 18 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 6 }, - { name = 'small-spitter', threat = threat_values.small_spitter, weight = 8 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 3 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.4 then - biter_pool = { - { name = 'small-biter', threat = threat_values.small_biter, weight = 2 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 8 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 2 }, - { name = 'small-spitter', threat = threat_values.small_spitter, weight = 1 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 4 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.5 then - biter_pool = { - { name = 'small-biter', threat = threat_values.small_biter, weight = 2 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 4 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 8 }, - { name = 'small-spitter', threat = threat_values.small_spitter, weight = 1 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 2 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 4 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.6 then - biter_pool = { - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 4 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 8 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 2 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 4 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.7 then - biter_pool = { - { name = 'behemoth-biter', threat = threat_values.small_biter, weight = 2 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 12 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 20 }, - { name = 'behemoth-spitter', threat = threat_values.small_spitter, weight = 1 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 6 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 10 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor < 0.8 then - biter_pool = { - { name = 'behemoth-biter', threat = threat_values.small_biter, weight = 2 }, - { name = 'medium-biter', threat = threat_values.medium_biter, weight = 4 }, - { name = 'big-biter', threat = threat_values.big_biter, weight = 10 }, - { name = 'behemoth-spitter', threat = threat_values.small_spitter, weight = 1 }, - { name = 'medium-spitter', threat = threat_values.medium_spitter, weight = 2 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 5 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor <= 0.9 then - biter_pool = { - { name = 'big-biter', threat = threat_values.big_biter, weight = 12 }, - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 6 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end - if game.forces.enemy.evolution_factor <= 1 then - biter_pool = { - { name = 'big-biter', threat = threat_values.big_biter, weight = 4 }, - { name = 'behemoth-biter', threat = threat_values.behemoth_biter, weight = 2 }, - { name = 'big-spitter', threat = threat_values.big_spitter, weight = 2 }, - { name = 'behemoth-spitter', threat = threat_values.behemoth_spitter, weight = 1 } - } - return biter_pool - end -end - -local function get_biter_pool() - local surface = game.surfaces['fish_defender'] - local biter_pool = get_biter_initial_pool() - local biter_raffle = {} - for _, biter_type in pairs(biter_pool) do - for x = 1, biter_type.weight, 1 do - insert(biter_raffle, { name = biter_type.name, threat = biter_type.threat }) - end - end - return biter_raffle -end - -local function spawn_biter(pos, biter_pool) - if storage.attack_wave_threat < 1 then - return false - end - local surface = game.surfaces['fish_defender'] - biter_pool = shuffle(biter_pool) - storage.attack_wave_threat = storage.attack_wave_threat - biter_pool[1].threat - local valid_pos = surface.find_non_colliding_position(biter_pool[1].name, pos, 100, 2) - local biter = surface.create_entity({ name = biter_pool[1].name, position = valid_pos }) - return biter -end - -local attack_group_count_thresholds = { - { 0, 1 }, - { 50, 2 }, - { 100, 3 }, - { 150, 4 }, - { 200, 5 }, - { 1000, 6 }, - { 2000, 7 }, - { 3000, 8 } -} - -local function get_number_of_attack_groups() - local n = 1 - for _, entry in pairs(attack_group_count_thresholds) do - if storage.wave_count >= entry[1] then - n = entry[2] - end - end - return n -end - -local function clear_corpses(surface) - if not storage.wave_count then - return - end - local chance = 4 - if storage.wave_count > 250 then - chance = 3 - end - if storage.wave_count > 500 then - chance = 2 - end - for _, entity in pairs(surface.find_entities_filtered { type = 'corpse' }) do - if math_random(1, chance) == 1 then - entity.destroy() - end - end -end - -local boss_wave_names = { - [50] = 'The Big Biter Gang', - [100] = 'Biterzilla', - [150] = 'The Spitter Squad', - [200] = 'The Wall Nibblers', - [250] = 'Conveyor Munchers', - [300] = 'Furnace Freezers', - [350] = 'Cable Chewers', - [400] = 'Power Pole Thieves', - [450] = 'Assembler Annihilators', - [500] = 'Inserter Crunchers', - [550] = 'Engineer Eaters', - [600] = 'Belt Unbalancers', - [650] = 'Turret Devourers', - [700] = 'Pipe Perforators', - [750] = 'Desync Bros', - [800] = 'Ratio Randomizers', - [850] = 'Wire Chompers', - [900] = 'The Bus Mixers', - [950] = 'Roundabout Deadlockers', - [1000] = 'Happy Tree Friends', - [1050] = 'Uranium Digesters', - [1100] = 'Bot Banishers', - [1150] = 'Chest Crushers', - [1200] = 'Cargo Wagon Scratchers', - [1250] = 'Transport Belt Surfers', - [1300] = 'Pumpjack Pulverizers', - [1350] = 'Radar Ravagers', - [1400] = 'Mall Deconstrutors', - [1450] = 'Lamp Dimmers', - [1500] = 'Roboport Disablers', - [1550] = 'Signal Spammers', - [1600] = 'Brick Tramplers', - [1650] = 'Drill Destroyers', - [1700] = 'Gearwheel Grinders', - [1750] = 'Silo Seekers', - [1800] = 'Circuit Breakers', - [1850] = 'Bullet Absorbers', - [1900] = 'Oil Guzzlers', - [1950] = 'Belt Rotators', - [2000] = 'Bluescreen Factor' -} - -local function spawn_boss_units(surface) - local Diff = Difficulty.get() - if boss_wave_names[storage.wave_count] then - game.print('Boss Wave ' .. storage.wave_count .. ' - - ' .. boss_wave_names[storage.wave_count], { r = 0.8, g = 0.1, b = 0.1 }) - else - game.print('Boss Wave ' .. storage.wave_count, { r = 0.8, g = 0.1, b = 0.1 }) - end - - if not boss_waves[storage.wave_count] then - boss_waves[storage.wave_count] = { - { name = 'behemoth-biter', count = math.floor(storage.wave_count / 16) }, - { name = 'behemoth-spitter', count = math.floor(storage.wave_count / 32) } - } - end - - local position = { x = 216, y = 0 } - local biter_group = surface.create_unit_group({ position = position }) - for _, entry in pairs(boss_waves[storage.wave_count]) do - for x = 1, entry.count, 1 do - local pos = surface.find_non_colliding_position(entry.name, position, 64, 3) - if pos then - local biter = surface.create_entity({ name = entry.name, position = pos }) - storage.boss_biters[biter.unit_number] = biter - add_boss_unit(biter, storage.biter_evasion_health_increase_factor * 8 * difficulties_votes[Diff.difficulty_vote_index].strength_modifier, 0.70) - biter_group.add_member(biter) - end - end - end - biter_group.set_command( - { - type = defines.command.compound, - structure_type = defines.compound_command.logical_and, - commands = { - { - type = defines.command.attack_area, - destination = { x = 160, y = 0 }, - radius = 16, - distraction = defines.distraction.by_enemy - }, - { - type = defines.command.attack_area, - destination = { x = 128, y = 0 }, - radius = 16, - distraction = defines.distraction.by_enemy - }, - { - type = defines.command.attack_area, - destination = { x = 96, y = 0 }, - radius = 16, - distraction = defines.distraction.by_enemy - }, - { - type = defines.command.attack_area, - destination = { x = 64, y = 0 }, - radius = 16, - distraction = defines.distraction.by_enemy - }, - { - type = defines.command.attack_area, - destination = { x = 32, y = 0 }, - radius = 16, - distraction = defines.distraction.by_enemy - }, - { - type = defines.command.attack_area, - destination = { x = -32, y = 0 }, - radius = 16, - distraction = defines.distraction.by_enemy - }, - { - type = defines.command.attack, - target = storage.market, - distraction = defines.distraction.by_enemy - } - } - } - ) - biter_group.start_moving() -end - -local function wake_up_the_biters(surface) - if not storage.market then - return - end - - --if not storage.wake_up_counter then storage.wake_up_counter = 0 end - --storage.wake_up_counter = storage.wake_up_counter + 1 - --if storage.wake_up_counter % 2 == 1 then return end - - --[[ - unit_group = game.player.surface.create_unit_group({position = game.player.selected.position}) - for _, biter in pairs(game.player.surface.find_enemy_units(game.player.selected.position, 96, "player")) do - unit_group.add_member(biter) - end - unit_group.set_command({ - type = defines.command.compound, - structure_type = defines.compound_command.logical_and, - commands = { - { - type=defines.command.attack_area, - destination=storage.market.position, - radius=512, - distraction=defines.distraction.by_anything - } - } - }) - unit_group.start_moving() - - game.player.surface.set_multi_command({ - command={ - type=defines.command.attack, - target=storage.market, - distraction=defines.distraction.none - }, - unit_count = 128, - force = "enemy", - unit_search_distance=128 - }) - - ]] - local nearest_player_unit = surface.find_nearest_enemy({ position = { x = 256, y = 0 }, max_distance = 512, force = 'enemy' }) - if not nearest_player_unit then - return - end - local target_positions = {} - for y = -80, 80, 4 do - insert(target_positions, { x = nearest_player_unit.position.x, y = y }) - end - target_positions = shuffle(target_positions) - - local units = surface.find_entities_filtered({ type = 'unit' }) - units = shuffle(units) - local unit_groups = {} - for i = 1, 2, 1 do - if not units[i] then - break - end - if not units[i].valid then - break - end - unit_groups[i] = surface.create_unit_group({ position = { x = units[i].position.x, y = units[i].position.y } }) - local biters = surface.find_enemy_units(units[i].position, 24, 'player') - for _, biter in pairs(biters) do - unit_groups[i].add_member(biter) - end - end - - for i = 1, #unit_groups, 1 do - if unit_groups[i].valid then - if #unit_groups[i].members > 0 then - unit_groups[i].set_command( - { - type = defines.command.compound, - structure_type = defines.compound_command.logical_and, - commands = { - { - type = defines.command.attack_area, - destination = { target_positions[i].x, target_positions[i].y }, - radius = 32, - distraction = defines.distraction.by_anything - }, - { - type = defines.command.attack_area, - destination = storage.market.position, - radius = 32, - distraction = defines.distraction.by_anything - }, - { - type = defines.command.attack, - target = storage.market, - distraction = defines.distraction.by_enemy - } - } - } - ) - unit_groups[i].start_moving() - else - unit_groups[i].destroy() - end - end - end - - --[[ - surface.set_multi_command({ - command={ - type=defines.command.attack, - target=storage.market, - distraction=defines.distraction.by_enemy - }, - unit_count = 16, - force = "enemy", - unit_search_distance=64 - })]] - surface.set_multi_command( - { - command = { - type = defines.command.attack, - target = storage.market, - distraction = defines.distraction.none - }, - unit_count = 16, - force = 'enemy', - unit_search_distance = 24 - } - ) -end - -local function damage_entity_outside_of_fence(e) - if not e.health then - return - end - if e.force.name == 'neutral' then - return - end - if e.type == 'unit' or e.type == 'unit-spawner' then - return - end - - e.surface.create_entity({ name = 'water-splash', position = e.position }) - - if e.type == 'entity-ghost' then - e.destroy() - return - end - - e.health = e.health - math_random(math.floor(e.max_health * 0.05), math.floor(e.max_health * 0.1)) - if e.health <= 0 then - e.die('enemy') - end -end - -local function biter_attack_wave() - if not storage.market then - return - end - if storage.wave_grace_period then - return - end - local surface = game.surfaces['fish_defender'] - local Diff = Difficulty.get() - - clear_corpses(surface) - wake_up_the_biters(surface) - - if surface.count_entities_filtered({ type = 'unit' }) > biter_count_limit then - --game.print("Biter limit reached, wave delayed.", {r = 0.7, g = 0.1, b = 0.1}) - return - end - - if not storage.wave_count then - storage.wave_count = 1 - else - storage.wave_count = storage.wave_count + 1 - end - - local m = 0.0015 - if Diff.difficulty_vote_index then - m = m * difficulties_votes[Diff.difficulty_vote_index].strength_modifier - end - game.forces.enemy.set_ammo_damage_modifier('melee', storage.wave_count * m) - game.forces.enemy.set_ammo_damage_modifier('biological', storage.wave_count * m) - storage.biter_evasion_health_increase_factor = 1 + (storage.wave_count * (m * 2)) - - local m = 4 - if Diff.difficulty_vote_index then - m = m * difficulties_votes[Diff.difficulty_vote_index].amount_modifier - end - - if storage.wave_count % 50 == 0 then - storage.attack_wave_threat = math.floor(storage.wave_count * m) - spawn_boss_units(surface) - if storage.attack_wave_threat > 10000 then - storage.attack_wave_threat = 10000 - end - else - storage.attack_wave_threat = math.floor(storage.wave_count * m) - if storage.attack_wave_threat > 10000 then - storage.attack_wave_threat = 10000 - end - end - - local evolution = storage.wave_count * 0.00125 - if evolution > 1 then - evolution = 1 - end - game.forces.enemy.evolution_factor = evolution - - if game.forces.enemy.evolution_factor == 1 then - if not storage.endgame_modifier then - storage.endgame_modifier = 1 - game.print('Endgame enemy evolution reached.', { r = 0.7, g = 0.1, b = 0.1 }) - else - storage.endgame_modifier = storage.endgame_modifier + 1 - end - end - - for _, e in pairs(surface.find_entities_filtered({ area = { { 160, -256 }, { 360, 256 } } })) do - damage_entity_outside_of_fence(e) - end - - local spawn_x = 242 - local target_x = -32 - local group_coords = {} - for a = -80, 80, 16 do - insert(group_coords, { spawn = { x = spawn_x, y = a * 2 }, target = { x = target_x, y = a } }) - end - group_coords = shuffle(group_coords) - - local unit_groups = {} - if storage.wave_count > 100 and math_random(1, 8) == 1 then - for i = 1, #group_coords, 1 do - unit_groups[i] = surface.create_unit_group({ position = group_coords[i].spawn }) - end - else - for i = 1, get_number_of_attack_groups(), 1 do - unit_groups[i] = surface.create_unit_group({ position = group_coords[i].spawn }) - end - end - - local biter_pool = get_biter_pool() - while storage.attack_wave_threat > 0 do - for i = 1, #unit_groups, 1 do - local biter = spawn_biter(unit_groups[i].position, biter_pool) - if biter then - unit_groups[i].add_member(biter) - else - break - end - end - end - - for i = 1, #unit_groups, 1 do - unit_groups[i].set_command( - { - type = defines.command.compound, - structure_type = defines.compound_command.logical_and, - commands = { - { - type = defines.command.attack_area, - destination = { group_coords[i].target.x + 192, group_coords[i].target.y }, - radius = 32, - distraction = defines.distraction.by_anything - }, - { - type = defines.command.attack_area, - destination = { group_coords[i].target.x + 128, group_coords[i].target.y }, - radius = 32, - distraction = defines.distraction.by_anything - }, - { - type = defines.command.attack_area, - destination = { group_coords[i].target.x + 64, group_coords[i].target.y }, - radius = 32, - distraction = defines.distraction.by_anything - }, - { - type = defines.command.attack_area, - destination = { group_coords[i].target.x, group_coords[i].target.y }, - radius = 32, - distraction = defines.distraction.by_enemy - }, - { - type = defines.command.attack, - target = storage.market, - distraction = defines.distraction.by_enemy - } - } - } - ) - unit_groups[i].start_moving() - end -end - -local function get_sorted_list(column_name, score_list) - for x = 1, #score_list, 1 do - for y = 1, #score_list, 1 do - if not score_list[y + 1] then - break - end - if score_list[y][column_name] < score_list[y + 1][column_name] then - local key = score_list[y] - score_list[y] = score_list[y + 1] - score_list[y + 1] = key - end - end - end - return score_list -end - -local function get_mvps() - local get_score = Score.get_table().score_table - if not get_score['player'] then - return false - end - local score = get_score['player'] - local score_list = {} - for _, p in pairs(game.players) do - local killscore = 0 - if score.players[p.name].killscore then - killscore = score.players[p.name].killscore - end - local deaths = 0 - if score.players[p.name].deaths then - deaths = score.players[p.name].deaths - end - local built_entities = 0 - if score.players[p.name].built_entities then - built_entities = score.players[p.name].built_entities - end - local mined_entities = 0 - if score.players[p.name].mined_entities then - mined_entities = score.players[p.name].mined_entities - end - table.insert( - score_list, - { - name = p.name, - killscore = killscore, - deaths = deaths, - built_entities = built_entities, - mined_entities = mined_entities - } - ) - end - local mvp = {} - score_list = get_sorted_list('killscore', score_list) - mvp.killscore = { name = score_list[1].name, score = score_list[1].killscore } - score_list = get_sorted_list('deaths', score_list) - mvp.deaths = { name = score_list[1].name, score = score_list[1].deaths } - score_list = get_sorted_list('built_entities', score_list) - mvp.built_entities = { name = score_list[1].name, score = score_list[1].built_entities } - return mvp -end - -local function is_game_lost() - if storage.market then - return - end - - for _, player in pairs(game.connected_players) do - if player.gui.left['fish_defense_game_lost'] then - return - end - local f = - player.gui.left.add( - { - type = 'frame', - name = 'fish_defense_game_lost', - caption = 'The fish market was overrun! The biters are having a feast :3', - direction = 'vertical' - } - ) - f.style.font_color = { r = 0.65, g = 0.1, b = 0.99 } - - local t = f.add({ type = 'table', column_count = 2 }) - local l = t.add({ type = 'label', caption = 'Survival Time >> ' }) - l.style.font = 'default-listbox' - l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - - if storage.market_age >= 216000 then - local l = - t.add( - { - type = 'label', - caption = math.floor(((storage.market_age / 60) / 60) / 60) .. ' hours ' .. math.ceil((storage.market_age % 216000 / 60) / 60) .. ' minutes' - } - ) - l.style.font = 'default-bold' - l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - else - local l = t.add({ type = 'label', caption = math.ceil((storage.market_age % 216000 / 60) / 60) .. ' minutes' }) - l.style.font = 'default-bold' - l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - end - - local mvp = get_mvps() - if mvp then - local l = t.add({ type = 'label', caption = 'MVP Defender >> ' }) - l.style.font = 'default-listbox' - l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score }) - l.style.font = 'default-bold' - l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - - local l = t.add({ type = 'label', caption = 'MVP Builder >> ' }) - l.style.font = 'default-listbox' - l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = - t.add( - { - type = 'label', - caption = mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things' - } - ) - l.style.font = 'default-bold' - l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - - local l = t.add({ type = 'label', caption = 'MVP Deaths >> ' }) - l.style.font = 'default-listbox' - l.style.font_color = { r = 0.22, g = 0.77, b = 0.44 } - local l = t.add({ type = 'label', caption = mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times' }) - l.style.font = 'default-bold' - l.style.font_color = { r = 0.33, g = 0.66, b = 0.9 } - - if not storage.results_sent then - local result = {} - insert(result, 'MVP Defender: \\n') - insert(result, mvp.killscore.name .. ' with a score of ' .. mvp.killscore.score .. '\\n') - insert(result, '\\n') - insert(result, 'MVP Builder: \\n') - insert(result, mvp.built_entities.name .. ' built ' .. mvp.built_entities.score .. ' things\\n') - insert(result, '\\n') - insert(result, 'MVP Deaths: \\n') - insert(result, mvp.deaths.name .. ' died ' .. mvp.deaths.score .. ' times') - local message = table.concat(result) - Server.to_discord_embed(message) - storage.results_sent = true - end - end - - for _, player in pairs(game.connected_players) do - player.play_sound { path = 'utility/game_lost', volume_modifier = 0.75 } - end - end - - game.map_settings.enemy_expansion.enabled = true - game.map_settings.enemy_expansion.max_expansion_distance = 15 - game.map_settings.enemy_expansion.settler_group_min_size = 15 - game.map_settings.enemy_expansion.settler_group_max_size = 30 - game.map_settings.enemy_expansion.min_expansion_cooldown = 600 - game.map_settings.enemy_expansion.max_expansion_cooldown = 600 -end - -local function damage_entities_in_radius(surface, position, radius, damage) - local entities_to_damage = surface.find_entities_filtered({ area = { { position.x - radius, position.y - radius }, { position.x + radius, position.y + radius } } }) - for _, entity in pairs(entities_to_damage) do - if entity.valid then - if entity.health and entity.name ~= 'land-mine' then - if entity.force.name ~= 'enemy' then - if entity.name == 'character' then - entity.damage(damage, 'enemy') - else - entity.health = entity.health - damage - if entity.health <= 0 then - entity.die('enemy') - end - end - end - end - end - end -end - -local function market_kill_visuals() - local m = 32 - local m2 = m * 0.005 - for i = 1, 1024, 1 do - storage.market.surface.create_entity( - { - name = 'branch-particle', - position = storage.market.position, - frame_speed = 0.1, - vertical_speed = 0.1, - height = 0.1, - movement = { m2 - (math.random(0, m) * 0.01), m2 - (math.random(0, m) * 0.01) } - } - ) - end - for x = -5, 5, 0.5 do - for y = -5, 5, 0.5 do - if math_random(1, 2) == 1 then - storage.market.surface.create_trivial_smoke( - { - name = 'smoke-fast', - position = { storage.market.position.x + (x * 0.35), storage.market.position.y + (y * 0.35) } - } - ) - end - if math_random(1, 3) == 1 then - storage.market.surface.create_trivial_smoke( - { - name = 'train-smoke', - position = { storage.market.position.x + (x * 0.35), storage.market.position.y + (y * 0.35) } - } - ) - end - end - end - storage.market.surface.spill_item_stack(storage.market.position, { name = 'raw-fish', count = 1024 }, true) -end - -local biter_splash_damage = { - ['medium-biter'] = { - visuals = { 'blood-explosion-big', 'big-explosion' }, - radius = 1.5, - damage_min = 50, - damage_max = 100, - chance = 8 - }, - ['big-biter'] = { - visuals = { 'blood-explosion-huge', 'ground-explosion' }, - radius = 2, - damage_min = 75, - damage_max = 150, - chance = 16 - }, - ['behemoth-biter'] = { - visuals = { 'blood-explosion-huge', 'big-artillery-explosion' }, - radius = 2.5, - damage_min = 100, - damage_max = 200, - chance = 32 - } -} - -local function on_entity_died(event) - if event.entity.force.name == 'enemy' then - local surface = event.entity.surface - - if storage.boss_biters[event.entity.unit_number] then - boss_biter.died(event) - end - - local splash = biter_splash_damage[event.entity.name] - if splash then - if math_random(1, splash.chance) == 1 then - for _, visual in pairs(splash.visuals) do - surface.create_entity({ name = visual, position = event.entity.position }) - end - damage_entities_in_radius(surface, event.entity.position, splash.radius, math_random(splash.damage_min, splash.damage_max)) - return - end - end - - if event.entity.name == 'behemoth-biter' then - if math_random(1, 16) == 1 then - local p = surface.find_non_colliding_position('big-biter', event.entity.position, 3, 0.5) - if p then - surface.create_entity { name = 'big-biter', position = p } - end - end - for i = 1, math_random(1, 2), 1 do - local p = surface.find_non_colliding_position('medium-biter', event.entity.position, 3, 0.5) - if p then - surface.create_entity { name = 'medium-biter', position = p } - end - end - end - return - end - - if event.entity == storage.market then - market_kill_visuals() - storage.market = nil - storage.market_age = game.tick - is_game_lost() - end - - if storage.entity_limits[event.entity.name] then - storage.entity_limits[event.entity.name].placed = storage.entity_limits[event.entity.name].placed - 1 - update_fd_stats() - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - - if not storage.fish_defense_init_done then - local map_gen_settings = {} - map_gen_settings.water = '0.5' - map_gen_settings.cliff_settings = { cliff_elevation_interval = 16, cliff_elevation_0 = 32 } - map_gen_settings.autoplace_controls = { - ['coal'] = { frequency = '3', size = '2', richness = '1' }, - ['stone'] = { frequency = '3', size = '2', richness = '1' }, - ['copper-ore'] = { frequency = '3', size = '2', richness = '1' }, - ['iron-ore'] = { frequency = '3', size = '2', richness = '1' }, - ['uranium-ore'] = { frequency = '2', size = '1', richness = '1' }, - ['crude-oil'] = { frequency = '4', size = '1', richness = '1' }, - ['trees'] = { frequency = '1.5', size = '1.5', richness = '1' }, - ['enemy-base'] = { frequency = 'none', size = 'none', richness = 'none' } - } - game.create_surface('fish_defender', map_gen_settings) - local surface = game.surfaces['fish_defender'] - - local radius = 256 - game.forces.player.chart(surface, { { x = -1 * radius, y = -1 * radius }, { x = radius, y = radius } }) - - game.map_settings.enemy_expansion.enabled = false - game.map_settings.enemy_evolution.destroy_factor = 0 - game.map_settings.enemy_evolution.time_factor = 0 - game.map_settings.enemy_evolution.pollution_factor = 0 - game.map_settings.pollution.enabled = false - - game.forces['player'].technologies['atomic-bomb'].enabled = false - - storage.entity_limits = { - ['gun-turret'] = { placed = 1, limit = 1, str = 'gun turret', slot_price = 75 }, - ['laser-turret'] = { placed = 0, limit = 1, str = 'laser turret', slot_price = 300 }, - ['artillery-turret'] = { placed = 0, limit = 1, str = 'artillery turret', slot_price = 500 }, - ['flamethrower-turret'] = { placed = 0, limit = 0, str = 'flamethrower turret', slot_price = 50000 }, - ['land-mine'] = { placed = 0, limit = 1, str = 'mine', slot_price = 1 } - } - - game.create_force('decoratives') - game.forces['decoratives'].set_cease_fire('enemy', true) - game.forces['enemy'].set_cease_fire('decoratives', true) - game.forces['player'].set_cease_fire('decoratives', true) - - storage.comfylatron_habitat = { - left_top = { x = -1500, y = -1500 }, - right_bottom = { x = -80, y = 1500 } - } - - storage.fish_defense_init_done = true - end - - if player.online_time < 1 then - player.insert({ name = 'pistol', count = 1 }) - player.insert({ name = 'raw-fish', count = 3 }) - player.insert({ name = 'firearm-magazine', count = 16 }) - player.insert({ name = 'iron-plate', count = 32 }) - end - - local surface = game.surfaces['fish_defender'] - if player.online_time < 2 and surface.is_chunk_generated({ 0, 0 }) then - player.teleport(surface.find_non_colliding_position('character', { -75, 4 }, 50, 1), 'fish_defender') - else - if player.online_time < 2 then - player.teleport({ -50, 0 }, 'fish_defender') - end - end - - create_wave_gui(player) - add_fd_stats_button(player) - - if game.tick > 900 then - is_game_lost() - end -end - -local function get_replacement_tile(surface) - local tilename = 'grass-1' - for x = -160, 160, 1 do - for y = -96, 90, 1 do - local tile = surface.get_tile(x, y) - if tile.name ~= 'water' and tile.name ~= 'deepwater' then - tilename = tile.name - end - end - end - return tilename -end - -local worm_raffle_table = { - [1] = { - 'small-worm-turret', - 'small-worm-turret', - 'small-worm-turret', - 'small-worm-turret', - 'small-worm-turret', - 'small-worm-turret' - }, - [2] = { - 'small-worm-turret', - 'small-worm-turret', - 'small-worm-turret', - 'small-worm-turret', - 'small-worm-turret', - 'medium-worm-turret' - }, - [3] = { - 'small-worm-turret', - 'small-worm-turret', - 'small-worm-turret', - 'small-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret' - }, - [4] = { - 'small-worm-turret', - 'small-worm-turret', - 'small-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret' - }, - [5] = { - 'small-worm-turret', - 'small-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret', - 'big-worm-turret' - }, - [6] = { - 'small-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret', - 'big-worm-turret' - }, - [7] = { - 'medium-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret', - 'big-worm-turret', - 'big-worm-turret' - }, - [8] = { - 'medium-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret', - 'big-worm-turret', - 'big-worm-turret' - }, - [9] = { - 'medium-worm-turret', - 'medium-worm-turret', - 'medium-worm-turret', - 'big-worm-turret', - 'big-worm-turret', - 'big-worm-turret' - }, - [10] = { - 'medium-worm-turret', - 'medium-worm-turret', - 'big-worm-turret', - 'big-worm-turret', - 'big-worm-turret', - 'big-worm-turret' - } -} -local rock_raffle = { - 'big-sand-rock', - 'big-sand-rock', - 'big-rock', - 'big-rock', - 'big-rock', - 'big-rock', - 'big-rock', - 'big-rock', - 'huge-rock' -} - -local function spawn_obstacles(left_top, surface) - if not storage.obstacle_start_x then - storage.obstacle_start_x = math.abs(left_top.x) - 32 - end - local current_depth = math.abs(left_top.x) - storage.obstacle_start_x - local worm_amount = math.ceil(current_depth / 64) - local i = math.ceil(current_depth / 256) - if i > 10 then - i = 10 - end - if i < 1 then - i = 1 - end - local worm_raffle = worm_raffle_table[i] - - local rocks_amount = math.ceil(current_depth / 16) - - local tile_positions = {} - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - if not surface.get_tile(pos).collides_with('player') then - tile_positions[#tile_positions + 1] = pos - end - end - end - if #tile_positions == 0 then - return - end - - tile_positions = shuffle(tile_positions) - for _, pos in pairs(tile_positions) do - surface.create_entity({ name = worm_raffle[math_random(1, #worm_raffle)], position = pos, force = 'enemy' }) - worm_amount = worm_amount - 1 - if worm_amount < 1 then - break - end - end - - tile_positions = shuffle(tile_positions) - for _, pos in pairs(tile_positions) do - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = pos }) - rocks_amount = rocks_amount - 1 - if rocks_amount < 1 then - break - end - end -end - -local map_height = 96 - -local function on_chunk_generated(event) - local surface = game.surfaces['fish_defender'] - - if not surface then - return - end - if surface.name ~= event.surface.name then - return - end - - local area = event.area - local left_top = area.left_top - - if left_top.x <= -196 then - local search_area = { { left_top.x - 32, left_top.y - 32 }, { left_top.x + 32, left_top.y + 32 } } - if surface.count_tiles_filtered({ name = 'water', area = search_area }) == 0 and math_random(1, 64) == 1 then - map_functions.draw_noise_tile_circle({ x = left_top.x + math_random(1, 30), y = left_top.y + math_random(1, 30) }, 'water', surface, math_random(6, 12)) - end - - if not storage.spawn_ores_generated then - local spawn_position_x = -76 - - surface.create_entity({ name = 'electric-beam', position = { 160, -96 }, source = { 160, -96 }, target = { 160, 96 } }) - - local tiles = {} - local replacement_tile = get_replacement_tile(surface) - local water_tiles = surface.find_tiles_filtered({ name = { 'water', 'deepwater' } }) - - for _, tile in pairs(water_tiles) do - insert(tiles, { name = replacement_tile, position = { tile.position.x, tile.position.y } }) - end - surface.set_tiles(tiles, true) - - local entities = surface.find_entities_filtered({ type = 'resource', area = { { -160, -96 }, { 160, 96 } } }) - for _, entity in pairs(entities) do - entity.destroy() - end - - local decorative_names = {} - for k, v in pairs(prototypes.decorative) do - if v.autoplace_specification then - decorative_names[#decorative_names + 1] = k - end - end - for x = -4, 4, 1 do - for y = -3, 3, 1 do - surface.regenerate_decorative(decorative_names, { { x, y } }) - end - end - - local ore_positions = { - { x = -128, y = -64 }, - { x = -128, y = -32 }, - { x = -128, y = 32 }, - { x = -128, y = 64 }, - { x = -128, y = 0 } - } - ore_positions = shuffle(ore_positions) - map_functions.draw_smoothed_out_ore_circle(ore_positions[1], 'copper-ore', surface, 15, 2500) - map_functions.draw_smoothed_out_ore_circle(ore_positions[2], 'iron-ore', surface, 15, 2500) - map_functions.draw_smoothed_out_ore_circle(ore_positions[3], 'coal', surface, 15, 1500) - map_functions.draw_smoothed_out_ore_circle(ore_positions[4], 'stone', surface, 15, 1500) - map_functions.draw_noise_tile_circle({ x = -96, y = 0 }, 'water', surface, 16) - map_functions.draw_oil_circle(ore_positions[5], 'crude-oil', surface, 8, 200000) - - local pos = surface.find_non_colliding_position('market', { spawn_position_x, 0 }, 50, 1) - storage.market = place_fish_market(surface, pos) - - local pos = surface.find_non_colliding_position('gun-turret', { spawn_position_x + 5, 1 }, 50, 1) - local turret = surface.create_entity({ name = 'gun-turret', position = pos, force = 'player' }) - turret.insert({ name = 'firearm-magazine', count = 32 }) - - for x = -20, 20, 1 do - for y = -20, 20, 1 do - local pos = { x = storage.market.position.x + x, y = storage.market.position.y + y } - local distance_to_center = math.sqrt(x ^ 2 + y ^ 2) - if distance_to_center > 8 and distance_to_center < 15 then - if math_random(1, 3) == 1 and surface.can_place_entity({ name = 'wooden-chest', position = pos, force = 'player' }) then - local chest = surface.create_entity({ name = 'wooden-chest', position = pos, force = 'player' }) - end - end - end - end - - local area = { { x = -160, y = -96 }, { x = 160, y = 96 } } - for _, tile in pairs(surface.find_tiles_filtered({ name = 'water', area = area })) do - if math_random(1, 32) == 1 then - surface.create_entity({ name = 'fish', position = tile.position }) - end - end - - local pos = surface.find_non_colliding_position('character', { spawn_position_x + 1, 4 }, 50, 1) - game.forces['player'].set_spawn_position(pos, surface) - for _, player in pairs(game.connected_players) do - local pos = surface.find_non_colliding_position('character', { spawn_position_x + 1, 4 }, 50, 1) - player.teleport(pos, surface) - end - - storage.spawn_ores_generated = true - end - end - - local tiles = {} - local hourglass_center_piece_length = 64 - - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - if pos.y >= map_height then - if pos.y > pos.x - hourglass_center_piece_length and pos.x > 0 then - insert(tiles, { name = 'out-of-map', position = pos }) - end - if pos.y > (pos.x + hourglass_center_piece_length) * -1 and pos.x <= 0 then - insert(tiles, { name = 'out-of-map', position = pos }) - end - end - if pos.y < map_height * -1 then - if pos.y < (pos.x - hourglass_center_piece_length) * -1 and pos.x > 0 then - insert(tiles, { name = 'out-of-map', position = pos }) - end - if pos.y < pos.x + hourglass_center_piece_length and pos.x <= 0 then - insert(tiles, { name = 'out-of-map', position = pos }) - end - end - end - end - - surface.set_tiles(tiles, false) - - for _, tile in pairs(surface.find_tiles_filtered({ name = 'water', area = event.area })) do - if math_random(1, 32) == 1 then - surface.create_entity({ name = 'fish', position = tile.position }) - end - end - - if left_top.x < -2048 then - spawn_obstacles(left_top, surface) - end - - if left_top.x < 0 then - return - end - - for _, entity in pairs(surface.find_entities_filtered({ area = area, type = 'cliff' })) do - entity.destroy() - end - - if left_top.x < 160 then - return - end - - for _, entity in pairs(surface.find_entities_filtered({ area = area, type = 'tree' })) do - entity.destroy() - end - - for _, entity in pairs(surface.find_entities_filtered({ area = area, type = 'resource' })) do - surface.create_entity({ name = 'uranium-ore', position = entity.position, amount = math_random(200, 8000) }) - entity.destroy() - end - - local tiles = {} - - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - - local tile = surface.get_tile(pos) - if tile.name ~= 'out-of-map' then - if pos.x > 0 then - if pos.x > 320 then - insert(tiles, { name = 'out-of-map', position = pos }) - else - local a = 0 + (pos.x - 160) * 0.01 - local b = (pos.x - 160) * 0.035 - local r = (pos.x - 160) * 0.015 - if a > 0.75 then - a = 0.75 - end - if b > 1 then - b = 1 - end - if r > 0.6 then - r = 0.6 - end - rendering.draw_sprite( - { - sprite = 'tile/lab-dark-2', - target = { pos.x + 0.5, pos.y + 0.5 }, - surface = surface, - tint = { r = r, g = 0, b = b, a = a }, - render_layer = 'ground' - } - ) - end - - if pos.x > 296 and pos.x < 312 and math_random(1, 128) == 1 then - if surface.can_place_entity({ name = 'biter-spawner', force = 'decoratives', position = pos }) then - local entity - if math_random(1, 4) == 1 then - entity = surface.create_entity({ name = 'spitter-spawner', force = 'decoratives', position = pos }) - else - entity = surface.create_entity({ name = 'biter-spawner', force = 'decoratives', position = pos }) - end - entity.active = false - entity.destructible = false - end - end - end - end - end - end - surface.set_tiles(tiles, true) - - local decorative_names = {} - for k, v in pairs(prototypes.decorative) do - if v.autoplace_specification then - decorative_names[#decorative_names + 1] = k - end - end - surface.regenerate_decorative(decorative_names, { { x = math.floor(event.area.left_top.x / 32), y = math.floor(event.area.left_top.y / 32) } }) -end - -local function on_built_entity(event) - local get_score = Score.get_table().score_table - local entity = event.entity - if not entity.valid then - return - end - if storage.entity_limits[entity.name] then - local surface = entity.surface - - if storage.entity_limits[entity.name].placed < storage.entity_limits[entity.name].limit then - storage.entity_limits[entity.name].placed = storage.entity_limits[entity.name].placed + 1 - surface.create_entity( - { - name = 'flying-text', - position = entity.position, - text = storage.entity_limits[entity.name].placed .. ' / ' .. storage.entity_limits[entity.name].limit .. ' ' .. storage.entity_limits[entity.name].str .. 's', - color = { r = 0.98, g = 0.66, b = 0.22 } - } - ) - update_fd_stats() - else - surface.create_entity( - { - name = 'flying-text', - position = entity.position, - text = storage.entity_limits[entity.name].str .. ' limit reached.', - color = { r = 0.82, g = 0.11, b = 0.11 } - } - ) - local player = game.players[event.player_index] - player.insert({ name = entity.name, count = 1 }) - if get_score then - if get_score[player.force.name] then - if get_score[player.force.name].players[player.name] then - get_score[player.force.name].players[player.name].built_entities = get_score[player.force.name].players[player.name].built_entities - 1 - end - end - end - entity.destroy() - end - end -end - -local function on_robot_built_entity(event) - local entity = event.entity - if storage.entity_limits[entity.name] then - local surface = entity.surface - if storage.entity_limits[entity.name].placed < storage.entity_limits[entity.name].limit then - storage.entity_limits[entity.name].placed = storage.entity_limits[entity.name].placed + 1 - surface.create_entity( - { - name = 'flying-text', - position = entity.position, - text = storage.entity_limits[entity.name].placed .. ' / ' .. storage.entity_limits[entity.name].limit .. ' ' .. storage.entity_limits[entity.name].str .. 's', - color = { r = 0.98, g = 0.66, b = 0.22 } - } - ) - update_fd_stats() - else - surface.create_entity( - { - name = 'flying-text', - position = entity.position, - text = storage.entity_limits[entity.name].str .. ' limit reached.', - color = { r = 0.82, g = 0.11, b = 0.11 } - } - ) - local inventory = event.robot.get_inventory(defines.inventory.robot_cargo) - inventory.insert({ name = entity.name, count = 1 }) - entity.destroy() - end - end -end - -local function on_tick() - local Diff = Difficulty.get() - if game.tick % 30 == 0 then - if storage.market then - for _, player in pairs(game.connected_players) do - if game.surfaces['fish_defender'].peaceful_mode == false then - create_wave_gui(player) - end - end - end - if game.tick % 180 == 0 then - if game.surfaces['fish_defender'] then - game.forces.player.chart(game.surfaces['fish_defender'], { { x = -64, y = -256 }, { x = 288, y = 256 } }) - if Diff.difficulty_vote_index then - storage.wave_interval = difficulties_votes[Diff.difficulty_vote_index].wave_interval - end - end - end - - if storage.market_age then - if not storage.game_restart_timer then - storage.game_restart_timer = 10800 - else - if storage.game_restart_timer < 0 then - return - end - storage.game_restart_timer = storage.game_restart_timer - 30 - end - if storage.game_restart_timer % 1800 == 0 then - if storage.game_restart_timer > 0 then - game.print('Map will restart in ' .. storage.game_restart_timer / 60 .. ' seconds!', { r = 0.22, g = 0.88, b = 0.22 }) - end - if storage.game_restart_timer == 0 then - game.print('Map is restarting!', { r = 0.22, g = 0.88, b = 0.22 }) - --game.write_file("commandPipe", ":loadscenario --force", false, 0) - - local message = 'Map is restarting! ' - Server.to_discord_bold(table.concat { '*** ', message, ' ***' }) - Server.start_scenario('Fish_Defender') - end - end - end - end - - if game.tick % storage.wave_interval == storage.wave_interval - 1 then - if game.surfaces['fish_defender'].peaceful_mode == true then - return - end - biter_attack_wave() - end -end - -local function on_player_changed_position(event) - local player = game.players[event.player_index] - if player.position.x >= 160 then - player.teleport({ player.position.x - 1, player.position.y }, game.surfaces['fish_defender']) - if player.position.y > map_height or player.position.y < map_height * -1 then - player.teleport({ player.position.x, 0 }, game.surfaces['fish_defender']) - end - if player.character then - player.character.health = player.character.health - 25 - player.character.surface.create_entity({ name = 'water-splash', position = player.position }) - if player.character.health <= 0 then - player.character.die('enemy') - end - end - end -end - -local function on_player_mined_entity(event) - if storage.entity_limits[event.entity.name] then - storage.entity_limits[event.entity.name].placed = storage.entity_limits[event.entity.name].placed - 1 - update_fd_stats() - end -end - -local function on_robot_mined_entity(event) - if storage.entity_limits[event.entity.name] then - storage.entity_limits[event.entity.name].placed = storage.entity_limits[event.entity.name].placed - 1 - update_fd_stats() - end -end - -local function on_research_finished(event) - local research = event.research.name - if research ~= 'tank' then - return - end - game.forces['player'].technologies['artillery'].researched = true - game.forces.player.recipes['artillery-wagon'].enabled = false -end - -local function on_player_respawned(event) - if not storage.market_age then - return - end - local player = game.players[event.player_index] - player.character.destructible = false -end - -local function on_init(event) - local Diff = Difficulty.get() - storage.wave_interval = 3600 --interval between waves in ticks - storage.wave_grace_period = 54000 - Diff.difficulty_poll_closing_timeout = 54000 - storage.boss_biters = {} - storage.acid_lines_delay = {} -end - -event.add(defines.events.on_gui_click, on_gui_click) -event.add(defines.events.on_market_item_purchased, on_market_item_purchased) -event.add(defines.events.on_player_respawned, on_player_respawned) -event.add(defines.events.on_built_entity, on_built_entity) -event.add(defines.events.on_chunk_generated, on_chunk_generated) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_player_changed_position, on_player_changed_position) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_player_mined_entity, on_player_mined_entity) -event.add(defines.events.on_research_finished, on_research_finished) -event.add(defines.events.on_robot_built_entity, on_robot_built_entity) -event.add(defines.events.on_robot_mined_entity, on_robot_mined_entity) -event.add(defines.events.on_tick, on_tick) -event.on_init(on_init) diff --git a/maps/fish_defender_v1/flame_boots.lua b/maps/fish_defender_v1/flame_boots.lua deleted file mode 100644 index d24fa1b07..000000000 --- a/maps/fish_defender_v1/flame_boots.lua +++ /dev/null @@ -1,57 +0,0 @@ -local Event = require 'utils.event' - -local function on_player_changed_position(event) - if not storage.flame_boots then - return - end - local player = game.players[event.player_index] - if not player.character then - return - end - if player.character.driving then - return - end - - if not storage.flame_boots[player.index] then - storage.flame_boots[player.index] = {} - end - - if not storage.flame_boots[player.index].fuel then - return - end - - if storage.flame_boots[player.index].fuel < 0 then - player.print('Your flame boots have worn out.', { r = 0.22, g = 0.77, b = 0.44 }) - storage.flame_boots[player.index] = {} - return - end - - if storage.flame_boots[player.index].fuel % 500 == 0 then - player.print('Fuel remaining: ' .. storage.flame_boots[player.index].fuel, { r = 0.22, g = 0.77, b = 0.44 }) - end - - if not storage.flame_boots[player.index].step_history then - storage.flame_boots[player.index].step_history = {} - end - - local elements = #storage.flame_boots[player.index].step_history - - storage.flame_boots[player.index].step_history[elements + 1] = { x = player.position.x, y = player.position.y } - - if elements < 50 then - return - end - - player.surface.create_entity({ name = 'fire-flame', position = storage.flame_boots[player.index].step_history[elements - 2] }) - - storage.flame_boots[player.index].fuel = storage.flame_boots[player.index].fuel - 1 -end - -local function on_init() - if not storage.flame_boots then - storage.flame_boots = {} - end -end - -Event.on_init(on_init) -Event.add(defines.events.on_player_changed_position, on_player_changed_position) diff --git a/maps/fish_defender_v1/laser_pointer.lua b/maps/fish_defender_v1/laser_pointer.lua deleted file mode 100644 index b607fa6b1..000000000 --- a/maps/fish_defender_v1/laser_pointer.lua +++ /dev/null @@ -1,35 +0,0 @@ -local Event = require 'utils.event' -local radius = 32 - -local function on_player_used_capsule(event) - if not storage.laser_pointer_unlocked then - return - end - - local player = game.players[event.player_index] - local position = event.position - local used_item = event.item - if used_item.name ~= 'artillery-targeting-remote' then - return - end - - for _, unit in pairs(player.surface.find_enemy_units(position, radius, 'player')) do - if math.random(1, 2) == 1 then - unit.set_command( - { - type = defines.command.go_to_location, - destination = position, - radius = 2, - distraction = defines.distraction.none, - pathfind_flags = { - allow_destroy_friendly_entities = false, - prefer_straight_paths = false, - low_priority = false - } - } - ) - end - end -end - -Event.add(defines.events.on_player_used_capsule, on_player_used_capsule) diff --git a/maps/fish_defender_v1/map_intro.lua b/maps/fish_defender_v1/map_intro.lua deleted file mode 100644 index 907b438a0..000000000 --- a/maps/fish_defender_v1/map_intro.lua +++ /dev/null @@ -1,112 +0,0 @@ ---luacheck: ignore -local Event = require 'utils.event' - -local main_caption = ' --Fish Defender-- ' -local sub_caption = ' *blb blubby blub* ' -local info = - [[ - The biters have caught the scent of fish in the market. - Fend them off as long as possible! - This however will not be an easy task, - since their strength and resistance increases constantly over time. - - Your ultimate goal is to evacuate all the fish to cat planet! - Put them in your rocket's cargo and launch them into space. - Don't worry, you will still get space science. - - The Market will gladly take any coin you might find. - Additional turret slots can be bought at the market. - Several unique upgrades are available too. - - Researching tanks will unlock the artillery technology early. - - Any container bearing dangerous goods, like ammo, grenades or barrels, - causes heavy explosions when it breaks. - Maybe this can be used to our advantage. -]] - -local function create_map_intro_button(player) - if player.gui.top['map_intro_button'] then - return - end - local b = player.gui.top.add({type = 'sprite-button', caption = '?', name = 'map_intro_button', tooltip = 'Map Info'}) - b.style.font_color = {r = 0.11, g = 0.8, b = 0.44} - b.style.font = 'heading-1' - b.style.minimal_height = 38 - b.style.minimal_width = 38 - b.style.top_padding = 2 - b.style.left_padding = 4 - b.style.right_padding = 4 - b.style.bottom_padding = 2 -end - -local function create_map_intro(player) - if player.gui.left['map_intro_frame'] then - player.gui.left['map_intro_frame'].destroy() - end - local frame = player.gui.left.add {type = 'frame', name = 'map_intro_frame', direction = 'vertical'} - local t = frame.add {type = 'table', column_count = 1} - - local tt = t.add {type = 'table', column_count = 3} - local l = tt.add {type = 'label', caption = main_caption} - l.style.font = 'heading-1' - l.style.font_color = {r = 0.11, g = 0.8, b = 0.44} - - local l = tt.add {type = 'label', caption = sub_caption} - l.style.font = 'heading-2' - l.style.font_color = {r = 0.33, g = 0.66, b = 0.9} - l.style.minimal_width = 320 - - local b = tt.add {type = 'button', caption = 'X', name = 'close_map_intro_frame', align = 'right'} - b.style.font = 'heading-2' - b.style.minimal_height = 30 - b.style.minimal_width = 30 - b.style.top_padding = 2 - b.style.left_padding = 4 - b.style.right_padding = 4 - b.style.bottom_padding = 2 - - local tt = t.add {type = 'table', column_count = 1} - local frame = t.add {type = 'frame'} - local l = frame.add {type = 'label', caption = info} - l.style.single_line = false - l.style.font = 'heading-2' - l.style.font_color = {r = 0.75, g = 0.8, b = 0.8} - l.style.minimal_width = 480 -end - -local function on_gui_click(event) - if not event then - return - end - if not event.element then - return - end - if not event.element.valid then - return - end - local player = game.players[event.element.player_index] - if event.element.name == 'close_map_intro_frame' then - player.gui.left['map_intro_frame'].destroy() - return - end - if event.element.name == 'map_intro_button' then - if player.gui.left['map_intro_frame'] then - player.gui.left['map_intro_frame'].destroy() - else - create_map_intro(player) - end - return - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - create_map_intro_button(player) - if player.online_time == 0 then - create_map_intro(player) - end -end - -Event.add(defines.events.on_player_joined_game, on_player_joined_game) -Event.add(defines.events.on_gui_click, on_gui_click) diff --git a/maps/fish_defender_v1/market.lua b/maps/fish_defender_v1/market.lua deleted file mode 100644 index c54bf7bbe..000000000 --- a/maps/fish_defender_v1/market.lua +++ /dev/null @@ -1,284 +0,0 @@ -require 'maps.fish_defender_v1.flame_boots' -require 'maps.fish_defender_v1.trapped_capsules' -require 'maps.fish_defender_v1.ultra_mines' -require 'maps.fish_defender_v1.crumbly_walls' -require 'maps.fish_defender_v1.vehicle_nanobots' -require 'maps.fish_defender_v1.laser_pointer' - -local Event = require 'utils.event' -local Server = require 'utils.server' - -local slot_upgrade_offers = { - [1] = { 'gun-turret', 'gun turret' }, - [2] = { 'laser-turret', 'laser turret' }, - [3] = { 'artillery-turret', 'artillery turret' }, - [4] = { 'flamethrower-turret', 'flamethrower turret' }, - [5] = { 'land-mine', 'land mine' } -} - -local special_descriptions = { - ['flame-boots'] = 'Flame Boots - Get yourself some hot boots.', - ['explosive-bullets'] = 'Unlock Explosive Bullets - Submachine-Gun and Pistol gains a chance to deal splash damage.', - ['bouncy-shells'] = 'Unlock Bouncy Shells - Shotgun projectiles may bounce to multiple targets.', - ['trapped-capsules'] = 'Unlock Trapped Capsules - Combat robots will send a last deadly projectile to a nearby enemy when killed.', - ['ultra-mines'] = 'Unlock Ultra Mines - Careful with these...', - ['railgun-enhancer'] = 'Unlock Railgun Enhancer - Turns the railgun into a powerful forking gun.', - ['crumbly-walls'] = 'Unlock Crumbly Walls - Fortifications which crumble, may turn into rocks.', - ['vehicle-nanobots'] = 'Unlock Vehicle Nanobots - Vehicles repair rapidly while driving.', - ['laser-pointer'] = 'Unlock Laser Pointer - The biters are on a quest to slay the red (artillery) dot.' -} - -local function place_fish_market(surface, position) - local market = surface.create_entity({ name = 'market', position = position, force = 'player' }) - market.minable = false - return market -end - -local function refresh_market_offers() - if not storage.market then - return - end - for i = 1, 100, 1 do - local a = storage.market.remove_market_item(1) - if a == false then - break - end - end - - local str1 = 'Gun Turret Slot for ' .. tostring(storage.entity_limits['gun-turret'].limit * storage.entity_limits['gun-turret'].slot_price) - str1 = str1 .. ' Coins.' - - local str2 = 'Laser Turret Slot for ' .. tostring(storage.entity_limits['laser-turret'].limit * storage.entity_limits['laser-turret'].slot_price) - str2 = str2 .. ' Coins.' - - local str3 = 'Artillery Slot for ' .. tostring(storage.entity_limits['artillery-turret'].limit * storage.entity_limits['artillery-turret'].slot_price) - str3 = str3 .. ' Coins.' - - local current_limit = 1 - if storage.entity_limits['flamethrower-turret'].limit ~= 0 then - current_limit = current_limit + storage.entity_limits['flamethrower-turret'].limit - end - local str4 = 'Flamethrower Turret Slot for ' .. tostring(current_limit * storage.entity_limits['flamethrower-turret'].slot_price) - str4 = str4 .. ' Coins.' - - local str5 = 'Landmine Slot for ' .. tostring(math.ceil((storage.entity_limits['land-mine'].limit / 3) * storage.entity_limits['land-mine'].slot_price)) - str5 = str5 .. ' Coins.' - - local market_items = { - { price = {}, offer = { type = 'nothing', effect_description = str1 } }, - { price = {}, offer = { type = 'nothing', effect_description = str2 } }, - { price = {}, offer = { type = 'nothing', effect_description = str3 } }, - { price = {}, offer = { type = 'nothing', effect_description = str4 } }, - { price = {}, offer = { type = 'nothing', effect_description = str5 } }, - { price = { { 'coin', 5 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }, - { price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'wood', count = 8 } }, - { price = { { 'coin', 8 } }, offer = { type = 'give-item', item = 'grenade', count = 1 } }, - { price = { { 'coin', 32 } }, offer = { type = 'give-item', item = 'cluster-grenade', count = 1 } }, - { price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'land-mine', count = 1 } }, - { price = { { 'coin', 80 } }, offer = { type = 'give-item', item = 'car', count = 1 } }, - { price = { { 'coin', 1200 } }, offer = { type = 'give-item', item = 'tank', count = 1 } }, - { price = { { 'coin', 3 } }, offer = { type = 'give-item', item = 'cannon-shell', count = 1 } }, - { price = { { 'coin', 7 } }, offer = { type = 'give-item', item = 'explosive-cannon-shell', count = 1 } }, - { price = { { 'coin', 50 } }, offer = { type = 'give-item', item = 'gun-turret', count = 1 } }, - { price = { { 'coin', 300 } }, offer = { type = 'give-item', item = 'laser-turret', count = 1 } }, - { price = { { 'coin', 450 } }, offer = { type = 'give-item', item = 'artillery-turret', count = 1 } }, - { price = { { 'coin', 10 } }, offer = { type = 'give-item', item = 'artillery-shell', count = 1 } }, - { price = { { 'coin', 25 } }, offer = { type = 'give-item', item = 'artillery-targeting-remote', count = 1 } }, - { price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'firearm-magazine', count = 1 } }, - { price = { { 'coin', 4 } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine', count = 1 } }, - { price = { { 'coin', 2 } }, offer = { type = 'give-item', item = 'shotgun-shell', count = 1 } }, - { price = { { 'coin', 6 } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell', count = 1 } }, - { price = { { 'coin', 30 } }, offer = { type = 'give-item', item = 'submachine-gun', count = 1 } }, - { price = { { 'coin', 250 } }, offer = { type = 'give-item', item = 'combat-shotgun', count = 1 } }, - { price = { { 'coin', 450 } }, offer = { type = 'give-item', item = 'flamethrower', count = 1 } }, - { price = { { 'coin', 25 } }, offer = { type = 'give-item', item = 'flamethrower-ammo', count = 1 } }, - { price = { { 'coin', 125 } }, offer = { type = 'give-item', item = 'rocket-launcher', count = 1 } }, - { price = { { 'coin', 2 } }, offer = { type = 'give-item', item = 'rocket', count = 1 } }, - { price = { { 'coin', 7 } }, offer = { type = 'give-item', item = 'explosive-rocket', count = 1 } }, - { price = { { 'coin', 7500 } }, offer = { type = 'give-item', item = 'atomic-bomb', count = 1 } }, - { price = { { 'coin', 40 } }, offer = { type = 'give-item', item = 'poison-capsule', count = 1 } }, - { price = { { 'coin', 4 } }, offer = { type = 'give-item', item = 'defender-capsule', count = 1 } }, - { price = { { 'coin', 10 } }, offer = { type = 'give-item', item = 'light-armor', count = 1 } }, - { price = { { 'coin', 125 } }, offer = { type = 'give-item', item = 'heavy-armor', count = 1 } }, - { price = { { 'coin', 350 } }, offer = { type = 'give-item', item = 'modular-armor', count = 1 } }, - { price = { { 'coin', 1500 } }, offer = { type = 'give-item', item = 'power-armor', count = 1 } }, - { price = { { 'coin', 12000 } }, offer = { type = 'give-item', item = 'power-armor-mk2', count = 1 } }, - { price = { { 'coin', 50 } }, offer = { type = 'give-item', item = 'solar-panel-equipment', count = 1 } }, - { price = { { 'coin', 2250 } }, offer = { type = 'give-item', item = 'fusion-reactor-equipment', count = 1 } }, - { price = { { 'coin', 100 } }, offer = { type = 'give-item', item = 'battery-equipment', count = 1 } }, - { price = { { 'coin', 200 } }, offer = { type = 'give-item', item = 'energy-shield-equipment', count = 1 } }, - { price = { { 'coin', 850 } }, offer = { type = 'give-item', item = 'personal-laser-defense-equipment', count = 1 } }, - { price = { { 'coin', 175 } }, offer = { type = 'give-item', item = 'exoskeleton-equipment', count = 1 } }, - { price = { { 'coin', 125 } }, offer = { type = 'give-item', item = 'night-vision-equipment', count = 1 } }, - { price = { { 'coin', 200 } }, offer = { type = 'give-item', item = 'belt-immunity-equipment', count = 1 } }, - { price = { { 'coin', 250 } }, offer = { type = 'give-item', item = 'personal-roboport-equipment', count = 1 } }, - { price = { { 'coin', 35 } }, offer = { type = 'give-item', item = 'construction-robot', count = 1 } }, - { price = { { 'coin', 25 } }, offer = { type = 'give-item', item = 'cliff-explosives', count = 1 } }, - { price = { { 'coin', 80 } }, offer = { type = 'nothing', effect_description = special_descriptions['flame-boots'] } } - } - - for _, item in pairs(market_items) do - storage.market.add_market_item(item) - end - - if not storage.railgun_enhancer_unlocked then - storage.market.add_market_item({ price = { { 'coin', 1500 } }, offer = { type = 'nothing', effect_description = special_descriptions['railgun-enhancer'] } }) - end - if not storage.trapped_capsules_unlocked then - storage.market.add_market_item({ price = { { 'coin', 3500 } }, offer = { type = 'nothing', effect_description = special_descriptions['trapped-capsules'] } }) - end - if not storage.explosive_bullets_unlocked then - storage.market.add_market_item({ price = { { 'coin', 4500 } }, offer = { type = 'nothing', effect_description = special_descriptions['explosive-bullets'] } }) - end - if not storage.bouncy_shells_unlocked then - storage.market.add_market_item({ price = { { 'coin', 10000 } }, offer = { type = 'nothing', effect_description = special_descriptions['bouncy-shells'] } }) - end - if not storage.vehicle_nanobots_unlocked then - storage.market.add_market_item({ price = { { 'coin', 15000 } }, offer = { type = 'nothing', effect_description = special_descriptions['vehicle-nanobots'] } }) - end - if not storage.crumbly_walls_unlocked then - storage.market.add_market_item({ price = { { 'coin', 35000 } }, offer = { type = 'nothing', effect_description = special_descriptions['crumbly-walls'] } }) - end - if not storage.ultra_mines_unlocked then - storage.market.add_market_item({ price = { { 'coin', 45000 } }, offer = { type = 'nothing', effect_description = special_descriptions['ultra-mines'] } }) - end - if not storage.laser_pointer_unlocked then - storage.market.add_market_item({ price = { { 'coin', 65000 } }, offer = { type = 'nothing', effect_description = special_descriptions['laser-pointer'] } }) - end -end - -local function slot_upgrade(player, offer_index) - local price = storage.entity_limits[slot_upgrade_offers[offer_index][1]].limit * storage.entity_limits[slot_upgrade_offers[offer_index][1]].slot_price - - local gain = 1 - if offer_index == 5 then - price = math.ceil((storage.entity_limits[slot_upgrade_offers[offer_index][1]].limit / 3) * storage.entity_limits[slot_upgrade_offers[offer_index][1]].slot_price) - gain = 3 - end - - if slot_upgrade_offers[offer_index][1] == 'flamethrower-turret' then - price = (storage.entity_limits[slot_upgrade_offers[offer_index][1]].limit + 1) * storage.entity_limits[slot_upgrade_offers[offer_index][1]].slot_price - end - - local coins_removed = player.remove_item({ name = 'coin', count = price }) - if coins_removed ~= price then - if coins_removed > 0 then - player.insert({ name = 'coin', count = coins_removed }) - end - player.print('Not enough coins.', { r = 0.22, g = 0.77, b = 0.44 }) - return false - end - - storage.entity_limits[slot_upgrade_offers[offer_index][1]].limit = storage.entity_limits[slot_upgrade_offers[offer_index][1]].limit + gain - game.print(player.name .. ' has bought a ' .. slot_upgrade_offers[offer_index][2] .. ' slot for ' .. price .. ' coins!', { r = 0.22, g = 0.77, b = 0.44 }) - Server.to_discord_bold(table.concat { player.name .. ' has bought a ' .. slot_upgrade_offers[offer_index][2] .. ' slot for ' .. price .. ' coins!' }) - refresh_market_offers() -end - -local function on_market_item_purchased(event) - local player = game.players[event.player_index] - local market = event.market - local offer_index = event.offer_index - local offers = market.get_market_items() - local bought_offer = offers[offer_index].offer - if bought_offer.type ~= 'nothing' then - return - end - - if slot_upgrade_offers[offer_index] then - if slot_upgrade(player, offer_index) then - return - end - end - - if offer_index < 50 then - return - end - - if bought_offer.effect_description == special_descriptions['flame-boots'] then - game.print(player.name .. ' has bought themselves some flame boots.', { r = 0.22, g = 0.77, b = 0.44 }) - if not storage.flame_boots[player.index].fuel then - storage.flame_boots[player.index].fuel = math.random(1500, 3000) - else - storage.flame_boots[player.index].fuel = storage.flame_boots[player.index].fuel + math.random(1500, 3000) - end - - player.print('Fuel remaining: ' .. storage.flame_boots[player.index].fuel, { r = 0.22, g = 0.77, b = 0.44 }) - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['explosive-bullets'] then - game.print(player.name .. ' has unlocked explosive bullets.', { r = 0.22, g = 0.77, b = 0.44 }) - storage.explosive_bullets_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['bouncy-shells'] then - game.print(player.name .. ' has unlocked bouncy shells.', { r = 0.22, g = 0.77, b = 0.44 }) - storage.bouncy_shells_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['trapped-capsules'] then - game.print(player.name .. ' has unlocked trapped capsules!', { r = 0.22, g = 0.77, b = 0.44 }) - storage.trapped_capsules_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['ultra-mines'] then - game.print(player.name .. ' has unlocked ultra mines!', { r = 0.22, g = 0.77, b = 0.44 }) - storage.ultra_mines_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['laser-pointer'] then - game.print(player.name .. ' has unleashed the quest to slay the red dot!', { r = 0.22, g = 0.77, b = 0.44 }) - storage.laser_pointer_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['railgun-enhancer'] then - game.print(player.name .. ' has unlocked the enhanced railgun!', { r = 0.22, g = 0.77, b = 0.44 }) - storage.railgun_enhancer_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['crumbly-walls'] then - game.print(player.name .. ' has unlocked crumbly walls!', { r = 0.22, g = 0.77, b = 0.44 }) - storage.crumbly_walls_unlocked = true - refresh_market_offers() - return - end - - if bought_offer.effect_description == special_descriptions['vehicle-nanobots'] then - game.print(player.name .. ' has unlocked vehicle nanobots!', { r = 0.22, g = 0.77, b = 0.44 }) - storage.vehicle_nanobots_unlocked = true - refresh_market_offers() - return - end -end - -local function on_gui_opened(event) - if not event.entity then - return - end - if not event.entity.valid then - return - end - if event.entity.name == 'market' then - refresh_market_offers() - return - end -end - -Event.add(defines.events.on_market_item_purchased, on_market_item_purchased) -Event.add(defines.events.on_gui_opened, on_gui_opened) - -return place_fish_market diff --git a/maps/fish_defender_v1/on_entity_damaged.lua b/maps/fish_defender_v1/on_entity_damaged.lua deleted file mode 100644 index d65138dcc..000000000 --- a/maps/fish_defender_v1/on_entity_damaged.lua +++ /dev/null @@ -1,62 +0,0 @@ -local Event = require 'utils.event' - -local enhance_railgun = require 'maps.fish_defender_v1.railgun_enhancer' -local explosive_bullets = require 'maps.fish_defender_v1.explosive_gun_bullets' -local bouncy_shells = require 'maps.fish_defender_v1.bouncy_shells' -local boss_biter = require 'maps.fish_defender_v1.boss_biters' - -local function protect_market(event) - if event.entity.name ~= 'market' then - return false - end - if event.cause then - if event.cause.force.name == 'enemy' then - return false - end - end - event.entity.health = event.entity.health + event.final_damage_amount - return true -end - -local function on_entity_damaged(event) - if not event.entity then - return - end - if not event.entity.valid then - return - end - - if protect_market(event) then - return - end - - if not event.cause then - return - end - - if event.cause.unit_number then - if storage.boss_biters[event.cause.unit_number] then - boss_biter.damaged_entity(event) - end - end - - if event.cause.name ~= 'character' then - return - end - - if enhance_railgun(event) then - return - end - if storage.explosive_bullets_unlocked then - if explosive_bullets(event) then - return - end - end - if storage.bouncy_shells_unlocked then - if bouncy_shells(event) then - return - end - end -end - -Event.add(defines.events.on_entity_damaged, on_entity_damaged) diff --git a/maps/fish_defender_v1/railgun_enhancer.lua b/maps/fish_defender_v1/railgun_enhancer.lua deleted file mode 100644 index 1df3f30df..000000000 --- a/maps/fish_defender_v1/railgun_enhancer.lua +++ /dev/null @@ -1,116 +0,0 @@ --- improves the damage of the railgun and adds visual effects -- by mewmew --- laser turret research will increase it´s damage even further -- - -local damage_min = 400 -local damage_max = 800 -local math_random = math.random -local additional_visual_effects = true - -local biological_target_types = { - ['unit'] = true, - ['player'] = true, - ['turret'] = true, - ['unit-spawner'] = true -} - -local function create_visuals(source_entity, target_entity) - if not source_entity.valid then - return - end - if not target_entity.valid then - return - end - if not additional_visual_effects then - return - end - local surface = target_entity.surface - surface.create_entity({ name = 'water-splash', position = target_entity.position }) - if biological_target_types[target_entity.type] then - surface.create_entity({ name = 'blood-explosion-big', position = target_entity.position }) - for x = -8, 8, 1 do - for y = -8, 8, 1 do - if math_random(1, 16) == 1 then - surface.create_entity({ name = 'blood-fountain', position = { target_entity.position.x + (x * 0.1), target_entity.position.y + (y * 0.1) } }) - surface.create_entity({ name = 'blood-fountain-big', position = { target_entity.position.x + (x * 0.1), target_entity.position.y + (y * 0.1) } }) - end - end - end - else - if math_random(1, 3) ~= 1 then - surface.create_entity({ name = 'fire-flame', position = target_entity.position }) - end - for x = -3, 3, 1 do - for y = -3, 3, 1 do - if math_random(1, 3) == 1 then - surface.create_trivial_smoke({ name = 'smoke-fast', position = { target_entity.position.x + (x * 0.35), target_entity.position.y + (y * 0.35) } }) - end - if math_random(1, 5) == 1 then - surface.create_trivial_smoke({ name = 'train-smoke', position = { target_entity.position.x + (x * 0.35), target_entity.position.y + (y * 0.35) } }) - end - end - end - end -end - -local function do_splash_damage_around_entity(source_entity, player) - if not source_entity.valid then - return - end - local research_damage_bonus = player.force.get_ammo_damage_modifier('laser-turret') + 1 - local research_splash_radius_bonus = player.force.get_ammo_damage_modifier('laser-turret') * 0.5 - local splash_area = { - { source_entity.position.x - (2.5 + research_splash_radius_bonus), source_entity.position.y - (2.5 + research_splash_radius_bonus) }, - { source_entity.position.x + (2.5 + research_splash_radius_bonus), source_entity.position.y + (2.5 + research_splash_radius_bonus) } - } - local entities = source_entity.surface.find_entities_filtered({ area = splash_area }) - for _, entity in pairs(entities) do - if entity.valid then - if entity.health and entity ~= source_entity and entity ~= player then - if additional_visual_effects then - local surface = entity.surface - surface.create_entity({ name = 'railgun-beam', position = source_entity.position, source = source_entity.position, target = entity.position }) - surface.create_entity({ name = 'water-splash', position = entity.position }) - if biological_target_types[entity.type] then - surface.create_entity({ name = 'blood-fountain', position = entity.position }) - end - end - local damage = math_random(math.ceil((damage_min * research_damage_bonus) / 16), math.ceil((damage_max * research_damage_bonus) / 16)) - entity.damage(damage, player.force, 'physical') - end - end - end -end - -local function enhance(event) - if not storage.railgun_enhancer_unlocked then - return - end - if event.damage_type.name ~= 'physical' then - return - end - if event.original_damage_amount ~= 100 then - return - end - - local player = event.cause - if player.shooting_state.state == defines.shooting.not_shooting then - return - end - local selected_weapon = player.get_inventory(defines.inventory.character_guns)[player.selected_gun_index] - if selected_weapon.name ~= 'railgun' then - return - end - - create_visuals(event.cause, event.entity) - - do_splash_damage_around_entity(event.entity, player) - - event.entity.health = event.entity.health + event.final_damage_amount - - local research_damage_bonus = player.force.get_ammo_damage_modifier('laser-turret') + 1 - local damage = math_random(math.ceil(damage_min * research_damage_bonus), math.ceil(damage_max * research_damage_bonus)) - event.entity.damage(damage, player.force, 'physical') - return true -end - -return enhance diff --git a/maps/fish_defender_v1/shotgun_buff.lua b/maps/fish_defender_v1/shotgun_buff.lua deleted file mode 100644 index c2f975462..000000000 --- a/maps/fish_defender_v1/shotgun_buff.lua +++ /dev/null @@ -1,28 +0,0 @@ -local Event = require 'utils.event' -local gain_multiplier = 4 - -local function on_research_finished(event) - local research = event.research - local force_name = research.force.name - - if not storage.shotgun_shell_damage_modifier_old[force_name] then - storage.shotgun_shell_damage_modifier_old[force_name] = game.forces[force_name].get_ammo_damage_modifier('shotgun-shell') - 0.1 - end - - if string.sub(research.name, 0, 26) == 'physical-projectile-damage' then - local current_damage = game.forces[force_name].get_ammo_damage_modifier('shotgun-shell') - local vanilla_gain = current_damage - storage.shotgun_shell_damage_modifier_old[force_name] - local additional_gain = vanilla_gain * (gain_multiplier - 1) - game.forces[force_name].set_ammo_damage_modifier('shotgun-shell', current_damage + additional_gain) - end - - storage.shotgun_shell_damage_modifier_old[force_name] = game.forces[force_name].get_ammo_damage_modifier('shotgun-shell') -end - -local function on_init() - game.forces.player.set_ammo_damage_modifier('shotgun-shell', 1) - storage.shotgun_shell_damage_modifier_old = {} -end - -Event.on_init(on_init) -Event.add(defines.events.on_research_finished, on_research_finished) diff --git a/maps/fish_defender_v1/trapped_capsules.lua b/maps/fish_defender_v1/trapped_capsules.lua deleted file mode 100644 index def9eb161..000000000 --- a/maps/fish_defender_v1/trapped_capsules.lua +++ /dev/null @@ -1,54 +0,0 @@ -local Event = require 'utils.event' - -local radius = 20 - -local whitelist = { - ['defender'] = 'explosive-cannon-projectile', - ['distractor'] = 'explosive-uranium-cannon-projectile', - ['destroyer'] = 'explosive-uranium-cannon-projectile' -} - -local function on_entity_died(event) - if not storage.trapped_capsules_unlocked then - return - end - - if not event.entity.valid then - return - end - if not whitelist[event.entity.name] then - return - end - - local valid_targets = {} - local position = event.entity.position - - for _, e in pairs( - event.entity.surface.find_entities_filtered({ area = { { position.x - radius, position.y - radius }, { position.x + radius, position.y + radius } }, force = 'enemy' }) - ) do - if e.health then - local distance_from_center = math.sqrt((e.position.x - position.x) ^ 2 + (e.position.y - position.y) ^ 2) - if distance_from_center <= radius then - valid_targets[#valid_targets + 1] = e - end - end - end - - if not valid_targets[1] then - return - end - - event.entity.surface.create_entity( - { - name = whitelist[event.entity.name], - position = position, - force = 'player', - source = position, - target = valid_targets[math.random(1, #valid_targets)].position, - max_range = 20, - speed = 0.1 - } - ) -end - -Event.add(defines.events.on_entity_died, on_entity_died) diff --git a/maps/fish_defender_v1/ultra_mines.lua b/maps/fish_defender_v1/ultra_mines.lua deleted file mode 100644 index de3ad2750..000000000 --- a/maps/fish_defender_v1/ultra_mines.lua +++ /dev/null @@ -1,42 +0,0 @@ -local Event = require 'utils.event' -local radius = 8 - -local function damage_entities_around_target(entity, damage) - for _, e in pairs( - entity.surface.find_entities_filtered({ area = { { entity.position.x - radius, entity.position.y - radius }, { entity.position.x + radius, entity.position.y + radius } } }) - ) do - if e.health then - if e.force.name ~= 'player' then - local distance_from_center = math.sqrt((e.position.x - entity.position.x) ^ 2 + (e.position.y - entity.position.y) ^ 2) - if distance_from_center <= radius then - e.damage(damage, 'player', 'explosion') - end - end - end - end -end - -local function on_entity_died(event) - if not storage.ultra_mines_unlocked then - return - end - if not event.entity.valid then - return - end - if event.entity.name ~= 'land-mine' then - return - end - - event.entity.surface.create_entity( - { - name = 'big-artillery-explosion', - position = event.entity.position - } - ) - - local damage = (1 + event.entity.force.get_ammo_damage_modifier('grenade')) * 250 - - damage_entities_around_target(event.entity, damage) -end - -Event.add(defines.events.on_entity_died, on_entity_died) diff --git a/maps/fish_defender_v1/vehicle_nanobots.lua b/maps/fish_defender_v1/vehicle_nanobots.lua deleted file mode 100644 index 14650ed47..000000000 --- a/maps/fish_defender_v1/vehicle_nanobots.lua +++ /dev/null @@ -1,26 +0,0 @@ -local Event = require 'utils.event' - -local function on_player_changed_position(event) - if not storage.vehicle_nanobots_unlocked then - return - end - local player = game.players[event.player_index] - if not player.character then - return - end - if not player.character.driving then - return - end - if not player.vehicle then - return - end - if not player.vehicle.valid then - return - end - if player.vehicle.health == player.vehicle.max_health then - return - end - player.vehicle.health = player.vehicle.health + player.vehicle.max_health * 0.005 -end - -Event.add(defines.events.on_player_changed_position, on_player_changed_position) diff --git a/maps/fish_defender_v2/main.lua b/maps/fish_defender_v2/main.lua index 6c6e470e8..bc52c7b0a 100644 --- a/maps/fish_defender_v2/main.lua +++ b/maps/fish_defender_v2/main.lua @@ -2,6 +2,10 @@ --require "modules.rpg" +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + local Public = require 'maps.fish_defender_v2.core' local Gui = require 'utils.gui' local LFTW = require 'modules.launch_fish_to_win' diff --git a/maps/fish_defender_v2/market.lua b/maps/fish_defender_v2/market.lua index 446a23cce..550c90665 100644 --- a/maps/fish_defender_v2/market.lua +++ b/maps/fish_defender_v2/market.lua @@ -1,7 +1,8 @@ local Event = require 'utils.event' local Public = require 'maps.fish_defender_v2.table' -local slot_upgrade_offers = { +local slot_upgrade_offers = +{ [1] = { 'ammo-turret', 'gun turret' }, [2] = { 'electric-turret', 'laser turret' }, [3] = { 'artillery-turret', 'artillery turret' }, @@ -9,7 +10,8 @@ local slot_upgrade_offers = { [5] = { 'land-mine', 'land mine' } } -local special_descriptions = { +local special_descriptions = +{ ['explosive-bullets'] = 'Unlock Explosive Bullets - Submachine-Gun and Pistol gains a chance to deal splash damage.', ['bouncy-shells'] = 'Unlock Bouncy Shells - Shotgun projectiles may bounce to multiple targets.', ['trapped-capsules'] = 'Unlock Trapped Capsules - Combat robots will send a last deadly projectile to a nearby enemy when killed.', @@ -52,58 +54,59 @@ local function refresh_market_offers() local str5 = 'Landmine Slot for ' .. tostring(math.ceil((entity_limits['land-mine'].limit / 3) * entity_limits['land-mine'].slot_price)) str5 = str5 .. ' Coins.' - local market_items = { - { price = {}, offer = { type = 'nothing', effect_description = str1 } }, - { price = {}, offer = { type = 'nothing', effect_description = str2 } }, - { price = {}, offer = { type = 'nothing', effect_description = str3 } }, - { price = {}, offer = { type = 'nothing', effect_description = str4 } }, - { price = {}, offer = { type = 'nothing', effect_description = str5 } }, - { price = { { name = 'coin', count = 5 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }, - { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'wood', count = 8 } }, - { price = { { name = 'coin', count = 8 } }, offer = { type = 'give-item', item = 'grenade', count = 1 } }, - { price = { { name = 'coin', count = 32 } }, offer = { type = 'give-item', item = 'cluster-grenade', count = 1 } }, - { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'land-mine', count = 1 } }, - { price = { { name = 'coin', count = 80 } }, offer = { type = 'give-item', item = 'car', count = 1 } }, - { price = { { name = 'coin', count = 1200 } }, offer = { type = 'give-item', item = 'tank', count = 1 } }, - { price = { { name = 'coin', count = 3 } }, offer = { type = 'give-item', item = 'cannon-shell', count = 1 } }, - { price = { { name = 'coin', count = 7 } }, offer = { type = 'give-item', item = 'explosive-cannon-shell', count = 1 } }, - { price = { { name = 'coin', count = 50 } }, offer = { type = 'give-item', item = 'gun-turret', count = 1 } }, - { price = { { name = 'coin', count = 300 } }, offer = { type = 'give-item', item = 'laser-turret', count = 1 } }, - { price = { { name = 'coin', count = 450 } }, offer = { type = 'give-item', item = 'artillery-turret', count = 1 } }, - { price = { { name = 'coin', count = 10 } }, offer = { type = 'give-item', item = 'artillery-shell', count = 1 } }, - { price = { { name = 'coin', count = 25 } }, offer = { type = 'give-item', item = 'artillery-targeting-remote', count = 1 } }, - { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'firearm-magazine', count = 1 } }, - { price = { { name = 'coin', count = 4 } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine', count = 1 } }, - { price = { { name = 'coin', count = 2 } }, offer = { type = 'give-item', item = 'shotgun-shell', count = 1 } }, - { price = { { name = 'coin', count = 6 } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell', count = 1 } }, - { price = { { name = 'coin', count = 30 } }, offer = { type = 'give-item', item = 'submachine-gun', count = 1 } }, - { price = { { name = 'coin', count = 250 } }, offer = { type = 'give-item', item = 'combat-shotgun', count = 1 } }, - { price = { { name = 'coin', count = 450 } }, offer = { type = 'give-item', item = 'flamethrower', count = 1 } }, - { price = { { name = 'coin', count = 25 } }, offer = { type = 'give-item', item = 'flamethrower-ammo', count = 1 } }, - { price = { { name = 'coin', count = 125 } }, offer = { type = 'give-item', item = 'rocket-launcher', count = 1 } }, - { price = { { name = 'coin', count = 2 } }, offer = { type = 'give-item', item = 'rocket', count = 1 } }, - { price = { { name = 'coin', count = 7 } }, offer = { type = 'give-item', item = 'explosive-rocket', count = 1 } }, - { price = { { name = 'coin', count = 7500 } }, offer = { type = 'give-item', item = 'atomic-bomb', count = 1 } }, - { price = { { name = 'coin', count = 40 } }, offer = { type = 'give-item', item = 'poison-capsule', count = 1 } }, - { price = { { name = 'coin', count = 4 } }, offer = { type = 'give-item', item = 'defender-capsule', count = 1 } }, - { price = { { name = 'coin', count = 10 } }, offer = { type = 'give-item', item = 'light-armor', count = 1 } }, - { price = { { name = 'coin', count = 125 } }, offer = { type = 'give-item', item = 'heavy-armor', count = 1 } }, - { price = { { name = 'coin', count = 350 } }, offer = { type = 'give-item', item = 'modular-armor', count = 1 } }, - { price = { { name = 'coin', count = 1500 } }, offer = { type = 'give-item', item = 'power-armor', count = 1 } }, + local market_items = + { + { price = {}, offer = { type = 'nothing', effect_description = str1 } }, + { price = {}, offer = { type = 'nothing', effect_description = str2 } }, + { price = {}, offer = { type = 'nothing', effect_description = str3 } }, + { price = {}, offer = { type = 'nothing', effect_description = str4 } }, + { price = {}, offer = { type = 'nothing', effect_description = str5 } }, + { price = { { name = 'coin', count = 5 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }, + { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'wood', count = 8 } }, + { price = { { name = 'coin', count = 8 } }, offer = { type = 'give-item', item = 'grenade', count = 1 } }, + { price = { { name = 'coin', count = 32 } }, offer = { type = 'give-item', item = 'cluster-grenade', count = 1 } }, + { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'land-mine', count = 1 } }, + { price = { { name = 'coin', count = 80 } }, offer = { type = 'give-item', item = 'car', count = 1 } }, + { price = { { name = 'coin', count = 1200 } }, offer = { type = 'give-item', item = 'tank', count = 1 } }, + { price = { { name = 'coin', count = 3 } }, offer = { type = 'give-item', item = 'cannon-shell', count = 1 } }, + { price = { { name = 'coin', count = 7 } }, offer = { type = 'give-item', item = 'explosive-cannon-shell', count = 1 } }, + { price = { { name = 'coin', count = 50 } }, offer = { type = 'give-item', item = 'gun-turret', count = 1 } }, + { price = { { name = 'coin', count = 300 } }, offer = { type = 'give-item', item = 'laser-turret', count = 1 } }, + { price = { { name = 'coin', count = 450 } }, offer = { type = 'give-item', item = 'artillery-turret', count = 1 } }, + { price = { { name = 'coin', count = 10 } }, offer = { type = 'give-item', item = 'artillery-shell', count = 1 } }, + { price = { { name = 'coin', count = 25 } }, offer = { type = 'give-item', item = 'artillery-targeting-remote', count = 1 } }, + { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'firearm-magazine', count = 1 } }, + { price = { { name = 'coin', count = 4 } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine', count = 1 } }, + { price = { { name = 'coin', count = 2 } }, offer = { type = 'give-item', item = 'shotgun-shell', count = 1 } }, + { price = { { name = 'coin', count = 6 } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell', count = 1 } }, + { price = { { name = 'coin', count = 30 } }, offer = { type = 'give-item', item = 'submachine-gun', count = 1 } }, + { price = { { name = 'coin', count = 250 } }, offer = { type = 'give-item', item = 'combat-shotgun', count = 1 } }, + { price = { { name = 'coin', count = 450 } }, offer = { type = 'give-item', item = 'flamethrower', count = 1 } }, + { price = { { name = 'coin', count = 25 } }, offer = { type = 'give-item', item = 'flamethrower-ammo', count = 1 } }, + { price = { { name = 'coin', count = 125 } }, offer = { type = 'give-item', item = 'rocket-launcher', count = 1 } }, + { price = { { name = 'coin', count = 2 } }, offer = { type = 'give-item', item = 'rocket', count = 1 } }, + { price = { { name = 'coin', count = 7 } }, offer = { type = 'give-item', item = 'explosive-rocket', count = 1 } }, + { price = { { name = 'coin', count = 7500 } }, offer = { type = 'give-item', item = 'atomic-bomb', count = 1 } }, + { price = { { name = 'coin', count = 40 } }, offer = { type = 'give-item', item = 'poison-capsule', count = 1 } }, + { price = { { name = 'coin', count = 4 } }, offer = { type = 'give-item', item = 'defender-capsule', count = 1 } }, + { price = { { name = 'coin', count = 10 } }, offer = { type = 'give-item', item = 'light-armor', count = 1 } }, + { price = { { name = 'coin', count = 125 } }, offer = { type = 'give-item', item = 'heavy-armor', count = 1 } }, + { price = { { name = 'coin', count = 350 } }, offer = { type = 'give-item', item = 'modular-armor', count = 1 } }, + { price = { { name = 'coin', count = 1500 } }, offer = { type = 'give-item', item = 'power-armor', count = 1 } }, { price = { { name = 'coin', count = 12000 } }, offer = { type = 'give-item', item = 'power-armor-mk2', count = 1 } }, - { price = { { name = 'coin', count = 50 } }, offer = { type = 'give-item', item = 'solar-panel-equipment', count = 1 } }, - { price = { { name = 'coin', count = 2250 } }, offer = { type = 'give-item', item = 'fission-reactor-equipment', count = 1 } }, - { price = { { name = 'coin', count = 100 } }, offer = { type = 'give-item', item = 'battery-equipment', count = 1 } }, - { price = { { name = 'coin', count = 200 } }, offer = { type = 'give-item', item = 'energy-shield-equipment', count = 1 } }, - { price = { { name = 'coin', count = 850 } }, offer = { type = 'give-item', item = 'personal-laser-defense-equipment', count = 1 } }, - { price = { { name = 'coin', count = 175 } }, offer = { type = 'give-item', item = 'exoskeleton-equipment', count = 1 } }, - { price = { { name = 'coin', count = 125 } }, offer = { type = 'give-item', item = 'night-vision-equipment', count = 1 } }, - { price = { { name = 'coin', count = 200 } }, offer = { type = 'give-item', item = 'belt-immunity-equipment', count = 1 } }, - { price = { { name = 'coin', count = 250 } }, offer = { type = 'give-item', item = 'personal-roboport-equipment', count = 1 } }, - { price = { { name = 'coin', count = 350 } }, offer = { type = 'give-item', item = 'roboport', count = 1 } }, - { price = { { name = 'coin', count = 50 } }, offer = { type = 'give-item', item = 'storage-chest', count = 1 } }, - { price = { { name = 'coin', count = 35 } }, offer = { type = 'give-item', item = 'construction-robot', count = 1 } }, - { price = { { name = 'coin', count = 25 } }, offer = { type = 'give-item', item = 'cliff-explosives', count = 1 } } + { price = { { name = 'coin', count = 50 } }, offer = { type = 'give-item', item = 'solar-panel-equipment', count = 1 } }, + { price = { { name = 'coin', count = 2250 } }, offer = { type = 'give-item', item = 'fission-reactor-equipment', count = 1 } }, + { price = { { name = 'coin', count = 100 } }, offer = { type = 'give-item', item = 'battery-equipment', count = 1 } }, + { price = { { name = 'coin', count = 200 } }, offer = { type = 'give-item', item = 'energy-shield-equipment', count = 1 } }, + { price = { { name = 'coin', count = 850 } }, offer = { type = 'give-item', item = 'personal-laser-defense-equipment', count = 1 } }, + { price = { { name = 'coin', count = 175 } }, offer = { type = 'give-item', item = 'exoskeleton-equipment', count = 1 } }, + { price = { { name = 'coin', count = 125 } }, offer = { type = 'give-item', item = 'night-vision-equipment', count = 1 } }, + { price = { { name = 'coin', count = 200 } }, offer = { type = 'give-item', item = 'belt-immunity-equipment', count = 1 } }, + { price = { { name = 'coin', count = 250 } }, offer = { type = 'give-item', item = 'personal-roboport-equipment', count = 1 } }, + { price = { { name = 'coin', count = 350 } }, offer = { type = 'give-item', item = 'roboport', count = 1 } }, + { price = { { name = 'coin', count = 50 } }, offer = { type = 'give-item', item = 'storage-chest', count = 1 } }, + { price = { { name = 'coin', count = 35 } }, offer = { type = 'give-item', item = 'construction-robot', count = 1 } }, + { price = { { name = 'coin', count = 25 } }, offer = { type = 'give-item', item = 'cliff-explosives', count = 1 } } } diff --git a/maps/hedge_maze.lua b/maps/hedge_maze.lua deleted file mode 100644 index 5b994256c..000000000 --- a/maps/hedge_maze.lua +++ /dev/null @@ -1,547 +0,0 @@ ---luacheck: ignore --- forest maze from mewmew - -require 'modules.satellite_score' -require 'modules.biter_pets' -require 'modules.no_deconstruction_of_neutral_entities' -require 'modules.spawners_contain_biters' - -local event = require 'utils.event' -local map_functions = require 'utils.tools.map_functions' -local simplex_noise = require 'utils.math.simplex_noise'.d2 -local math_random = math.random - -local labyrinth_cell_size = 16 --valid values are 2, 4, 8, 16, 32 -local lake_noise_value = -0.55 - -local modifiers = { - { x = 0, y = -1 }, - { x = -1, y = 0 }, - { x = 1, y = 0 }, - { x = 0, y = 1 } -} - -local modifiers_diagonal = { - { diagonal = { x = -1, y = 1 }, connection_1 = { x = -1, y = 0 }, connection_2 = { x = 0, y = 1 } }, - { diagonal = { x = 1, y = -1 }, connection_1 = { x = 1, y = 0 }, connection_2 = { x = 0, y = -1 } }, - { diagonal = { x = 1, y = 1 }, connection_1 = { x = 1, y = 0 }, connection_2 = { x = 0, y = 1 } }, - { diagonal = { x = -1, y = -1 }, connection_1 = { x = -1, y = 0 }, connection_2 = { x = 0, y = -1 } } -} - -local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' } - -local function shuffle(tbl) - local size = #tbl - for i = size, 1, -1 do - local rand = math_random(size) - tbl[i], tbl[rand] = tbl[rand], tbl[i] - end - return tbl -end - -local wrecks = { 'big-ship-wreck-1', 'big-ship-wreck-2', 'big-ship-wreck-3' } -local function create_shipwreck(surface, position) - local raffle = {} - local loot = { - { { name = 'iron-gear-wheel', count = math_random(80, 100) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'copper-cable', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'electric-engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.4, evolution_max = 0.8 }, - { { name = 'battery', count = math_random(40, 80) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'advanced-circuit', count = math_random(40, 80) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'electronic-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'processing-unit', count = math_random(30, 60) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'explosives', count = math_random(25, 50) }, weight = 1, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'lubricant-barrel', count = math_random(4, 10) }, weight = 1, evolution_min = 0.3, evolution_max = 0.5 }, - { { name = 'rocket-fuel', count = math_random(4, 10) }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, - { { name = 'steel-plate', count = math_random(50, 100) }, weight = 2, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'nuclear-fuel', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'burner-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'long-handed-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'fast-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'bulk-inserter', count = math_random(2, 4) }, weight = 1, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'small-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'medium-electric-pole', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'wooden-chest', count = math_random(16, 24) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'iron-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 0.4 }, - { { name = 'steel-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'small-lamp', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'rail', count = math_random(50, 75) }, weight = 3, evolution_min = 0.1, evolution_max = 0.6 }, - { { name = 'assembling-machine-1', count = math_random(1, 2) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'assembling-machine-2', count = math_random(1, 2) }, weight = 3, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'offshore-pump', count = 1 }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'heat-pipe', count = math_random(8, 12) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'arithmetic-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'constant-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'decider-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'power-switch', count = math_random(2, 4) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'programmable-speaker', count = math_random(2, 4) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'burner-mining-drill', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'electric-mining-drill', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'express-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'express-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'express-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'fast-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'fast-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'fast-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.3 }, - { { name = 'transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'pipe', count = math_random(40, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'pipe-to-ground', count = math_random(8, 16) }, weight = 1, evolution_min = 0.2, evolution_max = 0.5 }, - { { name = 'pump', count = math_random(1, 4) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'rail-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'rail-chain-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'stone-wall', count = math_random(25, 75) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'gate', count = math_random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'train-stop', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'express-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'fast-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.0, evolution_max = 0.5 } - } - - local distance_to_center = math.sqrt(position.x ^ 2 + position.y ^ 2) - if distance_to_center < 1 then - distance_to_center = 0.1 - else - distance_to_center = distance_to_center / 4000 - end - if distance_to_center > 1 then - distance_to_center = 1 - end - - for _, t in pairs(loot) do - for x = 1, t.weight, 1 do - if t.evolution_min <= distance_to_center and t.evolution_max >= distance_to_center then - table.insert(raffle, t[1]) - end - end - end - local e = surface.create_entity { name = wrecks[math_random(1, #wrecks)], position = position, force = 'player' } - for x = 1, math_random(2, 3), 1 do - local loot = raffle[math_random(1, #raffle)] - e.insert(loot) - end -end - -local function get_noise(name, pos) - local seed = game.surfaces[1].map_gen_settings.seed - local noise_seed_add = 25000 - seed = seed + noise_seed_add - if name == 1 then - local noise = {} - noise[1] = simplex_noise(pos.x * 0.002, pos.y * 0.002, seed) - local noise = noise[1] - return noise - end -end - -local function set_cell_tiles(surface, cell_left_top, tile_name) - for x = 0.5, labyrinth_cell_size, 1 do - for y = 0.5, labyrinth_cell_size, 1 do - local pos = { x = cell_left_top.x + x, y = cell_left_top.y + y } - surface.set_tiles({ { name = tile_name, position = pos } }, true) - end - end -end - -local function labyrinth_wall(surface, cell_left_top) - local noise = get_noise(1, cell_left_top) - if noise < lake_noise_value then - return - end - local tile_name = 'grass-2' - if noise > 0.6 then - tile_name = 'dirt-6' - set_cell_tiles(surface, cell_left_top, tile_name) - for x = 0.5, labyrinth_cell_size, 1 do - for y = 0.5, labyrinth_cell_size, 1 do - local pos = { x = cell_left_top.x + x, y = cell_left_top.y + y } - if math_random(1, 3) ~= 1 then - surface.create_entity({ name = 'dead-tree-desert', position = pos }) - else - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = pos }) - end - end - end - return - end - - set_cell_tiles(surface, cell_left_top, tile_name) - for x = 0.5, labyrinth_cell_size, 1 do - for y = 0.5, labyrinth_cell_size, 1 do - local pos = { x = cell_left_top.x + x, y = cell_left_top.y + y } - if math_random(1, 3) ~= 1 then - surface.create_entity({ name = 'tree-04', position = pos }) - else - if math_random(1, 3) == 1 then - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = pos }) - end - end - end - end -end - -local function labyrinth_path(surface, cell_left_top) - local noise = get_noise(1, cell_left_top) - if noise < lake_noise_value then - return - end - local tile_name = 'grass-1' - if noise > 0.6 then - tile_name = 'dirt-7' - end - set_cell_tiles(surface, cell_left_top, tile_name) -end - -local function draw_oceans(surface, cell_left_top) - if get_noise(1, cell_left_top) >= lake_noise_value then - return - end - set_cell_tiles(surface, cell_left_top, 'deepwater') - for x = 0.5, labyrinth_cell_size, 1 do - for y = 0.5, labyrinth_cell_size, 1 do - local pos = { x = cell_left_top.x + x, y = cell_left_top.y + y } - if math_random(1, 256) == 1 then - surface.create_entity({ name = 'fish', position = pos }) - end - end - end -end - -local function get_path_connections_count(cell_pos) - local connections = 0 - for _, m in pairs(modifiers) do - if storage.labyrinth_cells[tostring(cell_pos.x + m.x) .. '_' .. tostring(cell_pos.y + m.y)] then - connections = connections + 1 - end - end - return connections -end - -local function process_labyrinth_cell(pos) - local cell_position = { x = pos.x / labyrinth_cell_size, y = pos.y / labyrinth_cell_size } - - storage.labyrinth_cells[tostring(cell_position.x) .. '_' .. tostring(cell_position.y)] = false - - for _, modifier in pairs(modifiers_diagonal) do - if storage.labyrinth_cells[tostring(cell_position.x + modifier.diagonal.x) .. '_' .. tostring(cell_position.y + modifier.diagonal.y)] then - local connection_1 = storage.labyrinth_cells[tostring(cell_position.x + modifier.connection_1.x) .. '_' .. tostring(cell_position.y + modifier.connection_1.y)] - local connection_2 = storage.labyrinth_cells[tostring(cell_position.x + modifier.connection_2.x) .. '_' .. tostring(cell_position.y + modifier.connection_2.y)] - if not connection_1 and not connection_2 then - return false - end - end - end - - for _, m in pairs(modifiers) do - if get_path_connections_count({ x = cell_position.x + m.x, y = cell_position.y + m.y }) >= math_random(2, 3) then - return false - end - end - - if get_path_connections_count(cell_position) >= math_random(2, 3) then - return false - end - - storage.labyrinth_cells[tostring(cell_position.x) .. '_' .. tostring(cell_position.y)] = true - return true -end - -local function labyrinth(event) - local positions = {} - for x = 0, 32 - labyrinth_cell_size, labyrinth_cell_size do - for y = 0, 32 - labyrinth_cell_size, labyrinth_cell_size do - positions[#positions + 1] = { x = event.area.left_top.x + x, y = event.area.left_top.y + y } - end - end - positions = shuffle(positions) - - for _, pos in pairs(positions) do - draw_oceans(event.surface, pos) - if process_labyrinth_cell(pos) then - labyrinth_path(event.surface, pos) - else - labyrinth_wall(event.surface, pos) - end - end -end - -local function on_chunk_generated(event) - local surface = game.surfaces['forest_maze'] - if event.surface.name ~= surface.name then - return - end - local left_top = event.area.left_top - local area = { - left_top = { x = left_top.x, y = left_top.y }, - right_bottom = { x = left_top.x + 31, y = left_top.y + 31 } - } - surface.destroy_decoratives({ area = area }) - - local entities = surface.find_entities(area) - for _, e in pairs(entities) do - if e.valid then - if e.name ~= 'character' then - e.destroy() - end - end - end - - labyrinth(event) - - local decorative_names = {} - for k, v in pairs(prototypes.decorative) do - if v.autoplace_specification then - decorative_names[#decorative_names + 1] = k - end - end - surface.regenerate_decorative(decorative_names, { { x = left_top.x / 32, y = left_top.y / 32 } }) -end - -local function draw_secret_area(surface, position) - local positions = {} - for x = 0, labyrinth_cell_size - 1, 1 do - for y = 0, labyrinth_cell_size - 1, 1 do - positions[#positions + 1] = { x = position.x + x, y = position.y + y } - end - end - positions = shuffle(positions) - - local wrecks_to_place = math_random(1, math.ceil(labyrinth_cell_size * 0.33)) - for i = 1, #positions, 1 do - if surface.can_place_entity({ name = 'big-ship-wreck-1', position = positions[i] }) then - create_shipwreck(surface, positions[i]) - wrecks_to_place = wrecks_to_place - 1 - if wrecks_to_place <= 0 then - break - end - end - end -end - -local ore_chance_weights = { - { 'iron-ore', 25 }, - { 'copper-ore', 18 }, - { 'coal', 14 }, - { 'stone', 10 }, - { 'crude-oil', 5 }, - { 'uranium-ore', 3 } -} -local ore_raffle = {} -for _, t in pairs(ore_chance_weights) do - for x = 1, t[2], 1 do - table.insert(ore_raffle, t[1]) - end -end - -local function draw_ores(surface, position) - local ore = ore_raffle[math_random(1, #ore_raffle)] - for x = 0, labyrinth_cell_size - 1, 1 do - for y = 0, labyrinth_cell_size - 1, 1 do - local pos = { x = position.x + x, y = position.y + y } - local amount = 250 + math.sqrt(pos.x ^ 2 + pos.y ^ 2) * 0.5 - if ore == 'crude-oil' then - if math_random(1, 32) == 1 and surface.can_place_entity({ name = ore, position = pos, amount = amount * 200 }) then - surface.create_entity({ name = ore, position = pos, amount = amount * 200 }) - end - else - surface.create_entity({ name = ore, position = pos, amount = amount }) - end - end - end -end - -local function draw_water(surface, position) - map_functions.draw_noise_tile_circle({ x = position.x + labyrinth_cell_size * 0.5, y = position.y + labyrinth_cell_size * 0.5 }, 'water', surface, math.floor(labyrinth_cell_size * 0.3)) - for _, tile in pairs(surface.find_tiles_filtered({ name = 'water', area = { { position.x, position.y }, { position.x + labyrinth_cell_size, position.y + labyrinth_cell_size } } })) do - if math_random(1, 12) == 1 then - surface.create_entity({ name = 'fish', position = tile.position }) - end - end -end - -local enemy_chances = { - { 'biter-spawner', 20 }, - { 'spitter-spawner', 8 }, - { 'small-worm-turret', 5 }, - { 'medium-worm-turret', 4 }, - { 'big-worm-turret', 3 }, - { 'behemoth-worm-turret', 1 } -} -local enemy_raffle = {} -for _, t in pairs(enemy_chances) do - for x = 1, t[2], 1 do - table.insert(enemy_raffle, t[1]) - end -end - -local function draw_enemies(surface, position) - local positions = {} - for x = 0, labyrinth_cell_size - 1, 1 do - for y = 0, labyrinth_cell_size - 1, 1 do - positions[#positions + 1] = { x = position.x + x, y = position.y + y } - end - end - positions = shuffle(positions) - - for i = 1, labyrinth_cell_size, 1 do - local enemy = enemy_raffle[math_random(1, #enemy_raffle)] - if surface.can_place_entity({ name = enemy, position = positions[i] }) then - surface.create_entity({ name = enemy, position = positions[i], force = 'enemy' }) - end - end -end - -local function draw_rocks(surface, position) - local r = math_random(0, 100) - if r < 50 then - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = { x = position.x + labyrinth_cell_size * 0.5, y = position.y + labyrinth_cell_size * 0.5 } }) - return - end - if r <= 100 then - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = { x = position.x + labyrinth_cell_size * 0.5, y = position.y + labyrinth_cell_size * 0.25 } }) - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = { x = position.x + labyrinth_cell_size * 0.75, y = position.y + labyrinth_cell_size * 0.75 } }) - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = { x = position.x + labyrinth_cell_size * 0.25, y = position.y + labyrinth_cell_size * 0.75 } }) - return - end -end - -local function process_chunk_charted_cell(surface, pos) - local cell_position = { x = pos.x / labyrinth_cell_size, y = pos.y / labyrinth_cell_size } - if not storage.labyrinth_cells[tostring(cell_position.x) .. '_' .. tostring(cell_position.y)] then - return - end - - local noise = get_noise(1, pos) - if noise < lake_noise_value then - return - end --RETURN IF IT IS WATER LAKE - - local connection_count = get_path_connections_count(cell_position) - - if connection_count == 0 then - draw_secret_area(surface, pos) - end - - if connection_count == 1 then - if math_random(1, 2) == 1 then - draw_ores(surface, pos) - else - local distance_to_center = math.sqrt(pos.x ^ 2 + pos.y ^ 2) - if distance_to_center > 196 then - if math_random(1, 3) == 1 then - draw_water(surface, pos) - else - draw_enemies(surface, pos) - end - else - if math_random(1, 3) == 1 then - draw_water(surface, pos) - end - end - end - end - - if connection_count == 3 then - if math_random(1, 2) == 1 then - draw_rocks(surface, pos) - end - end -end - -local function on_chunk_charted(event) - local surface = game.surfaces[event.surface_index] - - if game.tick < 300 then - return - end - - if not storage.chunks_charted then - game.forces.player.clear_chart(surface) - storage.chunks_charted = {} - end - - local left_top = { x = event.position.x * 32, y = event.position.y * 32 } - - if storage.chunks_charted[tostring(left_top.x) .. '_' .. tostring(left_top.y)] then - return - end - storage.chunks_charted[tostring(left_top.x) .. '_' .. tostring(left_top.y)] = true - - for x = 0, 32 - labyrinth_cell_size, labyrinth_cell_size do - for y = 0, 32 - labyrinth_cell_size, labyrinth_cell_size do - local pos = { x = left_top.x + x, y = left_top.y + y } - process_chunk_charted_cell(surface, pos) - end - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - if not storage.map_init_done then - local map_gen_settings = {} - map_gen_settings.water = 'none' - map_gen_settings.cliff_settings = { cliff_elevation_interval = 20, cliff_elevation_0 = 20 } - map_gen_settings.autoplace_controls = { - ['coal'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['stone'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['copper-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['uranium-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['iron-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['crude-oil'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['trees'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['enemy-base'] = { frequency = 'none', size = 'none', richness = 'none' } - } - - game.map_settings.pollution.ageing = 0 - game.map_settings.pollution.pollution_restored_per_tree_damage = 0 - game.create_surface('forest_maze', map_gen_settings) - game.forces['player'].set_spawn_position({ 0, 0 }, game.surfaces['forest_maze']) - local surface = game.surfaces['forest_maze'] - - surface.daytime = 1 - surface.freeze_daytime = 1 - --local radius = 512 - --game.forces.player.chart(surface, {{x = -1 * radius, y = -1 * radius}, {x = radius, y = radius}}) - storage.map_init_done = true - end - local surface = game.surfaces['forest_maze'] - if player.online_time < 5 and surface.is_chunk_generated({ 0, 0 }) then - player.teleport(surface.find_non_colliding_position('character', { 0, 0 }, 2, 1), 'forest_maze') - else - if player.online_time < 5 then - player.teleport({ 0, 0 }, 'forest_maze') - end - end - if player.online_time < 10 then - player.insert { name = 'iron-gear-wheel', count = 8 } - player.insert { name = 'iron-plate', count = 16 } - --player.insert {name = 'grenade', count = 160} - end -end - ---TREE BURNING NERF -local function on_entity_died(event) - if not event.entity.valid then - return - end - if event.entity.type == 'tree' then - for _, entity in pairs(event.entity.surface.find_entities_filtered({ area = { { event.entity.position.x - 4, event.entity.position.y - 4 }, { event.entity.position.x + 4, event.entity.position.y + 4 } }, name = 'fire-flame-on-tree' })) do - if entity.valid then - entity.destroy() - end - end - end -end - -local function on_init() - storage.labyrinth_cells = {} -end - -event.on_init(on_init) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_chunk_generated, on_chunk_generated) -event.add(defines.events.on_chunk_charted, on_chunk_charted) -event.add(defines.events.on_player_joined_game, on_player_joined_game) diff --git a/maps/island_troopers/enemies.lua b/maps/island_troopers/enemies.lua deleted file mode 100644 index 440e8b0b5..000000000 --- a/maps/island_troopers/enemies.lua +++ /dev/null @@ -1,196 +0,0 @@ ---luacheck: ignore -local Difficulty = require 'modules.difficulty_vote' -local Public = {} - -local difficulties_votes = { - [1] = { amount_modifier = 0.52, strength_modifier = 0.40, boss_modifier = 0.7 }, - [2] = { amount_modifier = 0.76, strength_modifier = 0.65, boss_modifier = 0.8 }, - [3] = { amount_modifier = 0.92, strength_modifier = 0.85, boss_modifier = 0.9 }, - [4] = { amount_modifier = 1.00, strength_modifier = 1.00, boss_modifier = 1.0 }, - [5] = { amount_modifier = 1.16, strength_modifier = 1.25, boss_modifier = 1.1 }, - [6] = { amount_modifier = 1.48, strength_modifier = 1.75, boss_modifier = 1.2 }, - [7] = { amount_modifier = 2.12, strength_modifier = 2.50, boss_modifier = 1.3 } -} - -local function get_biter() - local max_chance = 0 - for k, v in pairs(storage.biter_chances) do - max_chance = max_chance + v - end - local r = math.random(1, max_chance) - local current_chance = 0 - for k, v in pairs(storage.biter_chances) do - current_chance = current_chance + v - if r <= current_chance then - return k - end - end -end - -local function get_worm() - local max_chance = 0 - for k, v in pairs(storage.worm_chances) do - max_chance = max_chance + v - end - local r = math.random(1, max_chance) - local current_chance = 0 - for k, v in pairs(storage.worm_chances) do - current_chance = current_chance + v - if r <= current_chance then - return k - end - end -end - -local function set_biter_chances(level) - storage.biter_chances = { - ['small-biter'] = 500 - level * 10, - ['small-spitter'] = 500 - level * 10, - ['medium-biter'] = level * 10, - ['medium-spitter'] = level * 10, - ['big-biter'] = 0, - ['big-spitter'] = 0, - ['behemoth-biter'] = 0, - ['behemoth-spitter'] = 0 - } - if level > 25 then - storage.biter_chances['big-biter'] = (level - 25) * 25 - storage.biter_chances['big-spitter'] = (level - 25) * 25 - end - if level > 50 then - storage.biter_chances['behemoth-biter'] = (level - 50) * 50 - storage.biter_chances['behemoth-spitter'] = (level - 50) * 50 - end - for k, v in pairs(storage.biter_chances) do - if storage.biter_chances[k] < 0 then - storage.biter_chances[k] = 0 - end - end -end - -local function set_worm_chances(level) - storage.worm_chances = { - ['small-worm-turret'] = 500 - level * 10, - ['medium-worm-turret'] = level * 10, - ['big-worm-turret'] = 0, - ['behemoth-worm-turret'] = 0 - } - if level > 25 then - storage.worm_chances['big-worm-turret'] = (level - 25) * 25 - storage.worm_chances['big-worm-turret'] = (level - 25) * 25 - end - if level > 50 then - storage.worm_chances['behemoth-worm-turret'] = (level - 50) * 50 - storage.worm_chances['behemoth-worm-turret'] = (level - 50) * 50 - end - for k, v in pairs(storage.worm_chances) do - if storage.worm_chances[k] < 0 then - storage.worm_chances[k] = 0 - end - end -end - -local function is_boss_stage() - if storage.current_stage == 1 then - return false - end - if storage.current_stage == #storage.stages - 1 then - return true - end - if #storage.stages < 6 then - return false - end - if storage.current_stage == math.floor(#storage.stages * 0.5) then - return true - end -end - -function Public.add_enemies(surface, tiles) - local Diff = Difficulty.get() - table.shuffle_table(tiles) - - if is_boss_stage() then - set_biter_chances(math.floor((storage.current_level * difficulties_votes[Diff.difficulty_vote_index].strength_modifier) + 15)) - local boss_count = math.random(1, math.floor(storage.current_level * 0.5) + 1) - if boss_count > 16 then - boss_count = 16 - end - for k, tile in pairs(tiles) do - if surface.can_place_entity({ name = 'small-biter', position = tile.position, force = 'enemy' }) then - local unit = surface.create_entity({ name = get_biter(), position = tile.position, force = 'enemy' }) - unit.ai_settings.allow_destroy_when_commands_fail = false - unit.ai_settings.allow_try_return_to_spawner = false - add_boss_unit(unit, (3 + storage.current_level * 0.2) * difficulties_votes[Diff.difficulty_vote_index].boss_modifier, 0.55) - storage.alive_boss_enemy_count = storage.alive_boss_enemy_count + 1 - storage.alive_boss_enemy_entities[unit.unit_number] = unit - storage.alive_enemies = storage.alive_enemies + 1 - boss_count = boss_count - 1 - if boss_count == 0 then - break - end - end - end - end - - if storage.current_level > 2 then - if math.random(1, 5) == 1 or is_boss_stage() then - local evolution = (storage.current_level * 2 * difficulties_votes[Diff.difficulty_vote_index].strength_modifier) * 0.01 - if evolution > 1 then - evolution = 1 - end - game.forces.enemy_spawners.evolution_factor = evolution - local count = math.random(1, math.ceil(storage.current_level * 0.10)) - if count > 5 then - count = 5 - end - for k, tile in pairs(tiles) do - if surface.can_place_entity({ name = 'biter-spawner', position = tile.position, force = 'enemy_spawners' }) then - surface.create_entity({ name = 'biter-spawner', position = tile.position, force = 'enemy_spawners' }) - storage.alive_enemies = storage.alive_enemies + 1 - count = count - 1 - if count == 0 then - break - end - end - end - end - end - - if math.random(1, 4) == 1 or is_boss_stage() then - set_worm_chances(storage.current_level) - local worm_count = math.random(1, math.ceil(storage.current_level * 0.5)) - if worm_count > 32 then - worm_count = 32 - end - for k, tile in pairs(tiles) do - if surface.can_place_entity({ name = 'big-worm-turret', position = tile.position, force = 'enemy' }) then - surface.create_entity({ name = get_worm(), position = tile.position, force = 'enemy' }) - storage.alive_enemies = storage.alive_enemies + 1 - worm_count = worm_count - 1 - if worm_count == 0 then - break - end - end - end - end - - set_biter_chances(math.floor(storage.current_level * difficulties_votes[Diff.difficulty_vote_index].strength_modifier) + 1) - local amount = ((storage.current_level * 25) / #storage.stages) * storage.current_stage - amount = amount * difficulties_votes[Diff.difficulty_vote_index].amount_modifier - for k, tile in pairs(tiles) do - if surface.can_place_entity({ name = 'small-biter', position = tile.position, force = 'enemy' }) then - local unit = surface.create_entity({ name = get_biter(), position = tile.position, force = 'enemy' }) - unit.ai_settings.allow_destroy_when_commands_fail = false - unit.ai_settings.allow_try_return_to_spawner = false - storage.alive_enemies = storage.alive_enemies + 1 - amount = amount - 1 - end - if amount <= 0 then - break - end - end - - update_stage_gui() -end - -return Public diff --git a/maps/island_troopers/main.lua b/maps/island_troopers/main.lua deleted file mode 100644 index 67ea0ad30..000000000 --- a/maps/island_troopers/main.lua +++ /dev/null @@ -1,330 +0,0 @@ ---luacheck: ignore ---map by mewmew and kyte - -require 'maps.island_troopers.map_intro' -require 'utils.functions.noise_vector_path' -require 'modules.shopping_chests' -require 'modules.no_turrets' -require 'modules.dangerous_goods' -require 'modules.rpg' -require 'modules.difficulty_vote' -require 'maps.island_troopers.enemies' -require 'maps.island_troopers.terrain' -local Difficulty = require 'modules.difficulty_vote' - -max_island_radius = 128 - -local function create_stage_gui(player) - if player.gui.top.stage_gui then - return - end - local element = player.gui.top.add({ type = 'frame', name = 'stage_gui', caption = ' ' }) - local style = element.style - style.minimal_height = 38 - style.maximal_height = 38 - style.minimal_width = 140 - style.top_padding = 2 - style.left_padding = 4 - style.right_padding = 4 - style.bottom_padding = 2 - style.font_color = { r = 155, g = 85, b = 25 } - style.font = 'default-large-bold' -end - -function update_stage_gui() - if not storage.stages then - return - end - local caption = 'Level: ' .. storage.current_level - caption = caption .. ' | Stage: ' - local stage = storage.current_stage - if stage > #storage.stages - 1 then - stage = #storage.stages - 1 - end - caption = caption .. stage - caption = caption .. '/' - caption = caption .. #storage.stages - 1 - caption = caption .. ' | Bugs remaining: ' - caption = caption .. storage.alive_enemies - - for _, player in pairs(game.connected_players) do - if player.gui.top.stage_gui then - player.gui.top.stage_gui.caption = caption - end - end -end - -local function bring_players() - local surface = game.surfaces[1] - for _, player in pairs(game.connected_players) do - if player.position.y < -1 then - if player.character then - if player.character.valid then - local p = surface.find_non_colliding_position('character', { 0, 2 }, 8, 0.5) - if not p then - player.teleport({ 0, 2 }, surface) - end - player.teleport(p, surface) - end - end - end - end -end - -local function drift_corpses_toward_beach() - local surface = game.surfaces[1] - for _, corpse in pairs(surface.find_entities_filtered({ name = 'character-corpse' })) do - if corpse.position.y < 0 then - if surface.get_tile(corpse.position).collides_with('resource') then - corpse.clone { - position = { corpse.position.x, corpse.position.y + (math.random(50, 250) * 0.01) }, - surface = surface, - force = corpse.force.name - } - corpse.destroy() - end - end - end -end - -local function get_island_size() - local r_min = storage.current_level + 16 - if r_min > math.floor(max_island_radius * 0.5) then - r_min = math.floor(max_island_radius * 0.5) - end - local r_max = storage.current_level * 2 + 32 - if r_max > max_island_radius then - r_max = max_island_radius - end - return math.random(r_min, r_max) -end - -local function set_next_level() - storage.alive_enemies = 0 - storage.alive_boss_enemy_count = 0 - - storage.current_level = storage.current_level + 1 - if storage.current_level > 1 then - bring_players() - end - - storage.current_stage = 1 - storage.stage_amount = math.floor(storage.current_level * 0.33) + 3 - if storage.stage_amount > 9 then - storage.stage_amount = 9 - end - - storage.path_tiles = nil - - local island_size = get_island_size() - - storage.stages = {} - storage.stages[1] = { - path_length = 16 + island_size * 1.5, - size = island_size - } - - for i = 1, storage.stage_amount - 1, 1 do - island_size = get_island_size() - storage.stages[#storage.stages + 1] = { - path_length = 16 + island_size * 1.5, - size = island_size - } - end - storage.stages[#storage.stages + 1] = { - path_length = max_island_radius * 7, - size = false - } - - --game.print("Level " .. storage.current_level) - update_stage_gui() - - storage.gamestate = 2 -end - -local function earn_credits(amount) - for _, player in pairs(game.connected_players) do - player.play_sound { path = 'utility/armor_insert', volume_modifier = 0.85 } - end - game.print(amount .. ' credits have been transfered to the factory.', { r = 255, g = 215, b = 0 }) - storage.credits = storage.credits + amount -end - -local function slowmo() - if not storage.slowmo then - storage.slowmo = 0.15 - end - game.speed = storage.slowmo - storage.slowmo = storage.slowmo + 0.01 - if game.speed < 1 then - return - end - for _, p in pairs(game.connected_players) do - if p.gui.left['slowmo_cam'] then - p.gui.left['slowmo_cam'].destroy() - end - end - storage.slowmo = nil - storage.gamestate = 4 -end - -local function wait_until_stage_is_beaten() - if storage.alive_enemies > 0 then - return - end - local reward_amount = false - local gamestate = 2 - local base_reward = 250 * storage.current_level - - if storage.stages[storage.current_stage].size then - if storage.current_stage < #storage.stages - 1 then - reward_amount = base_reward + storage.current_stage * storage.current_level * 50 - else - reward_amount = base_reward + storage.current_stage * storage.current_level * 150 - end - else - game.print('Final Stage complete!') - game.print('Level is collapsing !!', { r = 255, g = 0, b = 0 }) - gamestate = 5 - end - - if reward_amount then - earn_credits(reward_amount) - update_stage_gui() - end - storage.current_stage = storage.current_stage + 1 - storage.gamestate = gamestate -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - create_stage_gui(player) - if player.gui.left['slowmo_cam'] then - player.gui.left['slowmo_cam'].destroy() - end - - update_stage_gui() - - if player.online_time > 0 then - return - end - player.insert({ name = 'pistol', count = 1 }) - player.insert({ name = 'firearm-magazine', count = 32 }) -end - -local function on_init() - Difficulty.get() - game.create_force('enemy_spawners') - game.forces.enemy_spawners.set_friend('enemy', true) - game.forces.enemy.set_friend('enemy_spawners', true) - - local surface = game.surfaces[1] - surface.request_to_generate_chunks({ x = 0, y = 0 }, 16) - surface.force_generate_chunk_requests() - - --storage.tree_raffle = {} - --for _, e in pairs(prototypes.entity) do - -- if e.type == "tree" then - -- table.insert(storage.tree_raffle, e.name) - -- end - --end - - local blacklist = { - ['dark-mud-decal'] = true, - ['sand-dune-decal'] = true, - ['light-mud-decal'] = true, - ['puberty-decal'] = true, - ['sand-decal'] = true, - ['red-desert-decal'] = true - } - storage.decorative_names = {} - for k, v in pairs(prototypes.decorative) do - if not blacklist[k] then - if v.autoplace_specification then - storage.decorative_names[#storage.decorative_names + 1] = k - end - end - end - - Difficulty.difficulty_poll_closing_timeout = 3600 * 10 - storage.level_vectors = {} - storage.alive_boss_enemy_entities = {} - storage.current_level = 0 - storage.gamestate = 1 - - game.forces.player.set_spawn_position({ 0, 2 }, surface) -end - -local msg = { - 'We got the brainbug!', - 'Good job troopers!', - "I'm doing my part!" -} - -local function on_entity_died(event) - local entity = event.entity - if not entity.valid then - return - end - - if entity.force.name == 'enemy_spawners' then - if entity.type == 'unit' then - return - end - storage.alive_enemies = storage.alive_enemies - 1 - return - end - - if entity.force.name ~= 'enemy' then - return - end - - storage.alive_enemies = storage.alive_enemies - 1 - update_stage_gui() - - if entity.type ~= 'unit' then - return - end - if not storage.alive_boss_enemy_entities[entity.unit_number] then - return - end - - storage.alive_boss_enemy_entities[entity.unit_number] = nil - storage.alive_boss_enemy_count = storage.alive_boss_enemy_count - 1 - if storage.alive_boss_enemy_count == 0 then - for _, p in pairs(game.connected_players) do - if p.gui.left['slowmo_cam'] then - p.gui.left['slowmo_cam'].destroy() - end - local frame = p.gui.left.add({ type = 'frame', name = 'slowmo_cam', caption = msg[math.random(1, #msg)] }) - local camera = frame.add({ type = 'camera', name = 'mini_cam_element', position = entity.position, zoom = 1.5, surface_index = 1 }) - camera.style.minimal_width = 400 - camera.style.minimal_height = 400 - end - storage.gamestate = 8 - end -end - -local gamestate_functions = { - [1] = set_next_level, - [2] = draw_path_to_next_stage, - [3] = draw_the_island, - [4] = wait_until_stage_is_beaten, - [5] = kill_the_level, - [8] = slowmo -} - -local function on_tick() - gamestate_functions[storage.gamestate]() - if game.tick % 150 == 0 then - drift_corpses_toward_beach() - end -end - -local event = require 'utils.event' -event.on_init(on_init) -event.add(defines.events.on_tick, on_tick) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_player_joined_game, on_player_joined_game) - -require 'utils.functions.boss_unit' diff --git a/maps/island_troopers/map_intro.lua b/maps/island_troopers/map_intro.lua deleted file mode 100644 index f7575dc6f..000000000 --- a/maps/island_troopers/map_intro.lua +++ /dev/null @@ -1,113 +0,0 @@ ---luacheck: ignore -local event = require 'utils.event' - -local main_caption = ' --Island Troopers-- ' -local sub_caption = ' ' -local info = - [[ - You are stranded on this coastal planet and your mission is to get out of here. - - The peaceful inhabitants live in the sea and are plagued by bugs. - They need your help! - - They will send you the bugs along with the seabed to the surface. - If you eliminate the bugs, you will receive credits as a thank-you for removing the bugs. - With the credits you can buy raw materials from requirement boxes. - These can already be found on the coast. - - Be careful! Over time, residents will send stronger bugs to the surface! - - Turrets unfortunately malfunction in this world. - - Any container bearing dangerous goods, like ammo, grenades or barrels, - causes heavy explosions when it breaks. - Maybe this can be used to our advantage. - - --Good Luck Troopers-- -]] - -local function create_map_intro_button(player) - if player.gui.top['map_intro_button'] then - return - end - local b = player.gui.top.add({type = 'sprite-button', caption = '?', name = 'map_intro_button', tooltip = 'Map Info'}) - b.style.font_color = {r = 0.11, g = 0.8, b = 0.44} - b.style.font = 'heading-1' - b.style.minimal_height = 38 - b.style.minimal_width = 38 - b.style.top_padding = 2 - b.style.left_padding = 4 - b.style.right_padding = 4 - b.style.bottom_padding = 2 -end - -local function create_map_intro(player) - if player.gui.left['map_intro_frame'] then - player.gui.left['map_intro_frame'].destroy() - end - local frame = player.gui.left.add {type = 'frame', name = 'map_intro_frame', direction = 'vertical'} - local t = frame.add {type = 'table', column_count = 1} - - local tt = t.add {type = 'table', column_count = 3} - local l = tt.add {type = 'label', caption = main_caption} - l.style.font = 'heading-1' - l.style.font_color = {r = 0.11, g = 0.8, b = 0.44} - - local l = tt.add {type = 'label', caption = sub_caption} - l.style.font = 'heading-2' - l.style.font_color = {r = 0.33, g = 0.66, b = 0.9} - l.style.minimal_width = 385 - - local b = tt.add {type = 'button', caption = 'X', name = 'close_map_intro_frame', align = 'right'} - b.style.font = 'heading-2' - b.style.minimal_height = 30 - b.style.minimal_width = 30 - b.style.top_padding = 2 - b.style.left_padding = 4 - b.style.right_padding = 4 - b.style.bottom_padding = 2 - - local tt = t.add {type = 'table', column_count = 1} - local frame = t.add {type = 'frame'} - local l = frame.add {type = 'label', caption = info} - l.style.single_line = false - l.style.font = 'heading-2' - l.style.font_color = {r = 0.75, g = 0.8, b = 0.8} - l.style.minimal_width = 480 -end - -local function on_gui_click(event) - if not event then - return - end - if not event.element then - return - end - if not event.element.valid then - return - end - local player = game.players[event.element.player_index] - if event.element.name == 'close_map_intro_frame' then - player.gui.left['map_intro_frame'].destroy() - return - end - if event.element.name == 'map_intro_button' then - if player.gui.left['map_intro_frame'] then - player.gui.left['map_intro_frame'].destroy() - else - create_map_intro(player) - end - return - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - create_map_intro_button(player) - if player.online_time == 0 then - create_map_intro(player) - end -end - -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_gui_click, on_gui_click) diff --git a/maps/island_troopers/terrain.lua b/maps/island_troopers/terrain.lua deleted file mode 100644 index 2d16f50de..000000000 --- a/maps/island_troopers/terrain.lua +++ /dev/null @@ -1,383 +0,0 @@ ---luacheck: ignore -local math_random = math.random -local simplex_noise = require 'utils.math.simplex_noise'.d2 -local NoiseVectors = require 'utils.functions.noise_vector_path' -local Enemies = require 'maps.island_troopers.enemies' -local ShoppingChests = require 'modules.shopping_chests' - -local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' } - -local function island_noise(p, seed_1, seed_2, seed_3) - local noise_1 = simplex_noise(p.x * seed_m1, p.y * seed_m1, seed_1) - local noise_2 = simplex_noise(p.x * seed_m2, p.y * seed_m2, seed_2) - local noise_3 = simplex_noise(p.x * seed_m3, p.y * seed_m3, seed_3) - local noise = math.abs(noise_1 + noise_2 * 0.5 + noise_3 * 0.2) - noise = noise / 1.7 - return noise -end - -local function island_noise_radius(position) - local noise = island_noise(position, seed_1, seed_2, seed_3) - local radius = storage.stages[storage.current_stage].size - return radius * 0.5 + noise * radius * 0.5 -end - -local function draw_island_tiles(surface, position, radius) - local tiles = {} - for y = radius * -1, radius, 1 do - for x = radius * -1, radius, 1 do - local p = { x = x + position.x, y = y + position.y } - if surface.get_tile(p).name == 'deepwater' then - local distance = math.sqrt(x ^ 2 + y ^ 2) - local tile - local noise_radius = island_noise_radius(p) - if distance < noise_radius - radius * 0.15 then - tile = { name = game.surfaces['island_tiles'].get_tile(x, y).name, position = p } - else - if distance < noise_radius then - tile = { name = 'water', position = p } - end - end - - if tile then - tiles[#tiles + 1] = tile - end - end - end - end - surface.set_tiles(tiles, true) - return tiles -end - -local function get_vector() - if storage.current_stage == 1 then - return { 0, -1 } - end - if storage.current_stage == #storage.stages then - return { 0, 1 } - end - local position = storage.path_tiles[#storage.path_tiles].position - local island_size = storage.stages[storage.current_stage].size - local y_modifier = 0 - if math.abs(position.y) < 32 + island_size * 3 then - y_modifier = math.random(25, 100) * -0.01 - else - y_modifier = math.random(25, 100) * 0.01 - end - return { 1, y_modifier } -end - -local function set_island_surface() - local map_gen_settings = {} - map_gen_settings.height = storage.stages[storage.current_stage].size * 2 - map_gen_settings.width = storage.stages[storage.current_stage].size * 2 - map_gen_settings.water = 0 - map_gen_settings.terrain_segmentation = 1 - map_gen_settings.seed = math.random(1, 999999999) - map_gen_settings.cliff_settings = { cliff_elevation_interval = math.random(2, 16), cliff_elevation_0 = math.random(2, 16) } - map_gen_settings.autoplace_controls = { - ['coal'] = { frequency = 0, size = 0, richness = 0 }, - ['stone'] = { frequency = 0, size = 0, richness = 0 }, - ['copper-ore'] = { frequency = 0, size = 0, richness = 0 }, - ['iron-ore'] = { frequency = 0, size = 0, richness = 0 }, - ['uranium-ore'] = { frequency = 0, size = 0, richness = 0 }, - ['crude-oil'] = { frequency = 0, size = 0, richness = 0 }, - ['trees'] = { frequency = 50, size = 0.1, richness = math.random(0, 10) * 0.1 }, - ['enemy-base'] = { frequency = 'none', size = 'none', richness = 'none' } - } - game.create_surface('island_tiles', map_gen_settings) - local surface = game.surfaces['island_tiles'] - surface.request_to_generate_chunks({ 0, 0 }, math.ceil(max_island_radius / 32)) - surface.force_generate_chunk_requests() -end - -function draw_the_island() - if not storage.stages[storage.current_stage].size then - storage.gamestate = 4 - return - end - if game.surfaces['island_tiles'] then - game.delete_surface(game.surfaces['island_tiles']) - return - end - - local surface = game.surfaces[1] - local position = storage.path_tiles[#storage.path_tiles].position - seed_1 = math.random(1, 9999999) - seed_2 = math.random(1, 9999999) - seed_3 = math.random(1, 9999999) - seed_m1 = (math.random(8, 16) * 0.1) / storage.stages[storage.current_stage].size - seed_m2 = (math.random(12, 24) * 0.1) / storage.stages[storage.current_stage].size - seed_m3 = (math.random(50, 100) * 0.1) / storage.stages[storage.current_stage].size - - set_island_surface() - local tiles = draw_island_tiles(surface, position, storage.stages[storage.current_stage].size) - - for _, decorative in pairs(game.surfaces['island_tiles'].find_decoratives_filtered({})) do - local distance = math.sqrt(decorative.position.x ^ 2 + decorative.position.y ^ 2) - if distance <= storage.stages[storage.current_stage].size then - surface.create_decoratives { - check_collision = true, - decoratives = { { name = decorative.decorative.name, position = { position.x + decorative.position.x, position.y + decorative.position.y }, amount = decorative.amount } } - } - end - end - - for _, e in pairs(game.surfaces['island_tiles'].find_entities_filtered({})) do - local distance = math.sqrt(e.position.x ^ 2 + e.position.y ^ 2) - local p = { x = position.x + e.position.x, y = position.y + e.position.y } - if distance <= island_noise_radius(p) then - if e.type == 'simple-entity' then - e.clone({ position = p, surface = surface, force = 'neutral' }) - else - if surface.can_place_entity({ name = 'tree-01', position = p }) then - e.clone({ position = p, surface = surface, force = 'neutral' }) - end - end - end - end - - --local tree = storage.tree_raffle[math.random(1, #storage.tree_raffle)] - local seed = math.random(1, 1000000) - - for _, t in pairs(tiles) do - if math.random(1, 32) == 1 then - local noise = simplex_noise(t.position.x * 0.02, t.position.y * 0.02, seed) - if noise > 0.75 or noise < -0.75 then - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = t.position }) - end - end - - --if surface.can_place_entity({name = "wooden-chest", position = t.position}) then - -- if math.random(1, 64) == 1 then - -- if simplex_noise(t.position.x * 0.02, t.position.y * 0.02, seed) > 0.25 then - -- surface.create_entity({name = tree, position = t.position}) - -- end - -- end - --end - end - - Enemies.add_enemies(surface, tiles) - storage.gamestate = 4 -end - -local function add_path_decoratives(surface, tiles) - local d = storage.decorative_names[math.random(1, #storage.decorative_names)] - for _, t in pairs(tiles) do - local noise = simplex_noise(t.position.x * 0.075, t.position.y * 0.075, game.surfaces[1].map_gen_settings.seed) - if math.random(1, 3) == 1 and noise > 0 then - surface.create_decoratives { check_collision = false, decoratives = { { name = d, position = t.position, amount = math.floor(math.abs(noise * 3)) + 1 } } } - end - end -end - -local draw_path_tile_whitelist = { - ['water'] = true, - ['deepwater'] = true -} - -local path_tile_names = { 'grass-2', 'grass-3', 'grass-4', 'dirt-1', 'dirt-2', 'dirt-3', 'dirt-4', 'dirt-5', 'dirt-6', 'dirt-7', 'water-shallow' } -function draw_path_to_next_stage() - local surface = game.surfaces[1] - - --if storage.current_stage ~= #storage.stages then - -- if storage.current_stage == #storage.stages - 1 then - --game.print("--Final Stage--") - -- else - --game.print("--Stage " .. storage.current_stage .. "--") - -- end - --end - - local position = { x = 0, y = 0 } - if storage.path_tiles then - position = storage.path_tiles[#storage.path_tiles].position - end - --game.print(get_vector()[1] .. " " .. get_vector()[2]) - storage.path_tiles = NoiseVectors.noise_vector_tile_path(surface, path_tile_names[math_random(1, #path_tile_names)], position, get_vector(), storage.stages[storage.current_stage].path_length, math.random(2, 4), draw_path_tile_whitelist) - add_path_decoratives(surface, storage.path_tiles) - - if storage.current_stage ~= #storage.stages and storage.current_stage > 2 then - if math_random(1, 3) == 1 then - add_path_decoratives(surface, NoiseVectors.noise_vector_tile_path(surface, path_tile_names[math_random(1, #path_tile_names - 1)], position, { 0, 1 }, storage.stages[#storage.stages].path_length, math.random(2, 4), draw_path_tile_whitelist)) - end - end - - storage.gamestate = 3 -end - -local tile_reset_blacklist = { - ['deepwater'] = true, - ['out-of-map'] = true -} - -local function get_level_tiles(surface) - storage.level_tiles = {} - for chunk in surface.get_chunks() do - if chunk.y < 0 and game.forces.player.is_chunk_charted(surface, chunk) then - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local tile = surface.get_tile({ chunk.x * 32 + x, chunk.y * 32 + y }) - if not tile_reset_blacklist[tile.name] then - local index = math.abs(tile.position.y) - if not storage.level_tiles[index] then - storage.level_tiles[index] = {} - end - storage.level_tiles[index][#storage.level_tiles[index] + 1] = tile - end - end - end - end - end - for k, _ in pairs(storage.level_tiles) do - table.shuffle_table(storage.level_tiles[k]) - end -end - -local function wipe_vision(surface) - for chunk in surface.get_chunks() do - if chunk.y < 0 then - game.forces.player.unchart_chunk(chunk, surface) - end - end -end - -local particles = { 'coal-particle', 'copper-ore-particle', 'iron-ore-particle', 'stone-particle' } -local function create_particles(surface, position) - local particle = particles[math_random(1, #particles)] - local m = math_random(10, 30) - local m2 = m * 0.005 - for i = 1, 4, 1 do - surface.create_particle( - { - name = particle, - position = position, - frame_speed = 0.1, - vertical_speed = 0.1, - height = 0.1, - movement = { m2 - (math_random(0, m) * 0.01), m2 - (math_random(0, m) * 0.01) } - } - ) - end -end - -function kill_the_level() - local surface = game.surfaces[1] - if not storage.level_tiles then - get_level_tiles(surface) - end - if not storage.kill_the_level_speed then - storage.kill_the_level_speed = 0 - end - storage.kill_the_level_speed = storage.kill_the_level_speed + 0.0025 - local amount = storage.kill_the_level_speed - for i = #storage.level_tiles, 1, -1 do - if storage.level_tiles[i] then - for k, tile in pairs(storage.level_tiles[i]) do - surface.set_tiles({ { name = 'deepwater', position = tile.position } }, true) - create_particles(surface, tile.position) - storage.level_tiles[i][k] = nil - amount = amount - 1 - if amount <= 0 then - return - end - end - storage.level_tiles[i] = nil - end - end - - if #storage.level_tiles == 0 then - wipe_vision(surface) - storage.kill_the_level_speed = nil - storage.level_tiles = nil - storage.gamestate = 1 - end -end - -local function process_tile(surface, position) - if position.x < -128 then - surface.set_tiles({ { name = 'out-of-map', position = position } }, true) - return - end - if position.x > 8192 then - surface.set_tiles({ { name = 'out-of-map', position = position } }, true) - return - end - if position.y < 0 then - surface.set_tiles({ { name = 'deepwater', position = position } }, true) - return - end - if position.y > 32 then - surface.set_tiles({ { name = 'water-green', position = position } }, true) - if math.random(1, 4096) == 1 then - if math.random(1, 4) == 1 then - surface.set_tiles({ { name = 'sand-1', position = position } }, true) - ShoppingChests.create_dump_chest(surface, position, false) - else - surface.set_tiles({ { name = 'sand-1', position = position } }, true) - ShoppingChests.create_shopping_chest(surface, position, false) - end - end - return - end - - if position.y > 10 + simplex_noise(position.x * 0.010, 0, game.surfaces[1].map_gen_settings.seed) * 4 then - surface.set_tiles({ { name = 'water-green', position = position } }, true) - return - end - - local index = math.floor((simplex_noise(position.x * 0.01, position.y * 0.01, game.surfaces[1].map_gen_settings.seed) * 10) % 3) + 1 - surface.set_tiles({ { name = 'sand-' .. index, position = position } }, true) - - if position.x > 32 then - return true - end - - if position.y == 6 then - if position.x == -16 then - ShoppingChests.create_shopping_chest(surface, position, false) - end - if position.x == 16 then - ShoppingChests.create_dump_chest(surface, position, false) - end - end - - return true -end - -local function on_chunk_generated(event) - if event.surface.index ~= 1 then - return - end - local left_top = event.area.left_top - local surface = event.surface - local decoratives = {} - - for k, e in pairs(surface.find_entities_filtered({ area = event.area })) do - if e.force.name ~= 'player' then - e.destroy() - end - end - - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local position = { x = left_top.x + x, y = left_top.y + y } - if process_tile(surface, position) then - local noise = simplex_noise(position.x * 0.050, position.y * 0.050, game.surfaces[1].map_gen_settings.seed) - if math.random(1, 2) == 1 and noise < -0.75 then - decoratives[#decoratives + 1] = { name = 'green-pita', position = position, amount = math.random(1, 3) } - end - if math.random(1, 4) == 1 and noise > 0.50 then - decoratives[#decoratives + 1] = { name = 'garballo', position = position, amount = math.random(1, 3) } - end - if math.random(1, 32) == 1 then - decoratives[#decoratives + 1] = { name = 'sand-dune-decal', position = position, amount = math.random(1, 3) } - end - end - end - end - surface.destroy_decoratives({ area = event.area }) - surface.create_decoratives { check_collision = true, decoratives = decoratives } -end - -local event = require 'utils.event' -event.add(defines.events.on_chunk_generated, on_chunk_generated) diff --git a/maps/junkyard_pvp/gui.lua b/maps/junkyard_pvp/gui.lua deleted file mode 100644 index edd6d7a5a..000000000 --- a/maps/junkyard_pvp/gui.lua +++ /dev/null @@ -1,92 +0,0 @@ -local Public = {} -local Team = require 'maps.junkyard_pvp.team' - -function Public.spectate_button(player) - if player.gui.top.spectate_button then - return - end - local button = player.gui.top.add({type = 'button', name = 'spectate_button', caption = 'Spectate'}) - button.style.font = 'default-bold' - button.style.font_color = {r = 0.0, g = 0.0, b = 0.0} - button.style.minimal_height = 38 - button.style.minimal_width = 38 - button.style.top_padding = 2 - button.style.left_padding = 4 - button.style.right_padding = 4 - button.style.bottom_padding = 2 -end - -local function create_spectate_confirmation(player) - if player.gui.center.spectate_confirmation_frame then - return - end - local frame = player.gui.center.add({type = 'frame', name = 'spectate_confirmation_frame', caption = 'Are you sure you want to spectate this round?'}) - frame.style.font = 'default' - frame.style.font_color = {r = 0.3, g = 0.65, b = 0.3} - frame.add({type = 'button', name = 'confirm_spectate', caption = 'Spectate'}) - frame.add({type = 'button', name = 'cancel_spectate', caption = 'Cancel'}) -end - -function Public.rejoin_question(player) - if player.gui.center.rejoin_question_frame then - return - end - local frame = player.gui.center.add({type = 'frame', name = 'rejoin_question_frame', caption = 'Rejoin the game?'}) - frame.style.font = 'default' - frame.style.font_color = {r = 0.3, g = 0.65, b = 0.3} - frame.add({type = 'button', name = 'confirm_rejoin', caption = 'Rejoin'}) - frame.add({type = 'button', name = 'cancel_rejoin', caption = 'Cancel'}) -end - -local function on_gui_click(event) - if not event then - return - end - if not event.element then - return - end - if not event.element.valid then - return - end - local player = game.players[event.element.player_index] - - if event.element.name == 'confirm_rejoin' then - player.gui.center['rejoin_question_frame'].destroy() - Team.assign_force_to_player(player) - Team.teleport_player_to_active_surface(player) - Team.put_player_into_random_team(player) - game.print(player.name .. ' has rejoined the game!') - return - end - if event.element.name == 'cancel_rejoin' then - player.gui.center['rejoin_question_frame'].destroy() - return - end - - if player.force.name == 'spectator' then - return - end - if event.element.name == 'cancel_spectate' then - player.gui.center['spectate_confirmation_frame'].destroy() - return - end - if event.element.name == 'confirm_spectate' then - player.gui.center['spectate_confirmation_frame'].destroy() - Team.set_player_to_spectator(player) - game.print(player.name .. ' has turned into a spectator ghost.') - return - end - if event.element.name == 'spectate_button' then - if player.gui.center['spectate_confirmation_frame'] then - player.gui.center['spectate_confirmation_frame'].destroy() - else - create_spectate_confirmation(player) - end - return - end -end - -local event = require 'utils.event' -event.add(defines.events.on_gui_click, on_gui_click) - -return Public diff --git a/maps/junkyard_pvp/main.lua b/maps/junkyard_pvp/main.lua deleted file mode 100644 index 385239b36..000000000 --- a/maps/junkyard_pvp/main.lua +++ /dev/null @@ -1,251 +0,0 @@ ---luacheck: ignore -local Gui = require 'utils.gui' -local Map_score = require 'modules.map_score' -local Terrain = require 'maps.junkyard_pvp.terrain' -local MapGui = require 'maps.junkyard_pvp.gui' -require 'maps.junkyard_pvp.surrounded_by_worms' -require 'modules.flashlight_toggle_button' -require 'modules.rocks_heal_over_time' -require 'maps.junkyard_pvp.share_chat' -require 'modules.mineable_wreckage_yields_scrap' -local Team = require 'maps.junkyard_pvp.team' -local Reset = require 'utils.functions.soft_reset' -local Map = require 'modules.map_info' -local math_random = math.random -local Public = {} - -local map_gen_settings = { - ['seed'] = 1, - ['water'] = 1, - ['starting_area'] = 1, - ['cliff_settings'] = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 }, - ['default_enable_all_autoplace_controls'] = false, - ['autoplace_settings'] = { - ['entity'] = { treat_missing_as_default = false }, - ['tile'] = { treat_missing_as_default = false }, - ['decorative'] = { treat_missing_as_default = false } - } -} - -local function set_player_colors() - for _, player in pairs(game.forces.west.players) do - player.color = { 50, 255, 50 } - end - for _, player in pairs(game.forces.east.players) do - player.color = { 50, 50, 255 } - end -end - -function Public.reset_map() - Terrain.create_mirror_surface() - - if not storage.active_surface_index then - storage.active_surface_index = game.create_surface('pvp_junkyard', map_gen_settings).index - else - storage.active_surface_index = Reset.soft_reset_map(game.surfaces[storage.active_surface_index], map_gen_settings, Team.starting_items).index - end - - local surface = game.surfaces[storage.active_surface_index] - - surface.request_to_generate_chunks({ 0, 0 }, 6) - surface.force_generate_chunk_requests() - game.forces.spectator.set_spawn_position({ 0, -128 }, surface) - game.forces.west.set_spawn_position({ -85, 5 }, surface) - game.forces.east.set_spawn_position({ 85, 5 }, surface) - - Team.set_force_attributes() - Team.assign_random_force_to_active_players() - - for _, player in pairs(game.connected_players) do - Team.teleport_player_to_active_surface(player) - end - - for _, player in pairs(game.forces.spectator.connected_players) do - player.character.destroy() - Team.set_player_to_spectator(player) - end - for _, player in pairs(game.forces.spectator.players) do - MapGui.rejoin_question(player) - end - - set_player_colors() -end - -local function on_entity_died(event) - local entity = event.entity - if not entity.valid then - return - end - if storage.game_reset_tick then - return - end - - if entity.name ~= 'cargo-wagon' then - return - end - if entity == storage.map_forces.east.cargo_wagon or entity == storage.map_forces.west.cargo_wagon then - if entity.force.name == 'east' then - game.print('East lost their cargo-wagon.', { 100, 100, 100 }) - game.print(string.upper('>>>> West team has won the game!!! <<<<'), { 250, 120, 0 }) - game.forces.east.play_sound { path = 'utility/game_lost', volume_modifier = 0.85 } - game.forces.west.play_sound { path = 'utility/game_won', volume_modifier = 0.85 } - for _, player in pairs(game.forces.west.connected_players) do - if storage.map_forces.east.player_count > 0 then - Map_score.set_score(player, Map_score.get_score(player) + 1) - end - end - else - game.print('West lost their cargo-wagon.', { 100, 100, 100 }) - game.print(string.upper('>>>> East team has won the game!!! <<<<'), { 250, 120, 0 }) - game.forces.west.play_sound { path = 'utility/game_lost', volume_modifier = 0.85 } - game.forces.east.play_sound { path = 'utility/game_won', volume_modifier = 0.85 } - for _, player in pairs(game.forces.east.connected_players) do - if storage.map_forces.west.player_count > 0 then - Map_score.set_score(player, Map_score.get_score(player) + 1) - end - end - end - - game.print('Next round starting in 60 seconds..', { 150, 150, 150 }) - - for _, player in pairs(game.forces.spectator.connected_players) do - player.play_sound { path = 'utility/game_won', volume_modifier = 0.85 } - end - - storage.game_reset_tick = game.tick + 3600 - game.delete_surface('mirror_terrain') - - for _, player in pairs(game.connected_players) do - for _, child in pairs(player.gui.left.children) do - child.destroy() - end - Gui.call_existing_tab(player, 'Map Scores') - end - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - local surface = game.surfaces[storage.active_surface_index] - - set_player_colors() - MapGui.spectate_button(player) - - if player.surface.index ~= storage.active_surface_index then - if player.force.name == 'spectator' then - Team.set_player_to_spectator(player) - Team.teleport_player_to_active_surface(player) - return - end - Team.assign_force_to_player(player) - Team.teleport_player_to_active_surface(player) - Team.put_player_into_random_team(player) - set_player_colors() - end -end - -local function set_player_spawn_and_refill_fish() - for key, force in pairs(storage.map_forces) do - local cargo_wagon = force.cargo_wagon - if cargo_wagon then - if cargo_wagon.valid then - local surface = cargo_wagon.surface - - --fill fish in cargo wagon - cargo_wagon.get_inventory(defines.inventory.cargo_wagon).insert({ name = 'raw-fish', count = math.random(1, 2) }) - - --set player spawn to cargo wagon position - local position = surface.find_non_colliding_position('stone-furnace', cargo_wagon.position, 16, 2) - if not position then - return - end - game.forces[key].set_spawn_position({ x = position.x, y = position.y }, surface) - - --set fish chart tag - if force.fish_tag then - if force.fish_tag.valid then - force.fish_tag.destroy() - end - end - force.fish_tag = - cargo_wagon.force.add_chart_tag( - surface, - { - icon = { type = 'item', name = 'raw-fish' }, - position = cargo_wagon.position, - text = ' ' - } - ) - end - end - end -end - -local function on_console_command(event) - set_player_colors() -end - -local function tick() - local game_tick = game.tick - if game_tick % 240 == 0 then - local surface = game.surfaces[storage.active_surface_index] - local area = { { -256, -127 }, { 255, 128 } } - game.forces.west.chart(surface, area) - game.forces.east.chart(surface, area) - end - if storage.game_reset_tick then - if storage.game_reset_tick < game_tick then - storage.game_reset_tick = nil - Public.reset_map() - end - return - end - if game_tick % 1800 == 0 then - set_player_spawn_and_refill_fish() - end -end - -local function on_init() - game.difficulty_settings.technology_price_multiplier = 0.25 - game.map_settings.enemy_evolution.destroy_factor = 0 - game.map_settings.enemy_evolution.pollution_factor = 0 - game.map_settings.enemy_evolution.time_factor = 0 - game.map_settings.enemy_expansion.enabled = false - game.map_settings.pollution.enabled = false - storage.map_forces = { - ['west'] = {}, - ['east'] = {} - } - - local T = Map.get_map_information() - T.main_caption = 'Junkyard PVP' - T.sub_caption = 'a playground made of scrap' - T.text = - table.concat( - { - 'The opponent team wants your fish cargo!\n', - '\n', - 'Destroy their cargo wagon to win the round!\n', - '\n' - --"Sometimes you will encounter impassable dark chasms or ponds.\n", - --"Some explosives may cause parts of the ceiling to crumble, filling the void, creating new ways.\n", - --"All they need is a container and a well aimed shot.\n", - } - ) - T.main_caption_color = { r = 150, g = 0, b = 255 } - T.sub_caption_color = { r = 0, g = 250, b = 150 } - - storage.rocks_yield_ore_base_amount = 150 - - Team.create_forces() - Public.reset_map() -end - -local event = require 'utils.event' -event.on_init(on_init) -event.on_nth_tick(60, tick) -event.add(defines.events.on_console_command, on_console_command) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_player_joined_game, on_player_joined_game) - -require 'modules.rocks_yield_ore' diff --git a/maps/junkyard_pvp/share_chat.lua b/maps/junkyard_pvp/share_chat.lua deleted file mode 100644 index 935894340..000000000 --- a/maps/junkyard_pvp/share_chat.lua +++ /dev/null @@ -1,30 +0,0 @@ -----------share chat with spectator force------------------- -local function on_console_chat(event) - if not event.message then - return - end - if not event.player_index then - return - end - local player = game.players[event.player_index] - - local color = player.color - color.r = color.r * 0.6 + 0.35 - color.g = color.g * 0.6 + 0.35 - color.b = color.b * 0.6 + 0.35 - color.a = 1 - - if player.force.name == 'west' then - game.forces.spectator.print(player.name .. ' (west): ' .. event.message, color) - end - if player.force.name == 'east' then - game.forces.spectator.print(player.name .. ' (east): ' .. event.message, color) - end - if player.force.name == 'spectator' then - game.forces.west.print(player.name .. ' (spectator): ' .. event.message, color) - game.forces.east.print(player.name .. ' (spectator): ' .. event.message, color) - end -end - -local event = require 'utils.event' -event.add(defines.events.on_console_chat, on_console_chat) diff --git a/maps/junkyard_pvp/surrounded_by_worms.lua b/maps/junkyard_pvp/surrounded_by_worms.lua deleted file mode 100644 index ddb41da02..000000000 --- a/maps/junkyard_pvp/surrounded_by_worms.lua +++ /dev/null @@ -1,45 +0,0 @@ -local Event = require 'utils.event' -local math_random = math.random -local turrets = { - [1] = 'small-worm-turret', - [2] = 'medium-worm-turret', - [3] = 'big-worm-turret', - [4] = 'behemoth-worm-turret' -} - -local tile_coords = {} -for x = 0, 31, 1 do - for y = 0, 31, 1 do - tile_coords[#tile_coords + 1] = {x, y} - end -end - -local function on_chunk_generated(event) - local surface = event.surface - if surface.name ~= 'mirror_terrain' then - return - end - local starting_distance = surface.map_gen_settings.starting_area * 200 - local left_top = event.area.left_top - local chunk_distance_to_center = math.sqrt(left_top.x ^ 2 + left_top.y ^ 2) - if starting_distance > chunk_distance_to_center then - return - end - - local highest_worm_tier = math.floor((chunk_distance_to_center - starting_distance) * 0.0025) + 1 - if highest_worm_tier > 4 then - highest_worm_tier = 4 - end - - for _ = 1, 4, 1 do - local coord_modifier = tile_coords[math_random(1, #tile_coords)] - local pos = {left_top.x + coord_modifier[1], left_top.y + coord_modifier[2]} - local name = turrets[math_random(1, highest_worm_tier)] - local position = surface.find_non_colliding_position('big-worm-turret', pos, 8, 1) - if position then - surface.create_entity({name = name, position = position, force = 'enemy'}) - end - end -end - -Event.add(defines.events.on_chunk_generated, on_chunk_generated) diff --git a/maps/junkyard_pvp/team.lua b/maps/junkyard_pvp/team.lua deleted file mode 100644 index 5af109805..000000000 --- a/maps/junkyard_pvp/team.lua +++ /dev/null @@ -1,108 +0,0 @@ -local Public = {} -local math_random = math.random - -Public.starting_items = { ['pistol'] = 1, ['firearm-magazine'] = 16, ['rail'] = 16 } - -function Public.set_force_attributes() - game.forces.west.set_friend('spectator', true) - game.forces.east.set_friend('spectator', true) - game.forces.spectator.set_friend('west', true) - game.forces.spectator.set_friend('east', true) - game.forces.west.share_chart = true - game.forces.east.share_chart = true - for _, force_name in pairs({ 'west', 'east' }) do - game.forces[force_name].technologies['artillery'].enabled = false - game.forces[force_name].technologies['artillery-shell-range-1'].enabled = false - game.forces[force_name].technologies['artillery-shell-speed-1'].enabled = false - game.forces[force_name].technologies['railway'].researched = true - storage.map_forces[force_name].unit_health_boost = 1 - storage.map_forces[force_name].unit_count = 0 - storage.map_forces[force_name].max_unit_count = 1024 - storage.map_forces[force_name].player_count = 0 - end -end - -function Public.create_forces() - game.create_force('west') - game.create_force('east') - game.create_force('spectator') -end - -function Public.assign_random_force_to_active_players() - local player_indexes = {} - for _, player in pairs(game.connected_players) do - if player.force.name ~= 'spectator' then - player_indexes[#player_indexes + 1] = player.index - end - end - if #player_indexes > 1 then - table.shuffle_table(player_indexes) - end - local a = math_random(0, 1) - for key, player_index in pairs(player_indexes) do - if key % 2 == a then - game.players[player_index].force = game.forces.west - else - game.players[player_index].force = game.forces.east - end - end -end - -function Public.assign_force_to_player(player) - player.spectator = false - if math_random(1, 2) == 1 then - if #game.forces.east.connected_players > #game.forces.west.connected_players then - player.force = game.forces.west - else - player.force = game.forces.east - end - else - if #game.forces.east.connected_players < #game.forces.west.connected_players then - player.force = game.forces.east - else - player.force = game.forces.west - end - end -end - -function Public.teleport_player_to_active_surface(player) - local surface = game.surfaces[storage.active_surface_index] - local position - if player.force.name == 'spectator' then - position = player.force.get_spawn_position(surface) - position = { x = (position.x - 160) + math_random(0, 320), y = (position.y - 16) + math_random(0, 32) } - else - position = surface.find_non_colliding_position('character', player.force.get_spawn_position(surface), 48, 1) - if not position then - position = player.force.get_spawn_position(surface) - end - end - player.teleport(position, surface) -end - -function Public.put_player_into_random_team(player) - if player.character then - if player.character.valid then - player.character.destroy() - end - end - player.character = nil - player.set_controller({ type = defines.controllers.god }) - player.create_character() - for item, amount in pairs(Public.starting_items) do - player.insert({ name = item, count = amount }) - end - storage.map_forces[player.force.name].player_count = storage.map_forces[player.force.name].player_count + 1 -end - -function Public.set_player_to_spectator(player) - if player.character then - player.character.die() - end - player.force = game.forces.spectator - player.character = nil - player.spectator = true - player.set_controller({ type = defines.controllers.spectator }) -end - -return Public diff --git a/maps/junkyard_pvp/terrain.lua b/maps/junkyard_pvp/terrain.lua deleted file mode 100644 index 1aab169a8..000000000 --- a/maps/junkyard_pvp/terrain.lua +++ /dev/null @@ -1,356 +0,0 @@ ---luacheck: ignore -local math_abs = math.abs -local math_random = math.random -local math_floor = math.floor -local Treasure = require 'maps.junkyard_pvp.treasure' -local Map_functions = require 'utils.tools.map_functions' -local simplex_noise = require 'utils.math.simplex_noise'.d2 -local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' } -local spawner_raffle = { 'biter-spawner', 'biter-spawner', 'biter-spawner', 'spitter-spawner' } -local noises = { - ['no_rocks'] = { { modifier = 0.0033, weight = 1 }, { modifier = 0.01, weight = 0.22 }, { modifier = 0.05, weight = 0.05 }, { modifier = 0.1, weight = 0.04 } }, - ['no_rocks_2'] = { { modifier = 0.013, weight = 1 }, { modifier = 0.1, weight = 0.1 } }, - ['large_caves'] = { { modifier = 0.0033, weight = 1 }, { modifier = 0.01, weight = 0.22 }, { modifier = 0.05, weight = 0.05 }, { modifier = 0.1, weight = 0.04 } }, - ['small_caves'] = { { modifier = 0.008, weight = 1 }, { modifier = 0.03, weight = 0.15 }, { modifier = 0.25, weight = 0.05 } }, - ['small_caves_2'] = { { modifier = 0.009, weight = 1 }, { modifier = 0.05, weight = 0.25 }, { modifier = 0.25, weight = 0.05 } }, - ['cave_ponds'] = { { modifier = 0.01, weight = 1 }, { modifier = 0.1, weight = 0.06 } }, - ['cave_rivers'] = { { modifier = 0.005, weight = 1 }, { modifier = 0.01, weight = 0.25 }, { modifier = 0.05, weight = 0.01 } }, - ['cave_rivers_2'] = { { modifier = 0.003, weight = 1 }, { modifier = 0.01, weight = 0.21 }, { modifier = 0.05, weight = 0.01 } }, - ['cave_rivers_3'] = { { modifier = 0.002, weight = 1 }, { modifier = 0.01, weight = 0.15 }, { modifier = 0.05, weight = 0.01 } }, - ['cave_rivers_4'] = { { modifier = 0.001, weight = 1 }, { modifier = 0.01, weight = 0.11 }, { modifier = 0.05, weight = 0.01 } }, - ['scrapyard'] = { { modifier = 0.005, weight = 1 }, { modifier = 0.01, weight = 0.35 }, { modifier = 0.05, weight = 0.23 }, { modifier = 0.1, weight = 0.11 } } -} -local cargo_wagon_position = { x = 86, y = 0 } -local Public = {} - -local function get_noise(name, pos, seed) - local noise = 0 - local d = 0 - for _, n in pairs(noises[name]) do - noise = noise + simplex_noise(pos.x * n.modifier, pos.y * n.modifier, seed) * n.weight - d = d + n.weight - seed = seed + 10000 - end - noise = noise / d - return noise -end - -local function create_objectives(surface) - local d = 6 - - for key, modifier in pairs({ west = -1, east = 1 }) do - for x = -6, 6, 2 do - surface.create_entity({ name = 'straight-rail', position = { (cargo_wagon_position.x + x) * modifier, cargo_wagon_position.y }, force = key, direction = 2 }) - end - local e = surface.create_entity({ name = 'locomotive', position = { (cargo_wagon_position.x + 3) * modifier, cargo_wagon_position.y }, force = key, direction = d }) - e.color = { 0, 255, 0 } - if key == 'east' then - e.color = { 0, 0, 255 } - end - e.get_inventory(defines.inventory.fuel).insert({ name = 'wood', count = 50 }) - local e = surface.create_entity({ name = 'cargo-wagon', position = { (cargo_wagon_position.x - 3) * modifier, cargo_wagon_position.y }, force = key }) - e.minable = false - storage.map_forces[key].cargo_wagon = e - d = d - 4 - end -end - -function Public.create_mirror_surface() - if game.surfaces['mirror_terrain'] then - return - end - - local map_gen_settings = {} - map_gen_settings.seed = math_random(1, 99999999) - map_gen_settings.water = 0.2 - map_gen_settings.starting_area = 1.5 - map_gen_settings.terrain_segmentation = 8 - map_gen_settings.cliff_settings = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 } - map_gen_settings.autoplace_controls = { - ['coal'] = { frequency = 10, size = 0.6, richness = 0.5 }, - ['stone'] = { frequency = 10, size = 0.6, richness = 0.5 }, - ['copper-ore'] = { frequency = 20, size = 0.6, richness = 0.75 }, - ['iron-ore'] = { frequency = 20, size = 0.6, richness = 1 }, - ['uranium-ore'] = { frequency = 5, size = 0.5, richness = 0.5 }, - ['crude-oil'] = { frequency = 10, size = 1, richness = 1 }, - ['trees'] = { frequency = math_random(5, 15) * 0.1, size = math_random(4, 8) * 0.1, richness = 0.1 }, - ['enemy-base'] = { frequency = 0, size = 0, richness = 0 } - } - local surface = game.create_surface('mirror_terrain', map_gen_settings) - - local x = cargo_wagon_position.x - 16 - local offset = 38 - - surface.request_to_generate_chunks({ x, 0 }, 5) - surface.force_generate_chunk_requests() - - local r = 15 - for x = r * -1, r, 1 do - for y = r * -1, r, 1 do - local p = { x = cargo_wagon_position.x + x, y = cargo_wagon_position.y + y } - if math.sqrt(x ^ 2 + y ^ 2) < r then - local tile = surface.get_tile(p) - if tile.collides_with('resource') then - surface.set_tiles({ { name = 'landfill', position = p } }, true) - end - end - end - end - for _, e in pairs(surface.find_entities_filtered({ area = { { cargo_wagon_position.x - r, cargo_wagon_position.y - r }, { cargo_wagon_position.x + r, cargo_wagon_position.y + r } }, force = { 'neutral', 'enemy' } })) do - if math.sqrt(e.position.x ^ 2 + e.position.y ^ 2) < r then - e.destroy() - end - end -end - -local function mirror_chunk(event, source_surface, x_modifier) - local surface = event.surface - local left_top = event.area.left_top - local offset = 0 - if x_modifier == -1 then - offset = 32 - end - local mirror_left_top = { x = left_top.x * x_modifier - offset, y = left_top.y * x_modifier - offset } - - source_surface.request_to_generate_chunks(mirror_left_top, 1) - source_surface.force_generate_chunk_requests() - - local mirror_area = { { mirror_left_top.x, mirror_left_top.y }, { mirror_left_top.x + 32, mirror_left_top.y + 32 } } - - for _, tile in pairs(source_surface.find_tiles_filtered({ area = mirror_area })) do - surface.set_tiles({ { name = tile.name, position = { x = tile.position.x * x_modifier, y = tile.position.y * x_modifier } } }, true) - end - for _, entity in pairs(source_surface.find_entities_filtered({ area = mirror_area })) do - --if surface.can_place_entity({name = entity.name, position = {x = entity.position.x * x_modifier, y = entity.position.y * x_modifier}}) then - entity.clone({ position = { x = entity.position.x * x_modifier, y = entity.position.y * x_modifier }, surface = surface }) - --end - end - for _, decorative in pairs(source_surface.find_decoratives_filtered { area = mirror_area }) do - surface.create_decoratives { - check_collision = false, - decoratives = { - { name = decorative.decorative.name, position = { x = decorative.position.x * x_modifier, y = decorative.position.y * x_modifier }, amount = decorative.amount } - } - } - end -end - -local scrap_entities = { - 'crash-site-assembling-machine-1-broken', - 'crash-site-assembling-machine-2-broken', - 'crash-site-assembling-machine-1-broken', - 'crash-site-assembling-machine-2-broken', - 'crash-site-lab-broken', - 'crash-site-spaceship-wreck-medium-1', - 'crash-site-spaceship-wreck-medium-1', - 'crash-site-spaceship-wreck-medium-2', - 'crash-site-spaceship-wreck-medium-2', - 'crash-site-chest-1', - 'crash-site-chest-2', - 'crash-site-chest-1', - 'crash-site-chest-2', - 'crash-site-chest-1', - 'crash-site-chest-2', - 'crash-site-chest-1', - 'crash-site-chest-2', - 'crash-site-chest-1', - 'crash-site-chest-2' -} -local scrap_entities_index = #scrap_entities - ---SCRAPYARD -local function process_junk_position(p, seed, tiles, entities, markets, treasure) - local scrapyard = get_noise('scrapyard', p, seed) - - if p.x < 5 + scrapyard * 3 then - tiles[#tiles + 1] = { name = 'water-shallow', position = p } - return - end - if p.x < cargo_wagon_position.x + 16 + scrapyard * 32 then - return - end - --Chasms - local noise_cave_ponds = get_noise('cave_ponds', p, seed) - local small_caves = get_noise('small_caves', p, seed) - if noise_cave_ponds < 0.15 and noise_cave_ponds > -0.15 then - if small_caves > 0.35 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - if small_caves < -0.35 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - end - - if scrapyard < -0.25 or scrapyard > 0.25 then - if math_random(1, 1024) == 1 then - entities[#entities + 1] = { name = 'gun-turret', position = p, force = 'enemy' } - end - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if scrapyard < -0.65 or scrapyard > 0.65 then - if math_random(1, 5) > 1 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, #rock_raffle)], position = p } - end - return - end - if scrapyard < -0.28 or scrapyard > 0.28 then - --if math_random(1,2048) == 1 then - --entities[#entities + 1] = {name = "small-worm-turret", position = p, force = "enemy"} - --end - if math_random(1, 96) == 1 then - entities[#entities + 1] = { name = scrap_entities[math_random(1, scrap_entities_index)], position = p, force = 'enemy' } - end - if math_random(1, 3) > 1 then - entities[#entities + 1] = { name = 'mineable-wreckage', position = p } - end - return - end - return - end - - local cave_ponds = get_noise('cave_ponds', p, seed) - if cave_ponds < -0.6 and scrapyard > -0.2 and scrapyard < 0.2 then - tiles[#tiles + 1] = { name = 'deepwater-green', position = p } - if math_random(1, 128) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - - local large_caves = get_noise('large_caves', p, seed) - if scrapyard > -0.15 and scrapyard < 0.15 then - if math_floor(large_caves * 10) % 4 < 1 then - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 2) > 1 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, #rock_raffle)], position = p } - end - return - end - end - - if noise_cave_ponds < 0.7 then - return - end - tiles[#tiles + 1] = { name = 'stone-path', position = p } -end - -local function is_out_of_map(p) - if p.y < 96 and p.y >= -96 then - return - end - if (p.x + 128) * 0.4 >= math_abs(p.y) then - return - end - if (p.x - 128) * -0.4 > math_abs(p.y) then - return - end - return true -end - -local function out_of_map_area(event) - local surface = event.surface - local left_top = event.area.left_top - for x = -1, 32, 1 do - for y = -1, 32, 1 do - local p = { x = left_top.x + x, y = left_top.y + y } - if is_out_of_map(p) then - surface.set_tiles({ { name = 'out-of-map', position = p } }, true) - end - end - end -end - -local function process_main_surface(event) - local source_surface = game.surfaces['mirror_terrain'] - if not source_surface then - return - end - if not source_surface.valid then - return - end - if event.surface.index == source_surface.index then - return - end - - local left_top = event.area.left_top - - if left_top.x >= 0 then - mirror_chunk(event, source_surface, 1) - else - mirror_chunk(event, source_surface, -1) - end - - out_of_map_area(event) - - if left_top.x == -160 and left_top.y == -160 then - create_objectives(event.surface) - end - - --game.forces.west.chart(event.surface, {{left_top.x, left_top.y},{left_top.x + 31, left_top.y + 31}}) - --game.forces.east.chart(event.surface, {{left_top.x, left_top.y},{left_top.x + 31, left_top.y + 31}}) - - return true -end - -local entity_functions = { - ['turret'] = function (surface, entity) - surface.create_entity(entity) - end, - ['simple-entity'] = function (surface, entity) - surface.create_entity(entity) - end, - ['ammo-turret'] = function (surface, entity) - local e = surface.create_entity(entity) - e.insert({ name = 'firearm-magazine', count = math_random(16, 64) }) - end, - ['container'] = function (surface, entity) - Treasure(surface, entity.position, entity.name) - end -} - -local function process_mirror_surface(event) - local surface = event.surface - local left_top = event.area.left_top - local tiles = {} - local entities = {} - local treasure = {} - local seed = surface.map_gen_settings.seed - for y = 0, 31, 1 do - for x = 0, 31, 1 do - local p = { x = left_top.x + x, y = left_top.y + y } - process_junk_position(p, seed, tiles, entities, treasure) - end - end - surface.set_tiles(tiles, true) - - for _, p in pairs(treasure) do - local name = 'wooden-chest' - if math_random(1, 6) == 1 then - name = 'iron-chest' - end - Treasure(surface, p, name) - end - - for _, entity in pairs(entities) do - if entity_functions[prototypes.entity[entity.name].type] then - entity_functions[prototypes.entity[entity.name].type](surface, entity) - else - if surface.can_place_entity(entity) then - surface.create_entity(entity) - end - end - end -end - -local function on_chunk_generated(event) - if process_main_surface(event) then - return - end - process_mirror_surface(event) -end - -local event = require 'utils.event' -event.add(defines.events.on_chunk_generated, on_chunk_generated) - -return Public diff --git a/maps/junkyard_pvp/treasure.lua b/maps/junkyard_pvp/treasure.lua deleted file mode 100644 index ea6fab0cd..000000000 --- a/maps/junkyard_pvp/treasure.lua +++ /dev/null @@ -1,174 +0,0 @@ -local math_random = math.random - -local Public = {} - -function Public.treasure_chest(surface, position, container_name) - local chest_raffle = {} - local chest_loot = { - { { name = 'submachine-gun', count = math_random(1, 3) }, weight = 3, d_min = 0.0, d_max = 0.1 }, - { { name = 'slowdown-capsule', count = math_random(16, 32) }, weight = 1, d_min = 0.3, d_max = 0.7 }, - { { name = 'poison-capsule', count = math_random(8, 16) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, d_min = 0.6, d_max = 1 }, - { { name = 'cannon-shell', count = math_random(16, 32) }, weight = 5, d_min = 0.4, d_max = 0.7 }, - { { name = 'explosive-uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, d_min = 0.6, d_max = 1 }, - { { name = 'explosive-cannon-shell', count = math_random(16, 32) }, weight = 5, d_min = 0.4, d_max = 0.8 }, - { { name = 'shotgun', count = 1 }, weight = 2, d_min = 0.0, d_max = 0.2 }, - { { name = 'shotgun-shell', count = math_random(16, 32) }, weight = 5, d_min = 0.0, d_max = 0.2 }, - { { name = 'combat-shotgun', count = 1 }, weight = 3, d_min = 0.3, d_max = 0.8 }, - { { name = 'piercing-shotgun-shell', count = math_random(16, 32) }, weight = 10, d_min = 0.2, d_max = 1 }, - { { name = 'flamethrower', count = 1 }, weight = 3, d_min = 0.3, d_max = 0.6 }, - { { name = 'flamethrower-ammo', count = math_random(16, 32) }, weight = 5, d_min = 0.3, d_max = 1 }, - { { name = 'rocket-launcher', count = 1 }, weight = 3, d_min = 0.2, d_max = 0.6 }, - { { name = 'rocket', count = math_random(16, 32) }, weight = 5, d_min = 0.2, d_max = 0.7 }, - { { name = 'explosive-rocket', count = math_random(16, 32) }, weight = 5, d_min = 0.3, d_max = 1 }, - { { name = 'land-mine', count = math_random(16, 32) }, weight = 5, d_min = 0.2, d_max = 0.7 }, - { { name = 'grenade', count = math_random(8, 16) }, weight = 5, d_min = 0.0, d_max = 0.5 }, - { { name = 'cluster-grenade', count = math_random(8, 16) }, weight = 5, d_min = 0.4, d_max = 1 }, - { { name = 'firearm-magazine', count = math_random(32, 128) }, weight = 5, d_min = 0, d_max = 0.3 }, - { { name = 'piercing-rounds-magazine', count = math_random(32, 128) }, weight = 5, d_min = 0.1, d_max = 0.8 }, - { { name = 'uranium-rounds-magazine', count = math_random(32, 128) }, weight = 5, d_min = 0.5, d_max = 1 }, - { { name = 'railgun', count = 1 }, weight = 1, d_min = 0.2, d_max = 1 }, - { { name = 'railgun-dart', count = math_random(16, 32) }, weight = 3, d_min = 0.2, d_max = 0.7 }, - { { name = 'defender-capsule', count = math_random(8, 16) }, weight = 2, d_min = 0.0, d_max = 0.7 }, - { { name = 'distractor-capsule', count = math_random(8, 16) }, weight = 2, d_min = 0.2, d_max = 1 }, - { { name = 'destroyer-capsule', count = math_random(8, 16) }, weight = 2, d_min = 0.3, d_max = 1 }, - { { name = 'atomic-bomb', count = 1 }, weight = 1, d_min = 0.8, d_max = 1 }, - { { name = 'light-armor', count = 1 }, weight = 3, d_min = 0, d_max = 0.1 }, - { { name = 'heavy-armor', count = 1 }, weight = 3, d_min = 0.1, d_max = 0.3 }, - { { name = 'modular-armor', count = 1 }, weight = 2, d_min = 0.2, d_max = 0.6 }, - { { name = 'power-armor', count = 1 }, weight = 1, d_min = 0.4, d_max = 1 }, - --{{name = "power-armor-mk2", count = 1}, weight = 1, d_min = 0.9, d_max = 1}, - { { name = 'battery-equipment', count = 1 }, weight = 2, d_min = 0.3, d_max = 0.7 }, - --{{name = "battery-mk2-equipment", count = 1}, weight = 2, d_min = 0.7, d_max = 1}, - { { name = 'belt-immunity-equipment', count = 1 }, weight = 1, d_min = 0.5, d_max = 1 }, - { { name = 'solar-panel-equipment', count = math_random(1, 4) }, weight = 5, d_min = 0.4, d_max = 0.8 }, - { { name = 'discharge-defense-equipment', count = 1 }, weight = 1, d_min = 0.5, d_max = 1 }, - { { name = 'energy-shield-equipment', count = math_random(1, 2) }, weight = 2, d_min = 0.3, d_max = 0.8 }, - --{{name = "energy-shield-mk2-equipment", count = 1}, weight = 2, d_min = 0.8, d_max = 1}, - { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, d_min = 0.3, d_max = 1 }, - --{{name = "fusion-reactor-equipment", count = 1}, weight = 1, d_min = 0.8, d_max = 1}, - { { name = 'night-vision-equipment', count = 1 }, weight = 1, d_min = 0.3, d_max = 0.8 }, - { { name = 'personal-laser-defense-equipment', count = 1 }, weight = 1, d_min = 0.7, d_max = 1 }, - { { name = 'personal-roboport-equipment', count = math_random(1, 2) }, weight = 3, d_min = 0.4, d_max = 1 }, - --{{name = "personal-roboport-mk2-equipment", count = 1}, weight = 1, d_min = 0.9, d_max = 1}, - { { name = 'logistic-robot', count = math_random(5, 25) }, weight = 2, d_min = 0.5, d_max = 1 }, - { { name = 'construction-robot', count = math_random(5, 25) }, weight = 5, d_min = 0.4, d_max = 1 }, - { { name = 'iron-gear-wheel', count = math_random(80, 100) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'copper-cable', count = math_random(100, 200) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'engine-unit', count = math_random(16, 32) }, weight = 2, d_min = 0.1, d_max = 0.5 }, - { { name = 'electric-engine-unit', count = math_random(16, 32) }, weight = 2, d_min = 0.4, d_max = 0.8 }, - { { name = 'battery', count = math_random(50, 150) }, weight = 2, d_min = 0.3, d_max = 0.8 }, - { { name = 'advanced-circuit', count = math_random(50, 150) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'electronic-circuit', count = math_random(50, 150) }, weight = 4, d_min = 0.0, d_max = 0.4 }, - { { name = 'processing-unit', count = math_random(50, 150) }, weight = 3, d_min = 0.7, d_max = 1 }, - --{{name = "explosives", count = math_random(25,50)}, weight = 1, d_min = 0.0, d_max = 1}, - { { name = 'lubricant-barrel', count = math_random(4, 10) }, weight = 1, d_min = 0.3, d_max = 0.5 }, - { { name = 'rocket-fuel', count = math_random(4, 10) }, weight = 2, d_min = 0.3, d_max = 0.7 }, - --{{name = "computer", count = 1}, weight = 2, d_min = 0, d_max = 1}, - - { { name = 'efficiency-module', count = math_random(1, 4) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'productivity-module', count = math_random(1, 4) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'speed-module', count = math_random(1, 4) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'automation-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.0, d_max = 0.2 }, - { { name = 'logistic-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.1, d_max = 0.5 }, - { { name = 'military-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.2, d_max = 1 }, - { { name = 'chemical-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'production-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.4, d_max = 1 }, - { { name = 'utility-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'space-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.9, d_max = 1 }, - { { name = 'steel-plate', count = math_random(25, 75) }, weight = 2, d_min = 0.1, d_max = 0.3 }, - { { name = 'nuclear-fuel', count = 1 }, weight = 2, d_min = 0.7, d_max = 1 }, - { { name = 'burner-inserter', count = math_random(8, 16) }, weight = 3, d_min = 0.0, d_max = 0.1 }, - { { name = 'inserter', count = math_random(8, 16) }, weight = 3, d_min = 0.0, d_max = 0.4 }, - { { name = 'long-handed-inserter', count = math_random(8, 16) }, weight = 3, d_min = 0.0, d_max = 0.4 }, - { { name = 'fast-inserter', count = math_random(8, 16) }, weight = 3, d_min = 0.1, d_max = 1 }, - { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 1, d_min = 0.4, d_max = 1 }, - { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'small-electric-pole', count = math_random(16, 24) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'medium-electric-pole', count = math_random(8, 16) }, weight = 3, d_min = 0.2, d_max = 1 }, - { { name = 'big-electric-pole', count = math_random(4, 8) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'substation', count = math_random(2, 4) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'wooden-chest', count = math_random(8, 16) }, weight = 3, d_min = 0.0, d_max = 0.2 }, - { { name = 'iron-chest', count = math_random(8, 16) }, weight = 3, d_min = 0.1, d_max = 0.4 }, - { { name = 'steel-chest', count = math_random(8, 16) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'small-lamp', count = math_random(16, 32) }, weight = 3, d_min = 0.1, d_max = 0.3 }, - { { name = 'rail', count = math_random(25, 75) }, weight = 3, d_min = 0.1, d_max = 0.6 }, - { { name = 'assembling-machine-1', count = math_random(2, 4) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'assembling-machine-2', count = math_random(2, 4) }, weight = 3, d_min = 0.2, d_max = 0.8 }, - { { name = 'assembling-machine-3', count = math_random(2, 4) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'accumulator', count = math_random(4, 8) }, weight = 3, d_min = 0.4, d_max = 1 }, - { { name = 'offshore-pump', count = math_random(1, 3) }, weight = 2, d_min = 0.0, d_max = 0.2 }, - { { name = 'beacon', count = 1 }, weight = 2, d_min = 0.7, d_max = 1 }, - { { name = 'boiler', count = math_random(3, 6) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'steam-engine', count = math_random(2, 4) }, weight = 3, d_min = 0.0, d_max = 0.5 }, - { { name = 'steam-turbine', count = math_random(1, 2) }, weight = 2, d_min = 0.6, d_max = 1 }, - { { name = 'nuclear-reactor', count = 1 }, weight = 1, d_min = 0.7, d_max = 1 }, - { { name = 'centrifuge', count = 1 }, weight = 1, d_min = 0.6, d_max = 1 }, - { { name = 'heat-pipe', count = math_random(4, 8) }, weight = 2, d_min = 0.5, d_max = 1 }, - { { name = 'heat-exchanger', count = math_random(2, 4) }, weight = 2, d_min = 0.5, d_max = 1 }, - { { name = 'arithmetic-combinator', count = math_random(4, 8) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'constant-combinator', count = math_random(4, 8) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'decider-combinator', count = math_random(4, 8) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'power-switch', count = 1 }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'programmable-speaker', count = math_random(2, 4) }, weight = 1, d_min = 0.1, d_max = 1 }, - { { name = 'chemical-plant', count = math_random(1, 3) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'burner-mining-drill', count = math_random(2, 4) }, weight = 3, d_min = 0.0, d_max = 0.2 }, - { { name = 'electric-mining-drill', count = math_random(2, 4) }, weight = 3, d_min = 0.2, d_max = 1 }, - { { name = 'express-transport-belt', count = math_random(25, 75) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'express-underground-belt', count = math_random(4, 8) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'express-splitter', count = math_random(1, 4) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'fast-transport-belt', count = math_random(25, 75) }, weight = 3, d_min = 0.2, d_max = 0.7 }, - { { name = 'fast-underground-belt', count = math_random(4, 8) }, weight = 3, d_min = 0.2, d_max = 0.7 }, - { { name = 'fast-splitter', count = math_random(1, 4) }, weight = 3, d_min = 0.2, d_max = 0.3 }, - { { name = 'transport-belt', count = math_random(25, 75) }, weight = 3, d_min = 0, d_max = 0.3 }, - { { name = 'underground-belt', count = math_random(4, 8) }, weight = 3, d_min = 0, d_max = 0.3 }, - { { name = 'splitter', count = math_random(1, 4) }, weight = 3, d_min = 0, d_max = 0.3 }, - --{{name = "oil-refinery", count = math_random(2,4)}, weight = 2, d_min = 0.3, d_max = 1}, - { { name = 'pipe', count = math_random(30, 50) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'pipe-to-ground', count = math_random(4, 8) }, weight = 1, d_min = 0.2, d_max = 0.5 }, - { { name = 'pumpjack', count = math_random(1, 3) }, weight = 1, d_min = 0.3, d_max = 0.8 }, - { { name = 'pump', count = math_random(1, 2) }, weight = 1, d_min = 0.3, d_max = 0.8 }, - { { name = 'solar-panel', count = math_random(3, 6) }, weight = 3, d_min = 0.4, d_max = 0.9 }, - { { name = 'electric-furnace', count = math_random(2, 4) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'steel-furnace', count = math_random(4, 8) }, weight = 3, d_min = 0.2, d_max = 0.7 }, - { { name = 'stone-furnace', count = math_random(8, 16) }, weight = 3, d_min = 0.0, d_max = 0.2 }, - { { name = 'radar', count = math_random(1, 2) }, weight = 1, d_min = 0.1, d_max = 0.4 }, - { { name = 'rail-signal', count = math_random(8, 16) }, weight = 2, d_min = 0.2, d_max = 0.8 }, - { { name = 'rail-chain-signal', count = math_random(8, 16) }, weight = 2, d_min = 0.2, d_max = 0.8 }, - { { name = 'stone-wall', count = math_random(33, 99) }, weight = 3, d_min = 0.0, d_max = 0.7 }, - { { name = 'gate', count = math_random(16, 32) }, weight = 3, d_min = 0.0, d_max = 0.7 }, - { { name = 'storage-tank', count = math_random(2, 6) }, weight = 3, d_min = 0.3, d_max = 0.6 }, - { { name = 'train-stop', count = math_random(1, 2) }, weight = 1, d_min = 0.2, d_max = 0.7 }, - { { name = 'express-loader', count = math_random(1, 2) }, weight = 1, d_min = 0.5, d_max = 1 }, - { { name = 'fast-loader', count = math_random(1, 2) }, weight = 1, d_min = 0.2, d_max = 0.7 }, - { { name = 'loader', count = math_random(1, 2) }, weight = 1, d_min = 0.0, d_max = 0.5 }, - { { name = 'lab', count = math_random(1, 2) }, weight = 2, d_min = 0.0, d_max = 0.3 }, - { { name = 'roboport', count = 1 }, weight = 2, d_min = 0.8, d_max = 1 }, - { { name = 'flamethrower-turret', count = 1 }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'laser-turret', count = math_random(3, 6) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'gun-turret', count = math_random(2, 4) }, weight = 3, d_min = 0.2, d_max = 0.9 } - } - - local distance_to_center = (math.abs(position.x) + 1) * 0.0002 - if distance_to_center > 1 then - distance_to_center = 1 - end - - for _, t in pairs(chest_loot) do - for _ = 1, t.weight, 1 do - if t.d_min <= distance_to_center and t.d_max >= distance_to_center then - table.insert(chest_raffle, t[1]) - end - end - end - - local e = surface.create_entity({ name = container_name, position = position, force = 'neutral' }) - e.minable = false - local i = e.get_inventory(defines.inventory.chest) - for _ = 1, math_random(2, 6), 1 do - local loot = chest_raffle[math_random(1, #chest_raffle)] - i.insert(loot) - end -end - -return Public.treasure_chest diff --git a/maps/labyrinth.lua b/maps/labyrinth.lua index c88a158e9..9e421d0c1 100644 --- a/maps/labyrinth.lua +++ b/maps/labyrinth.lua @@ -1,5 +1,10 @@ --labyrinth-- mewmew made this -- -- modified by gerkiz + +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + require 'maps.labyrinth_map_intro' require 'modules.teleporters' require 'modules.satellite_score' @@ -15,8 +20,10 @@ local unique_rooms = require 'maps.labyrinth_unique_rooms' local SoftReset = require 'utils.functions.soft_reset' local Autostash = require 'modules.autostash' local BottomFrame = require 'utils.gui.bottom_frame' -local this = { - settings = { +local this = +{ + settings = + { labyrinth_size = 1, surface_index = 1, check_landfill = true @@ -33,7 +40,8 @@ Global.register( local labyrinth_difficulty_curve = 333 --- How much size the labyrinth needs to have the highest difficulty. local mapkeeper = '[color=blue]Mapkeeper:[/color]' -local threat_values = { +local threat_values = +{ ['small-biter'] = 1, ['medium-biter'] = 3, ['big-biter'] = 5, @@ -92,7 +100,8 @@ end local function is_chunk_allowed_to_grow(chunk_position, surface) local pos_x = chunk_position.x * 32 local pos_y = chunk_position.y * 32 - local area = { + local area = + { left_top = { x = pos_x, y = pos_y }, right_bottom = { x = pos_x + 31, y = pos_y + 31 } } @@ -146,7 +155,8 @@ local function init_map() local map_gen_settings = {} map_gen_settings.water = '0.01' map_gen_settings.cliff_settings = { cliff_elevation_interval = 50, cliff_elevation_0 = 50 } - map_gen_settings.autoplace_controls = { + map_gen_settings.autoplace_controls = + { ['coal'] = { frequency = 'none', size = 'none', richness = 'none' }, ['stone'] = { frequency = 'none', size = 'none', richness = 'none' }, ['copper-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, @@ -205,40 +215,43 @@ for _, t in pairs(rock_weights) do end local room_layouts = { 'quad_rocks', 'single_center_rock', 'three_horizontal_rocks', 'three_vertical_rocks', 'tree_and_lake', 'forest', 'forest_fence' } -local biter_raffle = { +local biter_raffle = +{ { 'small-biter' }, - { 'small-biter', 'small-biter', 'small-biter', 'medium-biter' }, - { 'small-biter', 'small-biter', 'medium-biter', 'medium-biter' }, - { 'small-biter', 'medium-biter', 'medium-biter', 'medium-biter' }, - { 'small-biter', 'medium-biter', 'medium-biter', 'big-biter' }, - { 'medium-biter', 'medium-biter', 'medium-biter', 'big-biter' }, - { 'medium-biter', 'medium-biter', 'big-biter', 'big-biter' }, - { 'medium-biter', 'big-biter', 'big-biter', 'big-biter' }, - { 'big-biter', 'big-biter', 'big-biter', 'behemoth-biter' }, - { 'big-biter', 'big-biter', 'behemoth-biter', 'behemoth-biter' } + { 'small-biter', 'small-biter', 'small-biter', 'medium-biter' }, + { 'small-biter', 'small-biter', 'medium-biter', 'medium-biter' }, + { 'small-biter', 'medium-biter', 'medium-biter', 'medium-biter' }, + { 'small-biter', 'medium-biter', 'medium-biter', 'big-biter' }, + { 'medium-biter', 'medium-biter', 'medium-biter', 'big-biter' }, + { 'medium-biter', 'medium-biter', 'big-biter', 'big-biter' }, + { 'medium-biter', 'big-biter', 'big-biter', 'big-biter' }, + { 'big-biter', 'big-biter', 'big-biter', 'behemoth-biter' }, + { 'big-biter', 'big-biter', 'behemoth-biter', 'behemoth-biter' } } -local spitter_raffle = { +local spitter_raffle = +{ { 'small-spitter' }, - { 'small-spitter', 'small-spitter', 'small-spitter', 'medium-spitter' }, - { 'small-spitter', 'small-spitter', 'medium-spitter', 'medium-spitter' }, - { 'small-spitter', 'medium-spitter', 'medium-spitter', 'medium-spitter' }, - { 'small-spitter', 'medium-spitter', 'medium-spitter', 'big-spitter' }, - { 'medium-spitter', 'medium-spitter', 'medium-spitter', 'big-spitter' }, - { 'medium-spitter', 'medium-spitter', 'big-spitter', 'big-spitter' }, - { 'medium-spitter', 'big-spitter', 'big-spitter', 'big-spitter' }, - { 'big-spitter', 'big-spitter', 'big-spitter', 'behemoth-spitter' }, - { 'big-spitter', 'big-spitter', 'behemoth-spitter', 'behemoth-spitter' } + { 'small-spitter', 'small-spitter', 'small-spitter', 'medium-spitter' }, + { 'small-spitter', 'small-spitter', 'medium-spitter', 'medium-spitter' }, + { 'small-spitter', 'medium-spitter', 'medium-spitter', 'medium-spitter' }, + { 'small-spitter', 'medium-spitter', 'medium-spitter', 'big-spitter' }, + { 'medium-spitter', 'medium-spitter', 'medium-spitter', 'big-spitter' }, + { 'medium-spitter', 'medium-spitter', 'big-spitter', 'big-spitter' }, + { 'medium-spitter', 'big-spitter', 'big-spitter', 'big-spitter' }, + { 'big-spitter', 'big-spitter', 'big-spitter', 'behemoth-spitter' }, + { 'big-spitter', 'big-spitter', 'behemoth-spitter', 'behemoth-spitter' } } local room_enemies = {} -local room_enemy_weights = { - { 'only_biters', 10 }, - { 'only_spitters', 10 }, - { 'biters_and_spitters', 10 }, - { 'spawners', 7 }, - { 'only_worms', 5 }, - { 'worms_and_spawners', 5 }, - { 'gun_turrets', 3 }, - { 'allied_entities', 2 }, +local room_enemy_weights = +{ + { 'only_biters', 10 }, + { 'only_spitters', 10 }, + { 'biters_and_spitters', 10 }, + { 'spawners', 7 }, + { 'only_worms', 5 }, + { 'worms_and_spawners', 5 }, + { 'gun_turrets', 3 }, + { 'allied_entities', 2 }, { 'allied_entities_mixed', 2 } } local unique_room_raffle = { 'forgotten_place', 'flamethrower_cross', 'railway_roundabout', 'big_worm_crossing', 'deadly_crossing', 'mini_labyrinth' } @@ -278,7 +291,8 @@ local function grow_cell(chunk_position, surface) -- luacheck: ignore end local allied_entity_raffle = {} - local types = { + local types = + { 'inserter', 'inserter', 'transport-belt', @@ -322,7 +336,8 @@ local function grow_cell(chunk_position, surface) -- luacheck: ignore local left_top_y = chunk_pos.y * 32 local tile_to_insert local tiles = {} - local entities_to_place = { + local entities_to_place = + { rocks = {}, worms = {}, enemy_buildings = {}, @@ -706,133 +721,134 @@ end local function treasure_chest(position, surface) local math_random = math.random local chest_raffle = {} - local chest_loot = { - { { name = 'submachine-gun', count = math_random(1, 3) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'slowdown-capsule', count = math_random(16, 32) }, weight = 1, evolution_min = 0.0, evolution_max = 1 }, - { { name = 'poison-capsule', count = math_random(16, 32) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.7 }, - { { name = 'explosive-uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'explosive-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.8 }, - { { name = 'shotgun', count = 1 }, weight = 2, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'shotgun-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'combat-shotgun', count = 1 }, weight = 10, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'piercing-shotgun-shell', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'flamethrower', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, - { { name = 'flamethrower-ammo', count = math_random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'rocket-launcher', count = 1 }, weight = 5, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'explosive-rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'land-mine', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'grenade', count = math_random(16, 32) }, weight = 10, evolution_min = 0.0, evolution_max = 0.5 }, - { { name = 'cluster-grenade', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'firearm-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'piercing-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.1, evolution_max = 0.8 }, - { { name = 'uranium-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'defender-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.0, evolution_max = 0.7 }, - { { name = 'distractor-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'destroyer-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'atomic-bomb', count = math_random(8, 16) }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'light-armor', count = 1 }, weight = 3, evolution_min = 0, evolution_max = 0.1 }, - { { name = 'heavy-armor', count = 1 }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'modular-armor', count = 1 }, weight = 2, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'power-armor', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'power-armor-mk2', count = 1 }, weight = 1, evolution_min = 0.8, evolution_max = 1 }, - { { name = 'battery-equipment', count = 1 }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, - { { name = 'battery-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'belt-immunity-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'solar-panel-equipment', count = math_random(1, 4) }, weight = 5, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'discharge-defense-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 0.8 }, - { { name = 'energy-shield-equipment', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'energy-shield-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'fission-reactor-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'night-vision-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'personal-laser-defense-equipment', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'iron-gear-wheel', count = math_random(80, 100) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'copper-cable', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'electric-engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.4, evolution_max = 0.8 }, - { { name = 'battery', count = math_random(100, 200) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'advanced-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'electronic-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'processing-unit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'explosives', count = math_random(25, 50) }, weight = 1, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'lubricant-barrel', count = math_random(4, 10) }, weight = 1, evolution_min = 0.3, evolution_max = 0.5 }, - { { name = 'rocket-fuel', count = math_random(4, 10) }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, - { { name = 'rocket-part', count = 1 }, weight = 1, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'steel-plate', count = math_random(50, 100) }, weight = 2, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'nuclear-fuel', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'burner-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'long-handed-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'fast-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 1, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'small-electric-pole', count = math_random(16, 32) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'medium-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'big-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'substation', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'wooden-chest', count = math_random(25, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'iron-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 0.4 }, - { { name = 'steel-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'small-lamp', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'rail', count = math_random(50, 75) }, weight = 3, evolution_min = 0.1, evolution_max = 0.6 }, - { { name = 'assembling-machine-1', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'assembling-machine-2', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'assembling-machine-3', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'accumulator', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'offshore-pump', count = math_random(1, 2) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'beacon', count = math_random(1, 2) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'boiler', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'steam-engine', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.5 }, - { { name = 'steam-turbine', count = math_random(1, 2) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + local chest_loot = + { + { { name = 'submachine-gun', count = math_random(1, 3) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'slowdown-capsule', count = math_random(16, 32) }, weight = 1, evolution_min = 0.0, evolution_max = 1 }, + { { name = 'poison-capsule', count = math_random(16, 32) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.7 }, + { { name = 'explosive-uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'explosive-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.8 }, + { { name = 'shotgun', count = 1 }, weight = 2, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'shotgun-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'combat-shotgun', count = 1 }, weight = 10, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'piercing-shotgun-shell', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'flamethrower', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, + { { name = 'flamethrower-ammo', count = math_random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'rocket-launcher', count = 1 }, weight = 5, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'explosive-rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'land-mine', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'grenade', count = math_random(16, 32) }, weight = 10, evolution_min = 0.0, evolution_max = 0.5 }, + { { name = 'cluster-grenade', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'firearm-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'piercing-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.1, evolution_max = 0.8 }, + { { name = 'uranium-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'defender-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.0, evolution_max = 0.7 }, + { { name = 'distractor-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'destroyer-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'atomic-bomb', count = math_random(8, 16) }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'light-armor', count = 1 }, weight = 3, evolution_min = 0, evolution_max = 0.1 }, + { { name = 'heavy-armor', count = 1 }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'modular-armor', count = 1 }, weight = 2, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'power-armor', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'power-armor-mk2', count = 1 }, weight = 1, evolution_min = 0.8, evolution_max = 1 }, + { { name = 'battery-equipment', count = 1 }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, + { { name = 'battery-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'belt-immunity-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'solar-panel-equipment', count = math_random(1, 4) }, weight = 5, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'discharge-defense-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 0.8 }, + { { name = 'energy-shield-equipment', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'energy-shield-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'fission-reactor-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'night-vision-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'personal-laser-defense-equipment', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'iron-gear-wheel', count = math_random(80, 100) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'copper-cable', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'electric-engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.4, evolution_max = 0.8 }, + { { name = 'battery', count = math_random(100, 200) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'advanced-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'electronic-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, + { { name = 'processing-unit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'explosives', count = math_random(25, 50) }, weight = 1, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'lubricant-barrel', count = math_random(4, 10) }, weight = 1, evolution_min = 0.3, evolution_max = 0.5 }, + { { name = 'rocket-fuel', count = math_random(4, 10) }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, + { { name = 'rocket-part', count = 1 }, weight = 1, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'steel-plate', count = math_random(50, 100) }, weight = 2, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'nuclear-fuel', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'burner-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, + { { name = 'long-handed-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, + { { name = 'fast-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 1, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'small-electric-pole', count = math_random(16, 32) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'medium-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'big-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'substation', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'wooden-chest', count = math_random(25, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'iron-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 0.4 }, + { { name = 'steel-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'small-lamp', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'rail', count = math_random(50, 75) }, weight = 3, evolution_min = 0.1, evolution_max = 0.6 }, + { { name = 'assembling-machine-1', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'assembling-machine-2', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.8 }, + { { name = 'assembling-machine-3', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'accumulator', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'offshore-pump', count = math_random(1, 2) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'beacon', count = math_random(1, 2) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'boiler', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'steam-engine', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.5 }, + { { name = 'steam-turbine', count = math_random(1, 2) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, --{{name = "nuclear-reactor", count = 1}, weight = 2, evolution_min = 0.5, evolution_max = 1}, - { { name = 'centrifuge', count = math_random(1, 2) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'heat-pipe', count = math_random(8, 12) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'heat-exchanger', count = math_random(2, 4) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'arithmetic-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'constant-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'decider-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'power-switch', count = math_random(2, 4) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'programmable-speaker', count = math_random(2, 4) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'chemical-plant', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'burner-mining-drill', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'electric-mining-drill', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'express-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'express-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'express-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'fast-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'fast-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'fast-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.3 }, - { { name = 'transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'oil-refinery', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'pipe', count = math_random(40, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'pipe-to-ground', count = math_random(8, 16) }, weight = 1, evolution_min = 0.2, evolution_max = 0.5 }, - { { name = 'pumpjack', count = math_random(1, 2) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'pump', count = math_random(1, 4) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'solar-panel', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 0.9 }, - { { name = 'electric-furnace', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'steel-furnace', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'stone-furnace', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'radar', count = math_random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'rail-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'rail-chain-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'stone-wall', count = math_random(25, 75) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'gate', count = math_random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'storage-tank', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, - { { name = 'train-stop', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'express-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'fast-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.0, evolution_max = 0.5 }, - { { name = 'lab', count = math_random(2, 4) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'centrifuge', count = math_random(1, 2) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'heat-pipe', count = math_random(8, 12) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'heat-exchanger', count = math_random(2, 4) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'arithmetic-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'constant-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'decider-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'power-switch', count = math_random(2, 4) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'programmable-speaker', count = math_random(2, 4) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'chemical-plant', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'burner-mining-drill', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'electric-mining-drill', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'express-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'express-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'express-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'fast-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'fast-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'fast-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.3 }, + { { name = 'transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'oil-refinery', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'pipe', count = math_random(40, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'pipe-to-ground', count = math_random(8, 16) }, weight = 1, evolution_min = 0.2, evolution_max = 0.5 }, + { { name = 'pumpjack', count = math_random(1, 2) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'pump', count = math_random(1, 4) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'solar-panel', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 0.9 }, + { { name = 'electric-furnace', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'steel-furnace', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'stone-furnace', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'radar', count = math_random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'rail-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, + { { name = 'rail-chain-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, + { { name = 'stone-wall', count = math_random(25, 75) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'gate', count = math_random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'storage-tank', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, + { { name = 'train-stop', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'express-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'fast-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.0, evolution_max = 0.5 }, + { { name = 'lab', count = math_random(2, 4) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, --{{name = "roboport", count = math_random(2,4)}, weight = 2, evolution_min = 0.6, evolution_max = 1}, --{{name = "flamethrower-turret", count = math_random(4,8)}, weight = 3, evolution_min = 0.5, evolution_max = 1}, --{{name = "laser-turret", count = math_random(4,8)}, weight = 3, evolution_min = 0.5, evolution_max = 1}, - { { name = 'gun-turret', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.9 } + { { name = 'gun-turret', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.9 } } for _, t in pairs(chest_loot) do for _ = 1, t.weight, 1 do @@ -938,15 +954,16 @@ commands.add_command( local function spawn_infinity_chest(pos, surface) local math_random = math.random - local infinity_chests = { + local infinity_chests = + { --{"raw-wood", math_random(1,3)}, - { 'coal', 1 }, - { 'stone', math_random(3, 5) }, - { 'stone', math_random(3, 5) }, - { 'stone', math_random(3, 5) }, - { 'stone', math_random(3, 5) }, - { 'stone', math_random(3, 5) }, - { 'iron-ore', 1 }, + { 'coal', 1 }, + { 'stone', math_random(3, 5) }, + { 'stone', math_random(3, 5) }, + { 'stone', math_random(3, 5) }, + { 'stone', math_random(3, 5) }, + { 'stone', math_random(3, 5) }, + { 'iron-ore', 1 }, { 'copper-ore', 1 } } local x = math_random(1, #infinity_chests) @@ -957,10 +974,11 @@ local function spawn_infinity_chest(pos, surface) e.operable = false end -local biter_fragmentation = { - { 'medium-biter', 'small-biter', 2, 3 }, - { 'big-biter', 'medium-biter', 2, 2 }, - { 'behemoth-biter', 'big-biter', 2, 2 } +local biter_fragmentation = +{ + { 'medium-biter', 'small-biter', 2, 3 }, + { 'big-biter', 'medium-biter', 2, 2 }, + { 'behemoth-biter', 'big-biter', 2, 2 } } local biter_building_inhabitants = {} @@ -975,7 +993,8 @@ biter_building_inhabitants[8] = { { 'medium-biter', 2, 4 }, { 'big-biter', 6, 8 biter_building_inhabitants[9] = { { 'medium-biter', 2, 3 }, { 'big-biter', 7, 9 } } biter_building_inhabitants[10] = { { 'big-biter', 4, 8 }, { 'behemoth-biter', 3, 4 } } -local entity_drop_amount = { +local entity_drop_amount = +{ ['small-biter'] = { low = 10, high = 20 }, ['small-spitter'] = { low = 10, high = 20 }, ['medium-spitter'] = { low = 15, high = 30 }, @@ -985,7 +1004,8 @@ local entity_drop_amount = { ['spitter-spawner'] = { low = 50, high = 100 } } local ore_spill_raffle = { 'iron-ore', 'iron-ore', 'iron-ore', 'copper-ore', 'copper-ore', 'coal', 'coal', 'stone', 'landfill' } -local ore_spawn_raffle = { +local ore_spawn_raffle = +{ 'iron-ore', 'iron-ore', 'iron-ore', @@ -1058,7 +1078,7 @@ local function on_entity_died(event) local evolution_drop_modifier = (0.1 - evolution) * 10 if evolution_drop_modifier > 0 then local amount = math.ceil(math.random(entity_drop_amount[name].low, entity_drop_amount[name].high) * evolution_drop_modifier) - surface.spill_item_stack({position = position, stack = { name = ore_spill_raffle[math.random(1, #ore_spill_raffle)], count = amount }, enable_looted = true}) + surface.spill_item_stack({ position = position, stack = { name = ore_spill_raffle[math.random(1, #ore_spill_raffle)], count = amount }, enable_looted = true }) end end return @@ -1123,7 +1143,8 @@ local function on_chunk_generated(event) return end local math_random = math.random - local entities_to_place = { + local entities_to_place = + { rocks = {}, worms = {}, enemy_buildings = {}, @@ -1154,7 +1175,8 @@ local function on_chunk_generated(event) end if noise > 0.88 then if math_random(1, 50) == 1 then - local a = { + local a = + { left_top = { x = pos.x - 100, y = pos.y - 100 }, right_bottom = { x = pos.x + 100, y = pos.y + 100 } } @@ -1206,7 +1228,7 @@ local function on_player_joined_game(event) end if player.online_time < 5 and surface.is_chunk_generated({ 0, 0 }) then - player.teleport(surface.find_non_colliding_position('character', { 16, 0 }, 2, 1) or {0, 0}, surface.name) + player.teleport(surface.find_non_colliding_position('character', { 16, 0 }, 2, 1) or { 0, 0 }, surface.name) else if player.online_time < 5 then player.teleport({ 16, 0 }, surface.name) @@ -1222,14 +1244,16 @@ local function on_player_joined_game(event) end local inserter_list = { 'inserter', 'long-handed-inserter', 'burner-inserter', 'fast-inserter', 'bulk-inserter', 'bulk-inserter' } -local inserters = { +local inserters = +{ ['inserter'] = true, ['long-handed-inserter'] = true, ['burner-inserter'] = true, ['fast-inserter'] = true, ['bulk-inserter'] = true } -local loaders = { +local loaders = +{ ['loader'] = true, ['fast-loader'] = true, ['express-loader'] = true @@ -1242,7 +1266,8 @@ local function on_built_entity(event) local name = event.entity.name if inserters[name] then local surface = event.entity.surface - local a = { + local a = + { left_top = { x = event.entity.position.x - 2, y = event.entity.position.y - 2 }, right_bottom = { x = event.entity.position.x + 2, y = event.entity.position.y + 2 } } @@ -1250,7 +1275,8 @@ local function on_built_entity(event) if not chest[1] then return end - local _ = { + local _ = + { left_top = { x = chest[1].position.x - 2, y = chest[1].position.y - 2 }, right_bottom = { x = chest[1].position.x + 2, y = chest[1].position.y + 2 } } @@ -1274,7 +1300,8 @@ local function on_built_entity(event) if loaders[name] then local surface = event.entity.surface - local a = { + local a = + { left_top = { x = event.entity.position.x - 2, y = event.entity.position.y - 2 }, right_bottom = { x = event.entity.position.x + 2, y = event.entity.position.y + 2 } } @@ -1320,7 +1347,8 @@ local function on_built_entity(event) surface.count_entities_filtered( { name = { 'spitter-spawner', 'biter-spawner' }, - area = { + area = + { { event.entity.position.x - 18, event.entity.position.y - 18 }, { event.entity.position.x + 18, event.entity.position.y + 18 } }, @@ -1363,7 +1391,8 @@ local function on_entity_damaged(event) end end -local attack_messages = { +local attack_messages = +{ 'You hear their screeching in the depths. They are trying to reach the entrance!', 'They are coming for you..', 'Something stirred them up..', diff --git a/maps/minesweeper/main.lua b/maps/minesweeper/main.lua index 00092112e..4f3030516 100644 --- a/maps/minesweeper/main.lua +++ b/maps/minesweeper/main.lua @@ -10,6 +10,10 @@ Cell Values: ]] -- +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + require 'modules.satellite_score' local Functions = require 'maps.minesweeper.functions' @@ -98,7 +102,7 @@ local size_of_solving_vector_tables = #solving_vector_tables local function update_rendering(cell, position) local surface = game.surfaces[1] - local tile = surface.get_tile(position) + local tile = surface.get_tile(position.x, position.y) local tile_values = rendering_tile_values[tile.name] if not tile_values then tile_values = { offset = { 0.6, -0.2 }, zoom = 3, font = 'scenario-message-dialog' } @@ -210,7 +214,7 @@ local function visit_cell(position) cell[1] = -1 for _, vector in pairs(cell_update_vectors) do local p = { x = position.x + vector[1], y = position.y + vector[2] } - local key = Functions.position_to_string(p) + key = Functions.position_to_string(p) if minesweeper.cells[key] and minesweeper.cells[key][1] < 10 then table.insert(minesweeper.visit_queue, { x = p.x, y = p.y }) end @@ -229,7 +233,7 @@ local function visit_cell(position) if not cell then minesweeper.cells[key] = {} end - local cell = minesweeper.cells[key] + cell = minesweeper.cells[key] cell[1] = get_adjacent_mine_count(position) @@ -309,10 +313,10 @@ local function solve_attempt(position) local marked_positions = are_mines_marked_around_target(p) if marked_positions then solved = true - for _, p in pairs(marked_positions) do - minesweeper.cells[Functions.position_to_string(p)][1] = -1 - visit_cell(p) - Functions.disarm_reward(p) + for _, pp in pairs(marked_positions) do + minesweeper.cells[Functions.position_to_string(pp)][1] = -1 + visit_cell(pp) + Functions.disarm_reward(pp) end end end @@ -364,7 +368,7 @@ local function mark_mine(entity, player) --Trigger all adjacent mines when missplacing a disarming furnace. for _, vector in pairs(cell_update_vectors) do local p = { x = position.x + vector[1], y = position.y + vector[2] } - local key = Functions.position_to_string(p) + key = Functions.position_to_string(p) if minesweeper.cells[key] and minesweeper.cells[key][1] == 10 then Functions.kaboom(p) score_change = score_change - 8 @@ -385,15 +389,15 @@ local function add_mines_to_chunk(left_top, distance_to_center) end local shuffle_index = {} - for i = 1, size_of_chunk_divide_vectors, 1 do - table.insert(shuffle_index, i) + for iv = 1, size_of_chunk_divide_vectors, 1 do + table.insert(shuffle_index, iv) end table.shuffle_table(shuffle_index) -- place shuffled mines if distance_to_center < 128 then - for i = 1, mine_count, 1 do - local vector = chunk_divide_vectors[shuffle_index[i]] + for iv = 1, mine_count, 1 do + local vector = chunk_divide_vectors[shuffle_index[iv]] local position = { x = left_top.x + vector[1], y = left_top.y + vector[2] } if not Functions.is_spawn(position) then local key = Functions.position_to_string(position) @@ -402,8 +406,8 @@ local function add_mines_to_chunk(left_top, distance_to_center) end end else - for i = 1, mine_count, 1 do - local vector = chunk_divide_vectors[shuffle_index[i]] + for iv = 1, mine_count, 1 do + local vector = chunk_divide_vectors[shuffle_index[iv]] local position = { x = left_top.x + vector[1], y = left_top.y + vector[2] } local key = Functions.position_to_string(position) minesweeper.cells[key] = { 10 } @@ -528,7 +532,7 @@ local function on_robot_built_entity(event) deny_building(event) end -local function update_built_tiles(surface, tiles) +local function update_built_tiles(tiles) for _, placed_tile in pairs(tiles) do local cell_position = Functions.position_to_cell_position(placed_tile.position) local key = Functions.position_to_string(cell_position) @@ -536,7 +540,7 @@ local function update_built_tiles(surface, tiles) if not cell and Functions.is_minefield_tile(placed_tile.position) then minesweeper.cells[key] = { 9 } end - local cell = minesweeper.cells[key] + cell = minesweeper.cells[key] if cell then update_rendering(cell, cell_position) end @@ -544,19 +548,19 @@ local function update_built_tiles(surface, tiles) end local function on_player_built_tile(event) - update_built_tiles(game.surfaces[event.surface_index], event.tiles) + update_built_tiles(event.tiles) end local function on_robot_built_tile(event) - update_built_tiles(event.robot.surface, event.tiles) + update_built_tiles(event.tiles) end local function on_player_mined_tile(event) - update_built_tiles(game.surfaces[event.surface_index], event.tiles) + update_built_tiles(event.tiles) end local function on_robot_mined_tile(event) - update_built_tiles(event.robot.surface, event.tiles) + update_built_tiles(event.tiles) end local function on_player_created(event) diff --git a/maps/mountain_fortress.lua b/maps/mountain_fortress.lua deleted file mode 100644 index 3ada2dc44..000000000 --- a/maps/mountain_fortress.lua +++ /dev/null @@ -1,517 +0,0 @@ ---luacheck: ignore --- mountain digger fortress -- by mewmew -- - -require 'modules.rpg' -require 'modules.biters_yield_coins' -require 'modules.rocks_broken_paint_tiles' -require 'modules.rocks_heal_over_time' -require 'modules.rocks_yield_ore_veins' -require 'modules.rocks_yield_ore' -require 'modules.satellite_score' -require 'modules.spawners_contain_biters' -require 'modules.splice_double' -require 'modules.biters_attack_moving_players' ---require "modules.flashlight_toggle_button" - -local difficulty_factor = 4 - -local event = require 'utils.event' -local math_random = math.random -local insert = table.insert -local map_functions = require 'utils.tools.map_functions' -local simplex_noise = require 'utils.math.simplex_noise' -local simplex_noise = simplex_noise.d2 - -local spawn_point = { x = 0, y = 2 } - -local disabled_for_deconstruction = { - ['fish'] = true, - ['huge-rock'] = true, - ['big-rock'] = true, - ['big-sand-rock'] = true -} -local worm_raffle_table = { - [1] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret' }, - [2] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret' }, - [3] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret', 'medium-worm-turret' }, - [4] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret' }, - [5] = { 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'big-worm-turret' }, - [6] = { 'small-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'big-worm-turret' }, - [7] = { 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret' }, - [8] = { 'medium-worm-turret', 'medium-worm-turret', 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret' }, - [9] = { 'medium-worm-turret', 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret' }, - [10] = { 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret' } -} -local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' } -local nest_raffle = { 'biter-spawner', 'biter-spawner', 'biter-spawner', 'spitter-spawner' } - -local function shuffle(tbl) - local size = #tbl - for i = size, 1, -1 do - local rand = math.random(size) - tbl[i], tbl[rand] = tbl[rand], tbl[i] - end - return tbl -end - -local function secret_shop(pos, surface) - local secret_market_items = { - { price = { { 'coin', math_random(8, 16) } }, offer = { type = 'give-item', item = 'grenade' } }, - { price = { { 'coin', math_random(25, 50) } }, offer = { type = 'give-item', item = 'cluster-grenade' } }, - { price = { { 'coin', math_random(5, 10) } }, offer = { type = 'give-item', item = 'defender-capsule' } }, - { price = { { 'coin', math_random(25, 50) } }, offer = { type = 'give-item', item = 'distractor-capsule' } }, - { price = { { 'coin', math_random(35, 70) } }, offer = { type = 'give-item', item = 'destroyer-capsule' } }, - --{price = {{"coin", math_random(60,120)}}, offer = {type = 'give-item', item = 'cliff-explosives'}}, - { price = { { 'coin', math_random(250, 350) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } }, - { price = { { 'coin', math_random(30, 60) } }, offer = { type = 'give-item', item = 'construction-robot' } }, - { price = { { 'coin', math_random(100, 200) } }, offer = { type = 'give-item', item = 'loader' } }, - { price = { { 'coin', math_random(200, 300) } }, offer = { type = 'give-item', item = 'fast-loader' } }, - { price = { { 'coin', math_random(300, 500) } }, offer = { type = 'give-item', item = 'express-loader' } }, - { price = { { 'coin', math_random(100, 200) } }, offer = { type = 'give-item', item = 'locomotive' } }, - { price = { { 'coin', math_random(75, 150) } }, offer = { type = 'give-item', item = 'cargo-wagon' } }, - { price = { { 'coin', math_random(2, 3) } }, offer = { type = 'give-item', item = 'rail' } }, - --{price = {{"coin", math_random(20,40)}}, offer = {type = 'give-item', item = 'train-stop'}}, - { price = { { 'coin', math_random(4, 12) } }, offer = { type = 'give-item', item = 'small-lamp' } }, - { price = { { 'coin', math_random(80, 160) } }, offer = { type = 'give-item', item = 'car' } }, - { price = { { 'coin', math_random(300, 600) } }, offer = { type = 'give-item', item = 'electric-furnace' } }, - --{price = {{"coin", math_random(300,600)}}, offer = {type = 'give-item', item = "assembling-machine-3"}}, - { price = { { 'coin', math_random(80, 160) } }, offer = { type = 'give-item', item = 'efficiency-module' } }, - { price = { { 'coin', math_random(80, 160) } }, offer = { type = 'give-item', item = 'productivity-module' } }, - { price = { { 'coin', math_random(80, 160) } }, offer = { type = 'give-item', item = 'speed-module' } }, - { price = { { 'coin', math_random(5, 10) } }, offer = { type = 'give-item', item = 'wood', count = 50 } }, - { price = { { 'coin', math_random(5, 10) } }, offer = { type = 'give-item', item = 'iron-ore', count = 50 } }, - { price = { { 'coin', math_random(5, 10) } }, offer = { type = 'give-item', item = 'copper-ore', count = 50 } }, - { price = { { 'coin', math_random(5, 10) } }, offer = { type = 'give-item', item = 'stone', count = 50 } }, - { price = { { 'coin', math_random(5, 10) } }, offer = { type = 'give-item', item = 'coal', count = 50 } }, - { price = { { 'coin', math_random(8, 16) } }, offer = { type = 'give-item', item = 'uranium-ore', count = 50 } }, - { price = { { 'wood', math_random(10, 12) } }, offer = { type = 'give-item', item = 'coin' } }, - { price = { { 'iron-ore', math_random(10, 12) } }, offer = { type = 'give-item', item = 'coin' } }, - { price = { { 'copper-ore', math_random(10, 12) } }, offer = { type = 'give-item', item = 'coin' } }, - { price = { { 'stone', math_random(10, 12) } }, offer = { type = 'give-item', item = 'coin' } }, - { price = { { 'coal', math_random(10, 12) } }, offer = { type = 'give-item', item = 'coin' } }, - { price = { { 'uranium-ore', math_random(8, 10) } }, offer = { type = 'give-item', item = 'coin' } } - } - secret_market_items = shuffle(secret_market_items) - - local market = surface.create_entity { name = 'market', position = pos } - market.destructible = false - - for i = 1, math.random(6, 8), 1 do - market.add_market_item(secret_market_items[i]) - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - - if not storage.surface_init_done then - local map_gen_settings = {} - map_gen_settings.water = 'none' - map_gen_settings.height = 960 - map_gen_settings.cliff_settings = { cliff_elevation_interval = 4, cliff_elevation_0 = 4 } - map_gen_settings.autoplace_controls = { - ['coal'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['stone'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['copper-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['iron-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['uranium-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['crude-oil'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['trees'] = { frequency = '2', size = '1', richness = 0.2 }, - ['enemy-base'] = { frequency = 'none', size = 'none', richness = 'none' } - --["grass"] = {frequency = "none", size = "none", richness = "none"}, - --["sand"] = {frequency = "none", size = "none", richness = "none"}, - --["desert"] = {frequency = "none", size = "none", richness = "none"}, - --["dirt"] = {frequency = "normal", size = "normal", richness = "normal"} - } - game.create_surface('mountain_fortress', map_gen_settings) - local surface = game.surfaces['mountain_fortress'] - - local radius = 160 - game.forces.player.chart(surface, { { x = -1 * radius, y = -1 * radius }, { x = radius, y = radius } }) - - game.map_settings.pollution.enabled = true - game.map_settings.enemy_expansion.enabled = true - - --default game setting values - storage.enemy_evolution_destroy_factor = game.map_settings.enemy_evolution.destroy_factor - storage.enemy_evolution_time_factor = game.map_settings.enemy_evolution.time_factor - storage.enemy_evolution_pollution_factor = game.map_settings.enemy_evolution.pollution_factor - - game.map_settings.enemy_evolution.destroy_factor = storage.enemy_evolution_destroy_factor * difficulty_factor - game.map_settings.enemy_evolution.time_factor = storage.enemy_evolution_time_factor * difficulty_factor - game.map_settings.enemy_evolution.pollution_factor = storage.enemy_evolution_pollution_factor * difficulty_factor - - game.map_settings.enemy_expansion.max_expansion_distance = 15 - game.map_settings.enemy_expansion.settler_group_min_size = 8 - game.map_settings.enemy_expansion.settler_group_max_size = 16 - game.map_settings.enemy_expansion.min_expansion_cooldown = 3600 - game.map_settings.enemy_expansion.max_expansion_cooldown = 7200 - - surface.ticks_per_day = surface.ticks_per_day * 2 - game.forces.player.technologies['steel-axe'].researched = true - - storage.surface_init_done = true - end - - if player.online_time < 1 then - player.insert({ name = 'pistol', count = 1 }) - -- player.insert({name = "iron-axe", count = 1}) - player.insert({ name = 'raw-fish', count = 3 }) - player.insert({ name = 'firearm-magazine', count = 16 }) - player.insert({ name = 'iron-plate', count = 32 }) - end - - local surface = game.surfaces['mountain_fortress'] - if player.online_time < 2 and surface.is_chunk_generated({ 0, 0 }) then - player.teleport(surface.find_non_colliding_position('character', spawn_point, 50, 1), 'mountain_fortress') - else - if player.online_time < 2 then - player.teleport(spawn_point, 'mountain_fortress') - end - end -end - -local function get_noise(name, pos) - local seed = game.surfaces[1].map_gen_settings.seed - local noise = {} - --local noise_seed_add = 25000 - if name == 'rock_border' then - noise[1] = simplex_noise(pos.x * 0.008, pos.y * 0.008, seed) - --noise[2] = simplex_noise(pos.x * 0.04, pos.y * 0.04, seed) - local noise = noise[1] - -- + noise[2] * 0.2 - return noise - end -end - -local function generate_north_chunk(area, surface) - local left_top = area.left_top - local tile_positions = {} - - for _, e in pairs(surface.find_entities_filtered({ area = area, type = 'tree' })) do - e.destroy() - end - - local tiles_to_set = {} - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - tile_positions[#tile_positions + 1] = pos - insert(tiles_to_set, { name = 'dirt-7', position = pos }) - end - end - surface.set_tiles(tiles_to_set, true) - if #tile_positions == 0 then - return - end - - local rock_amount = math.ceil(#tile_positions * 0.75) - tile_positions = shuffle(tile_positions) - for _, pos in pairs(tile_positions) do - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = pos }) - rock_amount = rock_amount - 1 - if rock_amount < 1 then - break - end - end - - local waters = { 'water-green', 'deepwater-green' } - if math_random(1, 8) == 1 then - local pos = tile_positions[math_random(1, #tile_positions)] - map_functions.draw_noise_tile_circle(pos, waters[math_random(1, #waters)], surface, math_random(2, 8)) - for x = 1, math_random(2, 7), 1 do - surface.create_entity({ name = 'fish', position = pos }) - end - end - - if math_random(1, 50) == 1 then - local pos = tile_positions[math_random(1, #tile_positions)] - local size = math_random(3, 8) - map_functions.draw_noise_tile_circle(pos, 'water', surface, size - 1) - map_functions.draw_noise_tile_circle(pos, 'grass-2', surface, size) - secret_shop(pos, surface) - end - - if math_random(1, 26) == 1 then - map_functions.draw_noise_tile_circle(pos, 'water', surface, 5) - map_functions.draw_noise_tile_circle(pos, 'sand-3', surface, 6) - map_functions.draw_oil_circle(tile_positions[math_random(1, #tile_positions)], 'crude-oil', surface, math_random(1, 4), math_random(100000, 500000)) - end - - local decorative_names = {} - for k, v in pairs(prototypes.decorative) do - if v.autoplace_specification then - decorative_names[#decorative_names + 1] = k - end - end - surface.regenerate_decorative(decorative_names, { { x = math.floor(left_top.x / 32), y = math.floor(left_top.y / 32) } }) -end - -local function generate_south_chunk(event, surface) - local left_top = event.area.left_top - - if left_top.y > 32 then - for _, e in pairs(surface.find_entities_filtered({ area = event.area })) do - e.destroy() - end - else - for _, e in pairs(surface.find_entities_filtered({ area = event.area, type = 'cliff' })) do - e.destroy() - end - end - - local current_depth = math.abs(left_top.y) - 32 - - local i = math.ceil(current_depth / 32) - if i > 10 then - i = 10 - end - if i < 1 then - i = 1 - end - local worm_raffle = worm_raffle_table[i] - - local worm_amount = math.ceil(current_depth / 32) - if worm_amount > 16 then - worm_amount = 16 - end - local nests_amount = math.ceil(current_depth / 8) - if nests_amount > 16 then - nests_amount = 16 - end - local ore_patch_amount = math.floor(current_depth / 96) - - local tile_positions = {} - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - if not surface.get_tile(pos).collides_with('player') then - tile_positions[#tile_positions + 1] = pos - end - end - end - if #tile_positions == 0 then - return - end - - tile_positions = shuffle(tile_positions) - for _, pos in pairs(tile_positions) do - if surface.can_place_entity({ name = 'biter-spawner', position = pos, force = 'enemy' }) then - surface.create_entity({ name = nest_raffle[math_random(1, #nest_raffle)], position = pos, force = 'enemy' }) - nests_amount = nests_amount - 1 - if nests_amount < 1 then - break - end - end - end - - tile_positions = shuffle(tile_positions) - for _, pos in pairs(tile_positions) do - if surface.can_place_entity({ name = 'big-worm-turret', position = pos, force = 'enemy' }) then - surface.create_entity({ name = worm_raffle[math_random(1, #worm_raffle)], position = pos, force = 'enemy' }) - worm_amount = worm_amount - 1 - if worm_amount < 1 then - break - end - end - end -end - -local function on_chunk_charted(event) - if not storage.chunks_charted then - storage.chunks_charted = {} - end - local surface = game.surfaces[event.surface_index] - local position = event.position - if storage.chunks_charted[tostring(position.x) .. tostring(position.y)] then - return - end - storage.chunks_charted[tostring(position.x) .. tostring(position.y)] = true - local area = { - left_top = { x = position.x * 32, y = position.y * 32 }, - right_bottom = { x = position.x * 32 + 31, y = position.y * 32 + 31 } - } - - if position.y * 32 < 64 then - return - end - - if math_random(1, 3) ~= 1 then - return - end - map_functions.draw_rainbow_patch({ x = position.x * 32 + math_random(1, 32), y = position.y * 32 + math_random(1, 32) }, surface, math_random(10, 18), 500 * position.y) - game.forces.player.chart(surface, area) -end - -local function replace_spawn_water(surface) - if storage.spawn_water_replaced then - return - end - if not surface.is_chunk_generated({ 5, 5 }) then - return - end - local tilename = 'grass-1' - for x = -160, 160, 1 do - for y = -96, 90, 1 do - local tile = surface.get_tile(x, y) - if tile.name ~= 'water' and tile.name ~= 'deepwater' then - tilename = tile.name - end - end - end - local tiles = {} - for x = -128, 128, 1 do - for y = -128, 128, 1 do - local tile = surface.get_tile(x, y) - if tile.name == 'water' or tile.name == 'deepwater' then - insert(tiles, { name = tilename, position = { x = tile.position.x, y = tile.position.y } }) - end - end - end - surface.set_tiles(tiles, true) - storage.spawn_water_replaced = true -end - -local function on_chunk_generated(event) - local surface = game.surfaces['mountain_fortress'] - if event.surface.name ~= surface.name then - return - end - local left_top = event.area.left_top - - replace_spawn_water(surface) - - if left_top.y < 0 then - generate_north_chunk(event.area, surface) - return - end - - if left_top.y > 0 then - generate_south_chunk(event, surface) - return - end - - for _, e in pairs(surface.find_entities_filtered({ area = event.area, type = 'cliff' })) do - e.destroy() - end - - local trees = { 'dead-grey-trunk', 'dead-grey-trunk', 'dry-tree' } - for x = 0, 31, 1 do - for y = 5, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - if math_random(1, math.ceil(y + y) + 64) == 1 then - surface.create_entity({ name = trees[math_random(1, #trees)], position = pos }) - end - end - end - - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - - if math_random(1, y + 2) == 1 then - surface.create_decoratives { - check_collision = false, - decoratives = { - { name = 'medium-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) } - } - } - end - if math_random(1, y + 2) == 1 then - surface.create_decoratives { - check_collision = false, - decoratives = { - { name = 'small-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) } - } - } - end - if math_random(1, y + 2) == 1 then - surface.create_decoratives { - check_collision = false, - decoratives = { - { name = 'tiny-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) } - } - } - end - - --[[ - local noise = get_noise("rock_border", {x = pos.x, y = 0}) - if math.abs(noise * 6) > y then - if math_random(1, 3) ~= 1 then surface.create_entity({name = rock_raffle[math_random(1, #rock_raffle)], position = pos}) end - surface.set_tiles({{name = "dirt-7", position = pos}}, true) - end]] - if math_random(1, math.ceil(y + y) + 2) == 1 then - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = pos }) - end - end - end - - if left_top.y ~= 0 then - return - end - if left_top.x ~= 96 then - return - end - for _, e in pairs(surface.find_entities_filtered({ area = { { spawn_point.x - 0.5, spawn_point.y - 0.5 }, { spawn_point.x + 0.5, spawn_point.y + 0.5 } } })) do - if e.force.name ~= 'player' then - e.destroy() - end - end - for _, e in pairs(surface.find_entities_filtered({ area = { { spawn_point.x - 40, spawn_point.y - 40 }, { spawn_point.x + 40, spawn_point.y + 40 } }, force = 'enemy' })) do - e.destroy() - end -end - -local function on_entity_damaged(event) - local entity = event.entity - if not entity.valid then - return - end - if entity.type == 'simple-entity' then - if event.force.name == 'player' then - event.entity.health = event.entity.health + (event.final_damage_amount * 0.5) - if event.entity.health <= event.final_damage_amount then - event.entity.die('player') - end - end - end -end - -local function on_marked_for_deconstruction(event) - if disabled_for_deconstruction[event.entity.name] then - event.entity.cancel_deconstruction(game.players[event.player_index].force.name) - end -end ---[[ -local function on_tick(event) - if game.tick % 3600 ~= 1 then return end - - if math_random(1,8) ~= 1 then return end - - local surface = game.surfaces["mountain_fortress"] - - local spawners = surface.find_entities_filtered({force = "enemy", type = "unit-spawner"}) - if not spawners[1] then return end - - local target = surface.find_nearest_enemy({position = spawners[math_random(1, #spawners)].position, max_distance=1500, force="enemy"}) - if not target then return end - - surface.set_multi_command({ - command={ - type=defines.command.attack_area, - destination=target.position, - radius=16, - distraction=defines.distraction.by_anything - }, - unit_count = math_random(6,12), - force = "enemy", - unit_search_distance=1024 - }) -end - -event.add(defines.events.on_tick, on_tick)--]] -event.add(defines.events.on_chunk_charted, on_chunk_charted) -event.add(defines.events.on_entity_damaged, on_entity_damaged) -event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction) -event.add(defines.events.on_chunk_generated, on_chunk_generated) -event.add(defines.events.on_player_joined_game, on_player_joined_game) diff --git a/maps/mountain_fortress_v2/collapse.lua b/maps/mountain_fortress_v2/collapse.lua deleted file mode 100644 index 198a80b80..000000000 --- a/maps/mountain_fortress_v2/collapse.lua +++ /dev/null @@ -1,247 +0,0 @@ ---luacheck: ignore -local Public = {} -local simplex_noise = require 'utils.math.simplex_noise'.d2 -local math_random = math.random -local math_abs = math.abs -local math_sqrt = math.sqrt -local math_floor = math.floor -local table_remove = table.remove -local table_insert = table.insert -local table_shuffle_table = table.shuffle_table -local chart_radius = 30 -local start_chunk_y = 5 -local tile_conversion = { - ['concrete'] = 'stone-path', - ['hazard-concrete-left'] = 'stone-path', - ['hazard-concrete-right'] = 'stone-path', - ['refined-concrete'] = 'concrete', - ['refined-hazard-concrete-left'] = 'hazard-concrete-left', - ['refined-hazard-concrete-right'] = 'hazard-concrete-right', - ['stone-path'] = 'landfill' -} - -local size_of_vector_list = 64 -local function get_collapse_vectors(radius, seed) - local vectors = {} - local i = 1 - local m = 1 / (radius * 2) - for x = radius * -1, radius, 1 do - for y = radius * -1, radius, 1 do - local noise = math_abs(simplex_noise(x * m, y * m, seed) * radius * 1.2) - local d = math_sqrt(x ^ 2 + y ^ 2) - if d + noise < radius then - vectors[i] = { x, y } - i = i + 1 - end - end - end - - local sorted_vectors = {} - for _, vector in pairs(vectors) do - local index = math_floor(math_sqrt(vector[1] ^ 2 + vector[2] ^ 2)) + 1 - if not sorted_vectors[index] then - sorted_vectors[index] = {} - end - sorted_vectors[index][#sorted_vectors[index] + 1] = vector - end - - local final_list = {} - for _, row in pairs(sorted_vectors) do - table_shuffle_table(row) - for _, tile in pairs(row) do - table_insert(final_list, tile) - end - end - - return final_list -end - -local function set_y(surface) - local level_width = surface.map_gen_settings.width - local map_collapse = storage.map_collapse - local x_left = surface.map_gen_settings.width * -0.5 - local x_right = surface.map_gen_settings.width * 0.5 - for _ = 1, 16, 1 do - local area = { { x_left, map_collapse.last_position.y }, { x_right, map_collapse.last_position.y + 1 } } - if surface.count_tiles_filtered({ name = 'out-of-map', area = area }) < level_width then - return area - end - map_collapse.last_position.y = map_collapse.last_position.y - 1 - end -end - -local function set_positions(surface) - local area = set_y(surface) - if not area then - return - end - - local map_collapse = storage.map_collapse - map_collapse.positions = {} - - local i = 1 - for _, tile in pairs(surface.find_tiles_filtered({ area = area })) do - if tile.valid then - if tile.name ~= 'out-of-map' then - map_collapse.positions[i] = tile - i = i + 1 - end - end - end - - if i == 1 then - map_collapse.positions = nil - return - end - if i > 1 then - table_shuffle_table(map_collapse.positions) - end -end - -local function set_collapse_tiles(surface, position, vectors) - local map_collapse = storage.map_collapse - map_collapse.processing = {} - local i = 1 - for _, vector in pairs(vectors) do - local shifted_position = { x = position[1] + vector[1], y = position[2] + vector[2] - 60 } - local position = { x = position[1] + vector[1], y = position[2] + vector[2] } - local rocks = surface.find_entities_filtered { position = shifted_position, radius = 2, type = { 'simple-entity', 'tree' } } - if #rocks > 0 then - for i = 1, #rocks, 1 do - if rocks[i].valid then - rocks[i].destroy() - end - end - end - local tile = surface.get_tile(position) - if tile.valid and tile.name ~= 'out-of-map' then - map_collapse.processing[i] = tile - i = i + 1 - end - end - map_collapse.processing_index = 1 - map_collapse.size_of_processing = #map_collapse.processing -end - -local function clean_positions(tbl) - for k, tile in pairs(tbl) do - if not tile.valid then - table_remove(tbl, k) - else - if tile.name == 'out-of-map' then - table_remove(tbl, k) - end - end - end -end - -local function setup_next_collapse() - local surface = game.surfaces[storage.active_surface_index] - local map_collapse = storage.map_collapse - if not map_collapse.vector_list then - map_collapse.vector_list = {} - for _ = 1, size_of_vector_list, 1 do - table_insert(storage.map_collapse.vector_list, get_collapse_vectors(math_random(24, 48), math_random(1, 9999999))) - end - end - - if not map_collapse.positions then - --if math_random(1, 64) == 1 then map_collapse.last_position = {x = 0, y = 128} end - set_positions(surface) - return - end - - local tile = map_collapse.positions[#map_collapse.positions] - if not tile then - map_collapse.positions = nil - return - end - if not tile.valid then - clean_positions(map_collapse.positions) - return - end - if tile.name == 'out-of-map' then - clean_positions(map_collapse.positions) - return - end - - local position = { tile.position.x, tile.position.y } - - local vectors = map_collapse.vector_list[math_random(1, size_of_vector_list)] - set_collapse_tiles(surface, position, vectors) - - local last_position = storage.map_collapse.last_position - game.forces.player.chart(surface, { { last_position.x - chart_radius, last_position.y - chart_radius }, { last_position.x + chart_radius, last_position.y + chart_radius } }) - storage.map_collapse.last_position = { x = position[1], y = position[2] } - game.forces.player.chart(surface, { { position[1] - chart_radius, position[2] - chart_radius }, { position[1] + chart_radius, position[2] + chart_radius } }) -end - -function Public.delete_out_of_map_chunks(surface) - local count = 0 - for chunk in surface.get_chunks() do - if surface.count_tiles_filtered({ name = 'out-of-map', area = chunk.area }) == 1024 then - surface.delete_chunk({ chunk.x, chunk.y }) - count = count + 1 - end - end -end - -local function process_tile(surface, tile, tiles_to_set) - if not tile then - return - end - if not tile.valid then - return - end - - local conversion_tile = tile_conversion[tile.name] - if conversion_tile then - table_insert(tiles_to_set, { name = conversion_tile, position = tile.position }) - surface.create_trivial_smoke({ name = 'train-smoke', position = tile.position }) - else - table_insert(tiles_to_set, { name = 'out-of-map', position = tile.position }) - end - - return true -end - -function Public.process() - local surface = game.surfaces[storage.active_surface_index] - local map_collapse = storage.map_collapse - - if map_collapse.processing_index >= map_collapse.size_of_processing then - setup_next_collapse() - return - end - - local count = 0 - local tiles_to_set = {} - for i = map_collapse.processing_index, map_collapse.size_of_processing, 1 do - if process_tile(surface, map_collapse.processing[i], tiles_to_set) then - count = count + 1 - if count >= map_collapse.speed then - break - end - end - map_collapse.processing_index = map_collapse.processing_index + 1 - end - - if count > 1 then - surface.set_tiles(tiles_to_set, true) - end -end - -function Public.init() - storage.map_collapse = { - ['processing_index'] = 0, - ['size_of_processing'] = 0, - ['processing'] = {}, - ['last_position'] = { x = 0, y = 128 }, - ['speed'] = 3 - } -end - -local event = require 'utils.event' -event.on_init(Public.init()) - -return Public diff --git a/maps/mountain_fortress_v2/flamethrower_nerf.lua b/maps/mountain_fortress_v2/flamethrower_nerf.lua deleted file mode 100644 index a6181a744..000000000 --- a/maps/mountain_fortress_v2/flamethrower_nerf.lua +++ /dev/null @@ -1,22 +0,0 @@ ---Flamethrower Turret Nerf -local function on_research_finished(event) - local research = event.research - local force_name = research.force.name - if research.name == 'military' then - if not storage.flamethrower_damage then - storage.flamethrower_damage = {} - end - storage.flamethrower_damage[force_name] = -0.65 - game.forces[force_name].set_turret_attack_modifier('flamethrower-turret', storage.flamethrower_damage[force_name]) - game.forces[force_name].set_ammo_damage_modifier('flamethrower', storage.flamethrower_damage[force_name]) - end - - if string.sub(research.name, 0, 18) == 'refined-flammables' then - storage.flamethrower_damage[force_name] = storage.flamethrower_damage[force_name] + 0.10 - game.forces[force_name].set_turret_attack_modifier('flamethrower-turret', storage.flamethrower_damage[force_name]) - game.forces[force_name].set_ammo_damage_modifier('flamethrower', storage.flamethrower_damage[force_name]) - end -end - -local event = require 'utils.event' -event.add(defines.events.on_research_finished, on_research_finished) diff --git a/maps/mountain_fortress_v2/locomotive.lua b/maps/mountain_fortress_v2/locomotive.lua deleted file mode 100644 index 0c75648ee..000000000 --- a/maps/mountain_fortress_v2/locomotive.lua +++ /dev/null @@ -1,167 +0,0 @@ ---luacheck: ignore -local Immersive_cargo_wagons = require 'modules.immersive_cargo_wagons.main' -local Public = {} - -local market_offers = { - { price = { { 'coin', 4 } }, offer = { type = 'give-item', item = 'raw-fish' } }, - { price = { { 'coin', 12 } }, offer = { type = 'give-item', item = 'wood', count = 50 } }, - { price = { { 'coin', 12 } }, offer = { type = 'give-item', item = 'iron-ore', count = 50 } }, - { price = { { 'coin', 12 } }, offer = { type = 'give-item', item = 'copper-ore', count = 50 } }, - { price = { { 'coin', 12 } }, offer = { type = 'give-item', item = 'stone', count = 50 } }, - { price = { { 'coin', 12 } }, offer = { type = 'give-item', item = 'coal', count = 50 } }, - { price = { { 'coin', 20 } }, offer = { type = 'give-item', item = 'uranium-ore', count = 50 } }, - { price = { { 'coin', 8 } }, offer = { type = 'give-item', item = 'crude-oil-barrel', count = 1 } }, - { price = { { 'explosives', 5 }, { 'steel-plate', 1 }, { 'coin', 1 } }, offer = { type = 'give-item', item = 'land-mine', count = 1 } } -} - -function Public.locomotive_spawn(surface, position) - for y = -6, 6, 2 do - surface.create_entity({ name = 'straight-rail', position = { position.x, position.y + y }, force = 'player', direction = 0 }) - end - storage.locomotive = surface.create_entity({ name = 'locomotive', position = { position.x, position.y + -3 }, force = 'player' }) - storage.locomotive.get_inventory(defines.inventory.fuel).insert({ name = 'wood', count = 100 }) - - storage.locomotive_cargo = surface.create_entity({ name = 'cargo-wagon', position = { position.x, position.y + 3 }, force = 'player' }) - storage.locomotive_cargo.get_inventory(defines.inventory.cargo_wagon).insert({ name = 'raw-fish', count = 1 }) - - rendering.draw_light( - { - sprite = 'utility/light_medium', - scale = 5.5, - intensity = 1, - minimum_darkness = 0, - oriented = true, - color = { 255, 255, 255 }, - target = storage.locomotive, - surface = surface, - visible = true, - only_in_alt_mode = false - } - ) - - rendering.draw_light( - { - sprite = 'utility/light_medium', - scale = 5.5, - intensity = 1, - minimum_darkness = 0, - oriented = true, - color = { 255, 255, 255 }, - target = storage.locomotive_cargo, - surface = surface, - visible = true, - only_in_alt_mode = false - } - ) - - storage.locomotive.color = { 0, 255, 0 } - storage.locomotive_cargo.minable = false - storage.locomotive.minable = false - - for y = -1, 0, 0.05 do - local scale = math.random(50, 100) * 0.01 - rendering.draw_sprite( - { - sprite = 'item/raw-fish', - orientation = math.random(0, 100) * 0.01, - x_scale = scale, - y_scale = scale, - tint = { math.random(75, 255), math.random(75, 255), math.random(75, 255) }, - render_layer = 'selection-box', - target = storage.locomotive_cargo, - target_offset = { -0.7 + math.random(0, 140) * 0.01, y }, - surface = surface - } - ) - end - - local wagon = Immersive_cargo_wagons.register_wagon(storage.locomotive) - wagon.entity_count = 999 - - local wagon = Immersive_cargo_wagons.register_wagon(storage.locomotive_cargo) - wagon.entity_count = 999 - - local surface = wagon.surface - local center_position = { - x = wagon.area.left_top.x + (wagon.area.right_bottom.x - wagon.area.left_top.x) * 0.5, - y = wagon.area.left_top.y + (wagon.area.right_bottom.y - wagon.area.left_top.y) * 0.5 - } - - local position = surface.find_non_colliding_position('market', center_position, 128, 0.5) - local market = surface.create_entity({ name = 'market', position = position, force = 'neutral', create_build_effect_smoke = false }) - market.minable = false - market.destructible = false - for _, offer in pairs(market_offers) do - market.add_market_item(offer) - end - - local position = surface.find_non_colliding_position('market', center_position, 128, 0.5) - local e = surface.create_entity({ name = 'big-biter', position = position, force = 'player', create_build_effect_smoke = false }) - e.ai_settings.allow_destroy_when_commands_fail = false - e.ai_settings.allow_try_return_to_spawner = false - - for x = center_position.x - 5, center_position.x + 5, 1 do - for y = center_position.y - 5, center_position.y + 5, 1 do - if math.random(1, 2) == 1 then - surface.spill_item_stack({ x + math.random(0, 9) * 0.1, y + math.random(0, 9) * 0.1 }, { name = 'raw-fish', count = 1 }, false) - end - surface.set_tiles({ { name = 'blue-refined-concrete', position = { x, y } } }, true) - end - end - for x = center_position.x - 3, center_position.x + 3, 1 do - for y = center_position.y - 3, center_position.y + 3, 1 do - if math.random(1, 2) == 1 then - surface.spill_item_stack({ x + math.random(0, 9) * 0.1, y + math.random(0, 9) * 0.1 }, { name = 'raw-fish', count = 1 }, false) - end - surface.set_tiles({ { name = 'cyan-refined-concrete', position = { x, y } } }, true) - end - end -end - -function Public.fish_tag() - if not storage.locomotive_cargo then - return - end - if not storage.locomotive_cargo.valid then - return - end - if not storage.locomotive_cargo.surface then - return - end - if not storage.locomotive_cargo.surface.valid then - return - end - if storage.locomotive_tag then - if storage.locomotive_tag.valid then - if storage.locomotive_tag.position.x == storage.locomotive_cargo.position.x and storage.locomotive_tag.position.y == storage.locomotive_cargo.position.y then - return - end - storage.locomotive_tag.destroy() - end - end - storage.locomotive_tag = - storage.locomotive_cargo.force.add_chart_tag( - storage.locomotive_cargo.surface, - { - icon = { type = 'item', name = 'raw-fish' }, - position = storage.locomotive_cargo.position, - text = ' ' - } - ) -end - -function Public.set_player_spawn_and_refill_fish() - if not storage.locomotive_cargo then - return - end - if not storage.locomotive_cargo.valid then - return - end - local position = storage.locomotive_cargo.surface.find_non_colliding_position('stone-furnace', storage.locomotive_cargo.position, 16, 2) - if position then - game.forces.player.set_spawn_position({ x = position.x, y = position.y }, storage.locomotive_cargo.surface) - end - return true -end - -return Public diff --git a/maps/mountain_fortress_v2/main.lua b/maps/mountain_fortress_v2/main.lua deleted file mode 100644 index fe5f7ac9c..000000000 --- a/maps/mountain_fortress_v2/main.lua +++ /dev/null @@ -1,612 +0,0 @@ ---luacheck: ignore --- Mountain digger fortress, protect the cargo wagon! -- by MewMew - -storage.offline_loot = true -local darkness = false - -require 'utils.functions.soft_reset' -require 'utils.functions.basic_markets' - -local Gui = require 'utils.gui' -local Map_score = require 'utils.gui.map_score' -local Collapse = require 'modules.collapse' -local RPG = require 'modules.rpg' -require 'modules.wave_defense.main' -require 'modules.biters_yield_coins' -require 'modules.no_deconstruction_of_neutral_entities' -require 'modules.shotgun_buff' -local Explosives = require 'modules.explosives' -require 'modules.mineable_wreckage_yields_scrap' -require 'modules.rocks_broken_paint_tiles' -require 'modules.rocks_heal_over_time' -require 'modules.rocks_yield_ore_veins' -local level_depth = require 'maps.mountain_fortress_v2.terrain' -local Immersive_cargo_wagons = require 'modules.immersive_cargo_wagons.main' -require 'maps.mountain_fortress_v2.flamethrower_nerf' -local BiterRolls = require 'modules.wave_defense.biter_rolls' -local BiterHealthBooster = require 'modules.biter_health_booster' -local Reset = require 'utils.functions.soft_reset' -local Pets = require 'modules.biter_pets' -local Map = require 'modules.map_info' -local WD = require 'modules.wave_defense.table' -local Treasure = require 'maps.mountain_fortress_v2.treasure' -local Locomotive = require 'maps.mountain_fortress_v2.locomotive' -local Modifier = require 'utils.player_modifiers' - -local math_random = math.random -local math_abs = math.abs -local math_floor = math.floor - -local Public = {} - -local starting_items = { ['pistol'] = 1, ['firearm-magazine'] = 16, ['rail'] = 16, ['wood'] = 16, ['explosives'] = 32 } -local treasure_chest_messages = { - "You notice an old crate within the rubble. It's filled with treasure!", - "You find a chest underneath the broken rocks. It's filled with goodies!", - 'We has found the precious!' -} - -local function game_over() - game.print('The Fish Wagon was destroyed!!') - local wave_defense_table = WD.get_table() - wave_defense_table.game_lost = true - wave_defense_table.target = nil - storage.game_reset_tick = game.tick + 1800 - for _, player in pairs(game.connected_players) do - player.play_sound { path = 'utility/game_lost', volume_modifier = 0.80 } - Gui.call_existing_tab(player, 'Map Scores') - end -end - -local function set_scores() - local fish_wagon = storage.locomotive_cargo - if not fish_wagon then - return - end - if not fish_wagon.valid then - return - end - local score = math_floor(fish_wagon.position.y * -1) - for _, player in pairs(game.connected_players) do - if score > Map_score.get_score(player) then - Map_score.set_score(player, score) - end - end -end - -local function disable_recipes() - local force = game.forces.player - force.recipes['cargo-wagon'].enabled = false - force.recipes['fluid-wagon'].enabled = false - force.recipes['artillery-wagon'].enabled = false - force.recipes['locomotive'].enabled = false - force.recipes['pistol'].enabled = false -end - -local function set_difficulty() - local wave_defense_table = WD.get_table() - local player_count = #game.connected_players - - wave_defense_table.max_active_biters = 1024 - - -- threat gain / wave - wave_defense_table.threat_gain_multiplier = 1.9 + player_count * 0.1 - - local amount = player_count * 0.25 + 2 - amount = math.floor(amount) - if amount > 6 then - amount = 6 - end - Collapse.set_amount(amount) - - wave_defense_table.wave_interval = 3600 - player_count * 60 - if wave_defense_table.wave_interval < 1800 then - wave_defense_table.wave_interval = 1800 - end -end - -function Public.reset_map() - Immersive_cargo_wagons.reset() - - for _, player in pairs(game.players) do - if player.controller_type == defines.controllers.editor then - player.toggle_map_editor() - end - end - local wave_defense_table = WD.get_table() - storage.chunk_queue = {} - storage.offline_players = {} - - local map_gen_settings = { - ['seed'] = math_random(1, 1000000), - ['width'] = level_depth, - ['water'] = 0.1, - ['starting_area'] = 1, - ['cliff_settings'] = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 }, - ['default_enable_all_autoplace_controls'] = true, - ['autoplace_settings'] = { - ['entity'] = { treat_missing_as_default = false }, - ['tile'] = { treat_missing_as_default = true }, - ['decorative'] = { treat_missing_as_default = true } - } - } - - if not storage.active_surface_index then - storage.active_surface_index = game.create_surface('mountain_fortress', map_gen_settings).index - else - game.forces.player.set_spawn_position({ -2, 16 }, game.surfaces[storage.active_surface_index]) - storage.active_surface_index = Reset.soft_reset_map(game.surfaces[storage.active_surface_index], map_gen_settings, starting_items).index - end - - local surface = game.surfaces[storage.active_surface_index] - - Explosives.set_surface_whitelist({ [surface.name] = true }) - - if darkness then - surface.min_brightness = 0.10 - surface.brightness_visual_weights = { 0.90, 0.90, 0.90 } - surface.daytime = 0.42 - surface.freeze_daytime = true - surface.solar_power_multiplier = 999 - end - - surface.request_to_generate_chunks({ 0, 0 }, 2) - surface.force_generate_chunk_requests() - - for x = -768 + 32, 768 - 32, 32 do - surface.request_to_generate_chunks({ x, 96 }, 1) - surface.force_generate_chunk_requests() - end - - game.difficulty_settings.technology_price_multiplier = 0.5 - game.map_settings.enemy_evolution.destroy_factor = 0 - game.map_settings.enemy_evolution.pollution_factor = 0 - game.map_settings.enemy_evolution.time_factor = 0 - game.map_settings.enemy_expansion.enabled = true - game.map_settings.enemy_expansion.max_expansion_cooldown = 3600 - game.map_settings.enemy_expansion.min_expansion_cooldown = 3600 - game.map_settings.enemy_expansion.settler_group_max_size = 8 - game.map_settings.enemy_expansion.settler_group_min_size = 16 - game.map_settings.pollution.enabled = false - - game.forces.player.technologies['land-mine'].enabled = false - game.forces.player.technologies['landfill'].enabled = false - game.forces.player.technologies['fluid-wagon'].enabled = false - game.forces.player.technologies['railway'].researched = true - disable_recipes() - - game.forces.player.set_spawn_position({ -2, 16 }, surface) - game.forces.enemy.set_ammo_damage_modifier('bullet', 1) - game.forces.enemy.set_turret_attack_modifier('gun-turret', 1) - - Locomotive.locomotive_spawn(surface, { x = 0, y = 16 }) - - WD.reset_wave_defense() - wave_defense_table.surface_index = storage.active_surface_index - wave_defense_table.target = storage.locomotive_cargo - wave_defense_table.nest_building_density = 32 - wave_defense_table.game_lost = false - game.reset_time_played() - - Collapse.set_kill_entities(false) - Collapse.set_speed(8) - Collapse.set_amount(1) - Collapse.set_max_line_size(level_depth) - Collapse.set_surface_index(surface.index) - Collapse.set_position({ 0, 130 }) - Collapse.set_direction('north') - - RPG.rpg_reset_all_players() - - set_difficulty() -end - -local wagon_types = { - ['cargo-wagon'] = true, - ['artillery-wagon'] = true, - ['fluid-wagon'] = true, - ['locomotive'] = true -} - -local function protect_train(event) - local entity = event.entity - if entity.force.index ~= 1 then - return - end --Player Force - if wagon_types[entity.type] then - if event.cause then - if event.cause.force.index == 2 then - return - end - end - event.entity.health = event.entity.health + event.final_damage_amount - end -end - -local function biters_chew_rocks_faster(event) - if event.entity.force.index ~= 3 then - return - end --Neutral Force - if not event.cause then - return - end - if not event.cause.valid then - return - end - if event.cause.force.index ~= 2 then - return - end --Enemy Force - event.entity.health = event.entity.health - event.final_damage_amount * 5 -end - -local function hidden_biter(entity) - local surface = entity.surface - local h = math_floor(math_abs(entity.position.y)) - local m = 1 / level_depth - - local count = 64 - for _ = 1, 2, 1 do - local c = math_floor(math_random(0, h + level_depth) * m) + 1 - if c < count then - count = c - end - end - - local position = surface.find_non_colliding_position('small-biter', entity.position, 16, 0.5) - if not position then - position = entity.position - end - - BiterRolls.wave_defense_set_unit_raffle(h * 0.20) - - for _ = 1, count, 1 do - local unit - if math_random(1, 3) == 1 then - unit = surface.create_entity({ name = BiterRolls.wave_defense_roll_spitter_name(), position = position }) - else - unit = surface.create_entity({ name = BiterRolls.wave_defense_roll_biter_name(), position = position }) - end - - if math_random(1, 128) == 1 then - BiterHealthBooster.add_boss_unit(unit, m * h + 5, 0.38) - end - end -end - -local function hidden_worm(entity) - BiterRolls.wave_defense_set_worm_raffle(math.sqrt(entity.position.x ^ 2 + entity.position.y ^ 2) * 0.20) - entity.surface.create_entity({ name = BiterRolls.wave_defense_roll_worm_name(), position = entity.position }) -end - -local function hidden_biter_pet(event) - if math_random(1, 2048) ~= 1 then - return - end - BiterRolls.wave_defense_set_unit_raffle(math.sqrt(event.entity.position.x ^ 2 + event.entity.position.y ^ 2) * 0.25) - local unit - if math_random(1, 3) == 1 then - unit = event.entity.surface.create_entity({ name = BiterRolls.wave_defense_roll_spitter_name(), position = event.entity.position }) - else - unit = event.entity.surface.create_entity({ name = BiterRolls.wave_defense_roll_biter_name(), position = event.entity.position }) - end - Pets.biter_pets_tame_unit(game.players[event.player_index], unit, true) -end - -local function hidden_treasure(event) - if math_random(1, 320) ~= 1 then - return - end - game.players[event.player_index].print(treasure_chest_messages[math_random(1, #treasure_chest_messages)], { r = 0.98, g = 0.66, b = 0.22 }) - Treasure(event.entity.surface, event.entity.position, 'wooden-chest') -end - -local projectiles = { 'grenade', 'explosive-rocket', 'grenade', 'explosive-rocket', 'explosive-cannon-projectile' } -local function angry_tree(entity, cause) - if entity.type ~= 'tree' then - return - end - if math.abs(entity.position.y) < level_depth then - return - end - if math_random(1, 4) == 1 then - hidden_biter(entity) - end - if math_random(1, 8) == 1 then - hidden_worm(entity) - end - if math_random(1, 16) ~= 1 then - return - end - local position = false - if cause then - if cause.valid then - position = cause.position - end - end - if not position then - position = { entity.position.x + (-20 + math_random(0, 40)), entity.position.y + (-20 + math_random(0, 40)) } - end - - entity.surface.create_entity( - { - name = projectiles[math_random(1, 5)], - position = entity.position, - force = 'neutral', - source = entity.position, - target = position, - max_range = 16, - speed = 0.01 - } - ) -end - -local function give_coin(player) - player.insert({ name = 'coin', count = 1 }) -end - -local function on_player_mined_entity(event) - if not event.entity.valid then - return - end - if event.entity.force.index ~= 3 then - return - end - - if event.entity.type == 'simple-entity' then - give_coin(game.players[event.player_index]) - - if math_random(1, 30) == 1 then - hidden_biter(event.entity) - return - end - if math_random(1, 512) == 1 then - hidden_worm(event.entity) - return - end - hidden_biter_pet(event) - hidden_treasure(event) - end - - angry_tree(event.entity, game.players[event.player_index].character) -end - -local function on_pre_player_left_game(event) - local player = game.players[event.player_index] - if player.controller_type == defines.controllers.editor then - player.toggle_map_editor() - end - if player.character then - storage.offline_players[#storage.offline_players + 1] = { index = event.player_index, tick = game.tick } - end -end - -local function on_entity_died(event) - if not event.entity.valid then - return - end - if event.entity == storage.locomotive_cargo then - set_scores() - game_over() - event.entity.surface.spill_item_stack(event.entity.position, { name = 'raw-fish', count = 512 }, false) - return - end - - if event.cause then - if event.cause.valid then - if event.cause.force.index == 2 or event.cause.force.index == 3 then - return - end - end - end - - if event.entity.force.index == 3 then - if event.entity.name == 'character' then - return - end - --local r_max = 15 - math.floor(math.abs(event.entity.position.y) / (level_depth * 0.5)) - --if r_max < 3 then r_max = 3 end - if math_random(1, 8) == 1 then - hidden_biter(event.entity) - end - - if math_random(1, 256) == 1 then - hidden_worm(event.entity) - end - - angry_tree(event.entity, event.cause) - end -end - -local function on_entity_damaged(event) - if not event.entity.valid then - return - end - protect_train(event) - - if not event.entity.health then - return - end - biters_chew_rocks_faster(event) - --neutral_force_player_damage_resistance(event) -end - -local function on_research_finished(event) - disable_recipes() - event.research.force.character_inventory_slots_bonus = game.forces.player.mining_drill_productivity_bonus * 50 -- +5 Slots / level - local mining_speed_bonus = game.forces.player.mining_drill_productivity_bonus * 5 -- +50% speed / level - if event.research.force.technologies['steel-axe'].researched then - mining_speed_bonus = mining_speed_bonus + 0.5 - end -- +50% speed for steel-axe research - event.research.force.manual_mining_speed_modifier = mining_speed_bonus -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - - set_difficulty() - - local surface = game.surfaces[storage.active_surface_index] - - if player.online_time == 0 then - player.teleport(surface.find_non_colliding_position('character', game.forces.player.get_spawn_position(surface), 32, 0.5), surface) - for item, amount in pairs(starting_items) do - player.insert({ name = item, count = amount }) - end - end - - local icw = Immersive_cargo_wagons.get_table() - if player.surface.index ~= storage.active_surface_index and not icw.trains[tonumber(player.surface.name)] then - player.character = nil - player.set_controller({ type = defines.controllers.god }) - player.create_character() - player.teleport(surface.find_non_colliding_position('character', game.forces.player.get_spawn_position(surface), 32, 0.5), surface) - for item, amount in pairs(starting_items) do - player.insert({ name = item, count = amount }) - end - end - - Modifier.update_single_modifier(player, 'character_mining_speed_modifier', 'mountain_fortress', 0.5) - Modifier.update_player_modifiers(player) - - local tile = surface.get_tile(player.position) - if tile.valid then - if tile.name == 'out-of-map' then - player.teleport(surface.find_non_colliding_position('character', game.forces.player.get_spawn_position(surface), 32, 0.5), surface) - end - end -end - -local function on_player_left_game(event) - set_difficulty() -end - -local function offline_players() - local current_tick = game.tick - local players = storage.offline_players - local surface = game.surfaces[storage.active_surface_index] - if #players > 0 then - --log("nonzero offline players") - local later = {} - for i = 1, #players, 1 do - if players[i] and game.players[players[i].index] and game.players[players[i].index].connected then - --game.print("deleting already online character from list") - players[i] = nil - else - if players[i] and players[i].tick < game.tick - 54000 then - --log("spawning corpse") - local player_inv = {} - local items = {} - player_inv[1] = game.players[players[i].index].get_inventory(defines.inventory.character_main) - player_inv[2] = game.players[players[i].index].get_inventory(defines.inventory.character_armor) - player_inv[3] = game.players[players[i].index].get_inventory(defines.inventory.character_guns) - player_inv[4] = game.players[players[i].index].get_inventory(defines.inventory.character_ammo) - player_inv[5] = game.players[players[i].index].get_inventory(defines.inventory.character_trash) - local e = surface.create_entity({ name = 'character', position = game.forces.player.get_spawn_position(surface), force = 'neutral' }) - local inv = e.get_inventory(defines.inventory.character_main) - for ii = 1, 5, 1 do - if player_inv[ii].valid then - for iii = 1, #player_inv[ii], 1 do - if player_inv[ii][iii].valid then - items[#items + 1] = player_inv[ii][iii] - end - end - end - end - if #items > 0 then - for item = 1, #items, 1 do - if items[item].valid then - inv.insert(items[item]) - end - end - game.print({ 'chronosphere.message_accident' }, { r = 0.98, g = 0.66, b = 0.22 }) - e.die('neutral') - else - e.destroy() - end - - for ii = 1, 5, 1 do - if player_inv[ii].valid then - player_inv[ii].clear() - end - end - players[i] = nil - else - later[#later + 1] = players[i] - end - end - end - players = {} - if #later > 0 then - for i = 1, #later, 1 do - players[#players + 1] = later[i] - end - end - storage.offline_players = players - end -end - -local function tick() - local tick = game.tick - if tick % 30 == 0 then - if tick % 1800 == 0 then - if not Locomotive.set_player_spawn_and_refill_fish() and not storage.game_reset_tick then - game_over() - end - local surface = game.surfaces[storage.active_surface_index] - local position = surface.find_non_colliding_position('stone-furnace', Collapse.get_position(), 128, 1) - if position then - local wave_defense_table = WD.get_table() - wave_defense_table.spawn_position = position - end - if storage.offline_loot then - offline_players() - end - set_scores() - end - if storage.game_reset_tick then - if storage.game_reset_tick < tick then - storage.game_reset_tick = nil - require 'maps.mountain_fortress_v2.main'.reset_map() - end - return - end - Locomotive.fish_tag() - end -end - -local function on_init() - local T = Map.get_map_information() - T.localised_category = 'mountain_fortress' - T.main_caption_color = { r = 150, g = 150, b = 0 } - T.sub_caption_color = { r = 0, g = 150, b = 0 } - storage.rocks_yield_ore_maximum_amount = 500 - storage.rocks_yield_ore_base_amount = 40 - storage.rocks_yield_ore_distance_modifier = 0.020 - - Explosives.set_destructible_tile('out-of-map', 1500) - Explosives.set_destructible_tile('water', 1000) - Explosives.set_destructible_tile('water-green', 1000) - Explosives.set_destructible_tile('deepwater-green', 1000) - Explosives.set_destructible_tile('deepwater', 1000) - Explosives.set_destructible_tile('water-shallow', 1000) - Explosives.set_destructible_tile('water-mud', 1000) - - Map_score.set_score_description('Wagon distance reached:') - - Public.reset_map() -end - -local event = require 'utils.event' -event.on_init(on_init) -event.on_nth_tick(2, tick) -event.add(defines.events.on_entity_damaged, on_entity_damaged) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_player_left_game, on_player_left_game) -event.add(defines.events.on_pre_player_left_game, on_pre_player_left_game) -event.add(defines.events.on_player_mined_entity, on_player_mined_entity) -event.add(defines.events.on_research_finished, on_research_finished) - -require 'modules.rocks_yield_ore' - -return Public diff --git a/maps/mountain_fortress_v2/terrain.lua b/maps/mountain_fortress_v2/terrain.lua deleted file mode 100644 index f229f2483..000000000 --- a/maps/mountain_fortress_v2/terrain.lua +++ /dev/null @@ -1,1249 +0,0 @@ ---luacheck: ignore -local Biters = require 'modules.wave_defense.biter_rolls' -local Immersive_cargo_wagons = require 'modules.immersive_cargo_wagons.main' -local Treasure = require 'maps.mountain_fortress_v2.treasure' -local Market = require 'utils.functions.basic_markets' -local math_random = math.random -local math_floor = math.floor -local math_abs = math.abs -local simplex_noise = require 'utils.math.simplex_noise'.d2 -local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' } -local wagon_raffle = { 'cargo-wagon', 'cargo-wagon', 'cargo-wagon', 'locomotive', 'fluid-wagon' } -local size_of_rock_raffle = #rock_raffle -local spawner_raffle = { 'biter-spawner', 'biter-spawner', 'biter-spawner', 'spitter-spawner' } -local noises = { - ['no_rocks'] = { { modifier = 0.0033, weight = 1 }, { modifier = 0.01, weight = 0.22 }, { modifier = 0.05, weight = 0.05 }, { modifier = 0.1, weight = 0.04 } }, - ['no_rocks_2'] = { { modifier = 0.013, weight = 1 }, { modifier = 0.1, weight = 0.1 } }, - ['large_caves'] = { { modifier = 0.0033, weight = 1 }, { modifier = 0.01, weight = 0.22 }, { modifier = 0.05, weight = 0.05 }, { modifier = 0.1, weight = 0.04 } }, - ['small_caves'] = { { modifier = 0.008, weight = 1 }, { modifier = 0.03, weight = 0.15 }, { modifier = 0.25, weight = 0.05 } }, - ['small_caves_2'] = { { modifier = 0.009, weight = 1 }, { modifier = 0.05, weight = 0.25 }, { modifier = 0.25, weight = 0.05 } }, - ['cave_ponds'] = { { modifier = 0.01, weight = 1 }, { modifier = 0.1, weight = 0.06 } }, - ['cave_rivers'] = { { modifier = 0.005, weight = 1 }, { modifier = 0.01, weight = 0.25 }, { modifier = 0.05, weight = 0.01 } }, - ['cave_rivers_2'] = { { modifier = 0.003, weight = 1 }, { modifier = 0.01, weight = 0.21 }, { modifier = 0.05, weight = 0.01 } }, - ['cave_rivers_3'] = { { modifier = 0.002, weight = 1 }, { modifier = 0.01, weight = 0.15 }, { modifier = 0.05, weight = 0.01 } }, - ['cave_rivers_4'] = { { modifier = 0.001, weight = 1 }, { modifier = 0.01, weight = 0.11 }, { modifier = 0.05, weight = 0.01 } }, - ['scrapyard'] = { { modifier = 0.005, weight = 1 }, { modifier = 0.01, weight = 0.35 }, { modifier = 0.05, weight = 0.23 }, { modifier = 0.1, weight = 0.11 } } -} - -local level_depth = 704 -local worm_level_modifier = 0.18 - -local average_number_of_wagons_per_level = 2 -local chunks_per_level = ((level_depth - 32) / 32) ^ 2 -local chance_for_wagon_spawn = math_floor(chunks_per_level / average_number_of_wagons_per_level) - -local function get_noise(name, pos, seed) - local noise = 0 - local d = 0 - for _, n in pairs(noises[name]) do - noise = noise + simplex_noise(pos.x * n.modifier, pos.y * n.modifier, seed) * n.weight - d = d + n.weight - seed = seed + 10000 - end - noise = noise / d - return noise -end - -local function get_replacement_tile(surface, position) - for i = 1, 128, 1 do - local vectors = { { 0, i }, { 0, i * -1 }, { i, 0 }, { i * -1, 0 } } - table.shuffle_table(vectors) - for k, v in pairs(vectors) do - local tile = surface.get_tile(position.x + v[1], position.y + v[2]) - if tile.valid and not tile.collides_with('resource') then - return tile.name - end - end - end - return 'grass-1' -end - -local function place_wagon(surface, left_top) - local position = { x = left_top.x + math_random(4, 12) * 2, y = left_top.y + math_random(4, 12) * 2 } - - local direction - local tiles - local r1 = math_random(2, 4) * 2 - local r2 = math_random(2, 4) * 2 - - if math_random(1, 2) == 1 then - tiles = surface.find_tiles_filtered({ area = { { position.x, position.y - r1 }, { position.x + 2, position.y + r2 } } }) - direction = 0 - else - tiles = surface.find_tiles_filtered({ area = { { position.x - r1, position.y }, { position.x + r2, position.y + 2 } } }) - direction = 2 - end - - for k, tile in pairs(tiles) do - if tile.collides_with('resource') then - surface.set_tiles({ { name = 'landfill', position = tile.position } }, true) - end - for _, e in pairs(surface.find_entities_filtered({ position = tile.position, force = { 'neutral', 'enemy' } })) do - e.destroy() - end - if tile.position.y % 2 == 0 and tile.position.x % 2 == 0 then - surface.create_entity({ name = 'straight-rail', position = tile.position, force = 'player', direction = direction }) - end - end - - local entity = surface.create_entity({ name = wagon_raffle[math_random(1, #wagon_raffle)], position = position, force = 'player' }) - entity.minable = false - - local wagon = Immersive_cargo_wagons.register_wagon(entity, true) - wagon.entity_count = 999 -end - -local function get_oil_amount(p) - return (math_abs(p.y) * 200 + 10000) * math_random(75, 125) * 0.01 -end - -local function process_level_11_position(p, seed, tiles, entities, markets, treasure) - local noise_1 = get_noise('small_caves', p, seed) - local noise_2 = get_noise('no_rocks_2', p, seed + 10000) - - if noise_1 > 0.7 then - tiles[#tiles + 1] = { name = 'water', position = p } - if math_random(1, 48) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - - if noise_1 < -0.72 then - tiles[#tiles + 1] = { name = 'lab-dark-1', position = p } - entities[#entities + 1] = { name = 'uranium-ore', position = p, amount = math_abs(p.y) + 1 * 3 } - return - end - - if noise_1 > -0.30 and noise_1 < 0.30 then - if noise_1 > -0.14 and noise_1 < 0.14 then - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 2) == 1 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - if math_random(1, 256) == 1 then - treasure[#treasure + 1] = p - end - else - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - end - return - end - - if math_random(1, 64) == 1 and noise_2 > 0.65 then - entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) } - end - if math_random(1, 8192) == 1 then - markets[#markets + 1] = p - end - if math_random(1, 1024) == 1 then - entities[#entities + 1] = { name = 'crash-site-chest-' .. math_random(1, 2), position = p, force = 'neutral' } - end - - tiles[#tiles + 1] = { name = 'tutorial-grid', position = p } -end - -local function process_level_10_position(p, seed, tiles, entities, markets, treasure) - local scrapyard = get_noise('scrapyard', p, seed) - - if scrapyard < -0.70 or scrapyard > 0.70 then - tiles[#tiles + 1] = { name = 'grass-3', position = p } - if math_random(1, 40) == 1 then - treasure[#treasure + 1] = p - end - return - end - - if scrapyard < -0.65 or scrapyard > 0.65 then - tiles[#tiles + 1] = { name = 'water-green', position = p } - return - end - if math_abs(scrapyard) > 0.40 and math_abs(scrapyard) < 0.65 then - if math_random(1, 64) == 1 then - Biters.wave_defense_set_worm_raffle(math_abs(p.y) * worm_level_modifier) - entities[#entities + 1] = { name = Biters.wave_defense_roll_worm_name(), position = p, force = 'enemy' } - end - tiles[#tiles + 1] = { name = 'water-mud', position = p } - return - end - if math_abs(scrapyard) > 0.25 and math_abs(scrapyard) < 0.40 then - if math_random(1, 128) == 1 then - Biters.wave_defense_set_worm_raffle(math_abs(p.y) * worm_level_modifier) - entities[#entities + 1] = { name = Biters.wave_defense_roll_worm_name(), position = p, force = 'enemy' } - end - tiles[#tiles + 1] = { name = 'water-shallow', position = p } - return - end - if scrapyard > -0.15 and scrapyard < 0.15 then - if math_random(1, 100) > 88 then - entities[#entities + 1] = { name = 'tree-0' .. math_random(1, 9), position = p } - else - if math_random(1, 2) == 1 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - end - tiles[#tiles + 1] = { name = 'dirt-6', position = p } - return - end - tiles[#tiles + 1] = { name = 'grass-2', position = p } -end - -local function process_level_9_position(p, seed, tiles, entities, markets, treasure) - local maze_p = { x = math_floor(p.x - p.x % 10), y = math_floor(p.y - p.y % 10) } - local maze_noise = get_noise('no_rocks_2', maze_p, seed) - - if maze_noise > -0.35 and maze_noise < 0.35 then - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - local no_rocks_2 = get_noise('no_rocks_2', p, seed) - if math_random(1, 2) == 1 and no_rocks_2 > -0.5 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - if math_random(1, 1024) == 1 then - treasure[#treasure + 1] = p - end - if math_random(1, 256) == 1 then - Biters.wave_defense_set_worm_raffle(math_abs(p.y) * worm_level_modifier) - entities[#entities + 1] = { name = Biters.wave_defense_roll_worm_name(), position = p, force = 'enemy' } - end - return - end - - if maze_noise > 0 and maze_noise < 0.45 then - if math_random(1, 512) == 1 then - markets[#markets + 1] = p - end - if math_random(1, 256) == 1 then - entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) } - end - if math_random(1, 32) == 1 then - entities[#entities + 1] = { name = 'tree-0' .. math_random(1, 9), position = p } - end - return - end - - if maze_noise < -0.5 or maze_noise > 0.5 then - tiles[#tiles + 1] = { name = 'deepwater', position = p } - if math_random(1, 96) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - - tiles[#tiles + 1] = { name = 'water', position = p } - if math_random(1, 96) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end -end - -local scrap_entities = { - 'crash-site-assembling-machine-1-broken', - 'crash-site-assembling-machine-2-broken', - 'crash-site-assembling-machine-1-broken', - 'crash-site-assembling-machine-2-broken', - 'crash-site-spaceship-wreck-medium-1', - 'crash-site-spaceship-wreck-medium-1', - 'crash-site-spaceship-wreck-medium-1', - 'crash-site-spaceship-wreck-medium-1', - 'crash-site-chest-1', - 'crash-site-chest-2', - 'crash-site-chest-1', - 'crash-site-chest-2', - 'crash-site-chest-1', - 'crash-site-chest-2' -} -local scrap_entities_index = #scrap_entities - ---SCRAPYARD -local function process_level_8_position(p, seed, tiles, entities, markets, treasure) - local scrapyard = get_noise('scrapyard', p, seed) - - --Chasms - local noise_cave_ponds = get_noise('cave_ponds', p, seed) - local small_caves = get_noise('small_caves', p, seed) - if noise_cave_ponds < 0.15 and noise_cave_ponds > -0.15 then - if small_caves > 0.35 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - if small_caves < -0.35 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - end - - if scrapyard < -0.25 or scrapyard > 0.25 then - if math_random(1, 256) == 1 then - entities[#entities + 1] = { name = 'gun-turret', position = p, force = 'enemy' } - end - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if scrapyard < -0.55 or scrapyard > 0.55 then - if math_random(1, 2) == 1 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - return - end - if scrapyard < -0.28 or scrapyard > 0.28 then - if math_random(1, 128) == 1 then - Biters.wave_defense_set_worm_raffle(math_abs(p.y) * worm_level_modifier) - entities[#entities + 1] = { name = Biters.wave_defense_roll_worm_name(), position = p, force = 'enemy' } - end - if math_random(1, 96) == 1 then - entities[#entities + 1] = { name = scrap_entities[math_random(1, scrap_entities_index)], position = p, force = 'enemy' } - end - if math_random(1, 5) > 1 then - entities[#entities + 1] = { name = 'mineable-wreckage', position = p } - end - if math_random(1, 256) == 1 then - entities[#entities + 1] = { name = 'land-mine', position = p, force = 'enemy' } - end - return - end - return - end - - local cave_ponds = get_noise('cave_ponds', p, seed) - if cave_ponds < -0.6 and scrapyard > -0.2 and scrapyard < 0.2 then - tiles[#tiles + 1] = { name = 'deepwater-green', position = p } - if math_random(1, 128) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - - local large_caves = get_noise('large_caves', p, seed) - if scrapyard > -0.15 and scrapyard < 0.15 then - if math_floor(large_caves * 10) % 4 < 3 then - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 2) == 1 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - return - end - end - - if math_random(1, 64) == 1 and cave_ponds > 0.6 then - entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) } - end - - tiles[#tiles + 1] = { name = 'stone-path', position = p } - if math_random(1, 256) == 1 then - entities[#entities + 1] = { name = 'land-mine', position = p, force = 'enemy' } - end -end - -local function process_level_7_position(p, seed, tiles, entities, markets, treasure) - local cave_rivers_3 = get_noise('cave_rivers_3', p, seed) - local cave_rivers_4 = get_noise('cave_rivers_4', p, seed + 50000) - local no_rocks_2 = get_noise('no_rocks_2', p, seed) - - if cave_rivers_3 > -0.025 and cave_rivers_3 < 0.025 and no_rocks_2 > -0.6 then - tiles[#tiles + 1] = { name = 'water', position = p } - if math_random(1, 128) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - - if cave_rivers_4 > -0.025 and cave_rivers_4 < 0.025 and no_rocks_2 > -0.6 then - tiles[#tiles + 1] = { name = 'water', position = p } - if math_random(1, 128) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - - local noise_ores = get_noise('no_rocks_2', p, seed + 25000) - - if cave_rivers_3 > -0.20 and cave_rivers_3 < 0.20 then - tiles[#tiles + 1] = { name = 'grass-' .. math_floor(cave_rivers_3 * 32) % 3 + 1, position = p } - if cave_rivers_3 > -0.10 and cave_rivers_3 < 0.10 then - if math_random(1, 8) == 1 and no_rocks_2 > -0.25 then - entities[#entities + 1] = { name = 'tree-01', position = p } - end - if math_random(1, 2048) == 1 then - markets[#markets + 1] = p - end - if noise_ores < -0.5 and no_rocks_2 > -0.6 then - if cave_rivers_3 > 0 and cave_rivers_3 < 0.07 then - entities[#entities + 1] = { name = 'iron-ore', position = p, amount = math_abs(p.y) + 1 } - end - end - end - if math_random(1, 64) == 1 and no_rocks_2 > 0.7 then - entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) } - end - if math_random(1, 2048) == 1 then - treasure[#treasure + 1] = p - end - return - end - - if cave_rivers_4 > -0.20 and cave_rivers_4 < 0.20 then - tiles[#tiles + 1] = { name = 'grass-' .. math_floor(cave_rivers_4 * 32) % 3 + 1, position = p } - if cave_rivers_4 > -0.10 and cave_rivers_4 < 0.10 then - if math_random(1, 8) == 1 and no_rocks_2 > -0.25 then - entities[#entities + 1] = { name = 'tree-02', position = p } - end - if math_random(1, 2048) == 1 then - markets[#markets + 1] = p - end - if noise_ores < -0.5 and no_rocks_2 > -0.6 then - if cave_rivers_4 > 0 and cave_rivers_4 < 0.07 then - entities[#entities + 1] = { name = 'copper-ore', position = p, amount = math_abs(p.y) + 1 } - end - end - end - if math_random(1, 64) == 1 and no_rocks_2 > 0.7 then - entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) } - end - if math_random(1, 2048) == 1 then - treasure[#treasure + 1] = p - end - return - end - - --Chasms - local noise_cave_ponds = get_noise('cave_ponds', p, seed) - local small_caves = get_noise('small_caves', p, seed) - if noise_cave_ponds < 0.25 and noise_cave_ponds > -0.25 then - if small_caves > 0.55 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - if small_caves < -0.55 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - end - - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 100) > 15 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - if math_random(1, 256) == 1 then - treasure[#treasure + 1] = p - end -end - -local function process_level_6_position(p, seed, tiles, entities, markets, treasure) - local large_caves = get_noise('large_caves', p, seed) - local cave_rivers = get_noise('cave_rivers', p, seed) - - --Chasms - local noise_cave_ponds = get_noise('cave_ponds', p, seed) - local small_caves = get_noise('small_caves', p, seed) - if noise_cave_ponds < 0.45 and noise_cave_ponds > -0.45 then - if small_caves > 0.45 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - if small_caves < -0.45 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - end - - if large_caves > -0.03 and large_caves < 0.03 and cave_rivers < 0.25 then - tiles[#tiles + 1] = { name = 'water-green', position = p } - if math_random(1, 128) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - - if cave_rivers > -0.1 and cave_rivers < 0.1 then - if math_random(1, 36) == 1 then - entities[#entities + 1] = { name = 'tree-0' .. math_random(1, 9), position = p } - end - if math_random(1, 128) == 1 then - Biters.wave_defense_set_worm_raffle(math_abs(p.y) * worm_level_modifier) - entities[#entities + 1] = { name = Biters.wave_defense_roll_worm_name(), position = p, force = 'enemy' } - end - else - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 100) > 15 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - if math_random(1, 512) == 1 then - treasure[#treasure + 1] = p - end - if math_random(1, 4096) == 1 then - entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) } - end - if math_random(1, 8096) == 1 then - markets[#markets + 1] = p - end - end -end - -local function process_level_5_position(p, seed, tiles, entities, markets, treasure) - local small_caves = get_noise('small_caves', p, seed) - local noise_cave_ponds = get_noise('cave_ponds', p, seed) - - if small_caves > -0.24 and small_caves < 0.24 then - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 768) == 1 then - treasure[#treasure + 1] = p - end - if math_random(1, 2) == 1 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - return - end - - if small_caves < -0.50 or small_caves > 0.50 then - tiles[#tiles + 1] = { name = 'deepwater-green', position = p } - if math_random(1, 128) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - if math_random(1, 128) == 1 then - Biters.wave_defense_set_worm_raffle(math_abs(p.y) * worm_level_modifier) - entities[#entities + 1] = { name = Biters.wave_defense_roll_worm_name(), position = p, force = 'enemy' } - end - return - end - - if small_caves > -0.40 and small_caves < 0.40 then - if noise_cave_ponds > 0.35 then - tiles[#tiles + 1] = { name = 'dirt-' .. math_random(1, 4), position = p } - if math_random(1, 256) == 1 then - treasure[#treasure + 1] = p - end - if math_random(1, 256) == 1 then - entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) } - end - return - end - if noise_cave_ponds > 0.25 then - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 512) == 1 then - treasure[#treasure + 1] = p - end - if math_random(1, 2) == 1 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - return - end - end - - tiles[#tiles + 1] = { name = 'out-of-map', position = p } -end - -local function process_level_4_position(p, seed, tiles, entities, markets, treasure) - local noise_large_caves = get_noise('large_caves', p, seed) - local noise_cave_ponds = get_noise('cave_ponds', p, seed) - local small_caves = get_noise('small_caves', p, seed) - - if math_abs(noise_large_caves) > 0.7 then - tiles[#tiles + 1] = { name = 'water', position = p } - if math_random(1, 16) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - if math_abs(noise_large_caves) > 0.6 then - if math_random(1, 16) == 1 then - entities[#entities + 1] = { name = 'tree-02', position = p } - end - if math_random(1, 32) == 1 then - markets[#markets + 1] = p - end - end - if math_abs(noise_large_caves) > 0.5 then - tiles[#tiles + 1] = { name = 'grass-2', position = p } - if math_random(1, 620) == 1 then - entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) } - end - if math_random(1, 384) == 1 then - Biters.wave_defense_set_worm_raffle(math_abs(p.y) * worm_level_modifier) - entities[#entities + 1] = { name = Biters.wave_defense_roll_worm_name(), position = p, force = 'enemy' } - end - if math_random(1, 1024) == 1 then - treasure[#treasure + 1] = p - end - return - end - if math_abs(noise_large_caves) > 0.475 then - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 2) == 1 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - if math_random(1, 2048) == 1 then - treasure[#treasure + 1] = p - end - return - end - - --Chasms - if noise_cave_ponds < 0.15 and noise_cave_ponds > -0.15 then - if small_caves > 0.75 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - if small_caves < -0.75 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - end - - if small_caves > -0.15 and small_caves < 0.15 then - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 2) == 1 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - if math_random(1, 1024) == 1 then - treasure[#treasure + 1] = p - end - return - end - - if noise_large_caves > -0.2 and noise_large_caves < 0.2 then - --Main Rock Terrain - local no_rocks_2 = get_noise('no_rocks_2', p, seed + 75000) - if no_rocks_2 > 0.80 or no_rocks_2 < -0.80 then - tiles[#tiles + 1] = { name = 'dirt-' .. math_floor(no_rocks_2 * 8) % 2 + 5, position = p } - if math_random(1, 512) == 1 then - treasure[#treasure + 1] = p - end - return - end - - if math_random(1, 2048) == 1 then - treasure[#treasure + 1] = p - end - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 100) > 30 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - return - end - - tiles[#tiles + 1] = { name = 'out-of-map', position = p } -end - -local function process_level_3_position(p, seed, tiles, entities, markets, treasure) - local small_caves = get_noise('small_caves', p, seed + 50000) - local small_caves_2 = get_noise('small_caves_2', p, seed + 70000) - local noise_large_caves = get_noise('large_caves', p, seed + 60000) - local noise_cave_ponds = get_noise('cave_ponds', p, seed) - - --Market Spots - if noise_cave_ponds < -0.77 then - if noise_cave_ponds > -0.79 then - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - else - tiles[#tiles + 1] = { name = 'grass-' .. math_floor(noise_cave_ponds * 32) % 3 + 1, position = p } - if math_random(1, 32) == 1 then - markets[#markets + 1] = p - end - if math_random(1, 16) == 1 then - entities[#entities + 1] = { name = 'tree-0' .. math_random(1, 9), position = p } - end - end - return - end - - if noise_large_caves > -0.15 and noise_large_caves < 0.15 or small_caves_2 > 0 then - --Green Water Ponds - if noise_cave_ponds > 0.80 then - tiles[#tiles + 1] = { name = 'deepwater-green', position = p } - if math_random(1, 16) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - - --Chasms - if noise_cave_ponds < 0.12 and noise_cave_ponds > -0.12 then - if small_caves > 0.85 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - if small_caves < -0.85 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - end - - --Rivers - local cave_rivers = get_noise('cave_rivers', p, seed + 100000) - if cave_rivers < 0.024 and cave_rivers > -0.024 then - if noise_cave_ponds > 0.2 then - tiles[#tiles + 1] = { name = 'water-shallow', position = p } - if math_random(1, 64) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - end - local cave_rivers_2 = get_noise('cave_rivers_2', p, seed) - if cave_rivers_2 < 0.024 and cave_rivers_2 > -0.024 then - if noise_cave_ponds < 0.4 then - tiles[#tiles + 1] = { name = 'water-shallow', position = p } - if math_random(1, 64) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - end - - if noise_cave_ponds > 0.725 then - tiles[#tiles + 1] = { name = 'dirt-' .. math_random(4, 6), position = p } - return - end - - local no_rocks = get_noise('no_rocks', p, seed + 25000) - --Worm oil Zones - if no_rocks < 0.20 and no_rocks > -0.20 then - if small_caves > 0.35 then - tiles[#tiles + 1] = { name = 'dirt-' .. math_floor(noise_cave_ponds * 32) % 7 + 1, position = p } - if math_random(1, 320) == 1 then - entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) } - end - if math_random(1, 50) == 1 then - Biters.wave_defense_set_worm_raffle(math_abs(p.y) * worm_level_modifier) - entities[#entities + 1] = { name = Biters.wave_defense_roll_worm_name(), position = p, force = 'enemy' } - end - if math_random(1, 512) == 1 then - treasure[#treasure + 1] = p - end - if math_random(1, 64) == 1 then - entities[#entities + 1] = { name = 'dead-tree-desert', position = p } - end - return - end - end - - --Main Rock Terrain - local no_rocks_2 = get_noise('no_rocks_2', p, seed + 75000) - if no_rocks_2 > 0.80 or no_rocks_2 < -0.80 then - tiles[#tiles + 1] = { name = 'dirt-' .. math_floor(no_rocks_2 * 8) % 2 + 5, position = p } - if math_random(1, 512) == 1 then - treasure[#treasure + 1] = p - end - return - end - - if math_random(1, 2048) == 1 then - treasure[#treasure + 1] = p - end - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 100) > 30 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - return - end - - tiles[#tiles + 1] = { name = 'out-of-map', position = p } -end - -local function process_level_2_position(p, seed, tiles, entities, markets, treasure) - local small_caves = get_noise('small_caves', p, seed) - local noise_large_caves = get_noise('large_caves', p, seed) - - if noise_large_caves > -0.75 and noise_large_caves < 0.75 then - local noise_cave_ponds = get_noise('cave_ponds', p, seed) - - --Chasms - if noise_cave_ponds < 0.15 and noise_cave_ponds > -0.15 then - if small_caves > 0.32 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - if small_caves < -0.32 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - end - - --Green Water Ponds - if noise_cave_ponds > 0.80 then - tiles[#tiles + 1] = { name = 'deepwater-green', position = p } - if math_random(1, 16) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - - --Rivers - local cave_rivers = get_noise('cave_rivers', p, seed + 100000) - if cave_rivers < 0.037 and cave_rivers > -0.037 then - if noise_cave_ponds < 0.1 then - tiles[#tiles + 1] = { name = 'water-shallow', position = p } - if math_random(1, 64) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - end - - if noise_cave_ponds > 0.66 then - tiles[#tiles + 1] = { name = 'dirt-' .. math_random(4, 6), position = p } - return - end - - --Market Spots - if noise_cave_ponds < -0.80 then - tiles[#tiles + 1] = { name = 'grass-' .. math_floor(noise_cave_ponds * 32) % 3 + 1, position = p } - if math_random(1, 32) == 1 then - markets[#markets + 1] = p - end - if math_random(1, 16) == 1 then - entities[#entities + 1] = { name = 'tree-0' .. math_random(1, 9), position = p } - end - return - end - - local no_rocks = get_noise('no_rocks', p, seed + 25000) - --Worm oil Zones - if no_rocks < 0.20 and no_rocks > -0.20 then - if small_caves > 0.30 then - tiles[#tiles + 1] = { name = 'dirt-' .. math_floor(noise_cave_ponds * 32) % 7 + 1, position = p } - if math_random(1, 450) == 1 then - entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) } - end - if math_random(1, 64) == 1 then - Biters.wave_defense_set_worm_raffle(math_abs(p.y) * worm_level_modifier) - entities[#entities + 1] = { name = Biters.wave_defense_roll_worm_name(), position = p, force = 'enemy' } - end - if math_random(1, 1024) == 1 then - treasure[#treasure + 1] = p - end - if math_random(1, 64) == 1 then - entities[#entities + 1] = { name = 'dead-tree-desert', position = p } - end - return - end - end - - --Main Rock Terrain - local no_rocks_2 = get_noise('no_rocks_2', p, seed + 75000) - if no_rocks_2 > 0.80 or no_rocks_2 < -0.80 then - tiles[#tiles + 1] = { name = 'dirt-' .. math_floor(no_rocks_2 * 8) % 2 + 5, position = p } - if math_random(1, 512) == 1 then - treasure[#treasure + 1] = p - end - return - end - - if math_random(1, 2048) == 1 then - treasure[#treasure + 1] = p - end - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 100) > 25 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end - return - end - - tiles[#tiles + 1] = { name = 'out-of-map', position = p } -end - -local function process_level_1_position(p, seed, tiles, entities, markets, treasure) - local small_caves = get_noise('small_caves', p, seed) - local noise_large_caves = get_noise('large_caves', p, seed) - - local noise_cave_ponds = get_noise('cave_ponds', p, seed) - - --Chasms - if noise_cave_ponds < 0.12 and noise_cave_ponds > -0.12 then - if small_caves > 0.55 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - if small_caves < -0.55 then - tiles[#tiles + 1] = { name = 'out-of-map', position = p } - return - end - end - - --Green Water Ponds - if noise_cave_ponds > 0.80 then - tiles[#tiles + 1] = { name = 'deepwater-green', position = p } - if math_random(1, 16) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - - --Rivers - local cave_rivers = get_noise('cave_rivers', p, seed + 100000) - if cave_rivers < 0.044 and cave_rivers > -0.044 then - if noise_cave_ponds > 0 then - tiles[#tiles + 1] = { name = 'water-shallow', position = p } - if math_random(1, 64) == 1 then - entities[#entities + 1] = { name = 'fish', position = p } - end - return - end - end - - if noise_cave_ponds > 0.76 then - tiles[#tiles + 1] = { name = 'dirt-' .. math_random(4, 6), position = p } - return - end - - --Market Spots - if noise_cave_ponds < -0.75 then - tiles[#tiles + 1] = { name = 'grass-' .. math_floor(noise_cave_ponds * 32) % 3 + 1, position = p } - if math_random(1, 32) == 1 then - markets[#markets + 1] = p - end - if math_random(1, 32) == 1 then - entities[#entities + 1] = { name = 'tree-0' .. math_random(1, 9), position = p } - end - return - end - - local no_rocks = get_noise('no_rocks', p, seed + 25000) - --Worm oil Zones - if p.y < -64 + noise_cave_ponds * 10 then - if no_rocks < 0.12 and no_rocks > -0.12 then - if small_caves > 0.30 then - tiles[#tiles + 1] = { name = 'dirt-' .. math_floor(noise_cave_ponds * 32) % 7 + 1, position = p } - if math_random(1, 450) == 1 then - entities[#entities + 1] = { name = 'crude-oil', position = p, amount = get_oil_amount(p) } - end - if math_random(1, 96) == 1 then - Biters.wave_defense_set_worm_raffle(math_abs(p.y) * worm_level_modifier) - entities[#entities + 1] = { name = Biters.wave_defense_roll_worm_name(), position = p, force = 'enemy' } - end - if math_random(1, 1024) == 1 then - treasure[#treasure + 1] = p - end - if math_random(1, 64) == 1 then - entities[#entities + 1] = { name = 'dead-tree-desert', position = p } - end - return - end - end - end - - --Main Rock Terrain - local no_rocks_2 = get_noise('no_rocks_2', p, seed + 75000) - if no_rocks_2 > 0.65 or no_rocks_2 < -0.65 then - tiles[#tiles + 1] = { name = 'dirt-' .. math_floor(no_rocks_2 * 8) % 2 + 5, position = p } - if math_random(1, 32) == 1 then - entities[#entities + 1] = { name = 'dead-tree-desert', position = p } - end - if math_random(1, 512) == 1 then - treasure[#treasure + 1] = p - end - return - end - - if math_random(1, 2048) == 1 then - treasure[#treasure + 1] = p - end - tiles[#tiles + 1] = { name = 'dirt-7', position = p } - if math_random(1, 100) > 25 then - entities[#entities + 1] = { name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p } - end -end - -local levels = { - process_level_1_position, - process_level_2_position, - process_level_3_position, - process_level_4_position, - process_level_5_position, - process_level_6_position, - process_level_7_position, - process_level_8_position, - process_level_9_position, - process_level_10_position, - process_level_11_position -} - -local entity_functions = { - ['turret'] = function (surface, entity) - surface.create_entity(entity) - end, - ['simple-entity'] = function (surface, entity) - surface.create_entity(entity) - end, - ['ammo-turret'] = function (surface, entity) - local e = surface.create_entity(entity) - e.insert({ name = 'uranium-rounds-magazine', count = math_random(16, 64) }) - end, - ['container'] = function (surface, entity) - Treasure(surface, entity.position, entity.name) - end -} - -local function rock_chunk(surface, left_top) - local tiles = {} - local entities = {} - local markets = {} - local treasure = {} - local seed = surface.map_gen_settings.seed - - local level_index = math_floor((math_abs(left_top.y / level_depth)) % 11) + 1 - local process_level = levels[level_index] - - for y = 0, 31, 1 do - for x = 0, 31, 1 do - local p = { x = left_top.x + x, y = left_top.y + y } - process_level(p, seed, tiles, entities, markets, treasure) - end - end - surface.set_tiles(tiles, true) - - if #markets > 0 then - local position = markets[math_random(1, #markets)] - if surface.count_entities_filtered { area = { { position.x - 96, position.y - 96 }, { position.x + 96, position.y + 96 } }, name = 'market', limit = 1 } == 0 then - local market = Market.mountain_market(surface, position, math_abs(position.y) * 0.004) - market.destructible = false - end - end - - for _, p in pairs(treasure) do - local name = 'wooden-chest' - if math_random(1, 6) == 1 then - name = 'iron-chest' - end - Treasure(surface, p, name) - end - - for _, entity in pairs(entities) do - if entity_functions[prototypes.entity[entity.name].type] then - entity_functions[prototypes.entity[entity.name].type](surface, entity) - else - if surface.can_place_entity(entity) then - surface.create_entity(entity) - end - end - end -end - -local function border_chunk(surface, left_top) - local trees = { 'dead-grey-trunk', 'dead-grey-trunk', 'dry-tree' } - for x = 0, 31, 1 do - for y = 5, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - if math_random(1, math.ceil(pos.y + pos.y) + 64) == 1 then - surface.create_entity({ name = trees[math_random(1, #trees)], position = pos }) - end - end - end - - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - if math_random(1, pos.y + 2) == 1 then - surface.create_decoratives { - check_collision = false, - decoratives = { - { name = 'medium-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) } - } - } - end - if math_random(1, pos.y + 2) == 1 then - surface.create_decoratives { - check_collision = false, - decoratives = { - { name = 'small-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) } - } - } - end - if math_random(1, pos.y + 2) == 1 then - surface.create_decoratives { - check_collision = false, - decoratives = { - { name = 'tiny-rock', position = pos, amount = math_random(1, 1 + math.ceil(20 - y / 2)) } - } - } - end - if math_random(1, math.ceil(pos.y + pos.y) + 2) == 1 then - surface.create_entity({ name = rock_raffle[math_random(1, size_of_rock_raffle)], position = pos }) - end - end - end - - for _, e in pairs(surface.find_entities_filtered({ area = { { left_top.x, left_top.y }, { left_top.x + 32, left_top.y + 32 } }, type = 'cliff' })) do - e.destroy() - end -end - -local function biter_chunk(surface, left_top) - local tile_positions = {} - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local p = { x = left_top.x + x, y = left_top.y + y } - tile_positions[#tile_positions + 1] = p - end - end - - for i = 1, 1, 1 do - local position = surface.find_non_colliding_position('biter-spawner', tile_positions[math_random(1, #tile_positions)], 16, 2) - if position then - local e = surface.create_entity({ name = spawner_raffle[math_random(1, #spawner_raffle)], position = position, force = 'enemy' }) - e.destructible = false - e.active = false - end - end - - for i = 1, 3, 1 do - local position = surface.find_non_colliding_position('big-worm-turret', tile_positions[math_random(1, #tile_positions)], 16, 2) - if position then - local e = surface.create_entity({ name = 'big-worm-turret', position = position, force = 'enemy' }) - e.destructible = false - end - end - --for _, e in pairs(surface.find_entities_filtered({area = {{left_top.x, left_top.y},{left_top.x + 32, left_top.y + 32}}, type = "cliff"})) do e.destroy() end -end - -local function replace_water(surface, left_top) - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local p = { x = left_top.x + x, y = left_top.y + y } - if surface.get_tile(p).collides_with('resource') then - surface.set_tiles({ { name = get_replacement_tile(surface, p), position = p } }, true) - end - end - end -end - -local function out_of_map(surface, left_top) - for x = 0, 31, 1 do - for y = 0, 31, 1 do - surface.set_tiles({ { name = 'out-of-map', position = { x = left_top.x + x, y = left_top.y + y } } }) - end - end -end - -local function wall(surface, left_top, seed) - local entities = {} - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local p = { x = left_top.x + x, y = left_top.y + y } - local small_caves = get_noise('small_caves', p, seed) - local cave_ponds = get_noise('cave_rivers', p, seed + 100000) - if y > 9 + cave_ponds * 6 and y < 23 + small_caves * 6 then - if small_caves > 0.15 or cave_ponds > 0.15 then - --surface.set_tiles({{name = "water-shallow", position = p}}) - surface.set_tiles({ { name = 'deepwater', position = p } }) - if math_random(1, 48) == 1 then - surface.create_entity({ name = 'fish', position = p }) - end - else - surface.set_tiles({ { name = 'dirt-7', position = p } }) - if math_random(1, 2) == 1 then - surface.create_entity({ name = rock_raffle[math_random(1, size_of_rock_raffle)], position = p }) - end - end - else - surface.set_tiles({ { name = 'dirt-7', position = p } }) - - if surface.can_place_entity({ name = 'stone-wall', position = p, force = 'enemy' }) then - if math_random(1, 512) == 1 and y > 3 and y < 28 then - if math_random(1, 2) == 1 then - Treasure(surface, p, 'wooden-chest') - else - Treasure(surface, p, 'iron-chest') - end - else - if y < 5 or y > 26 then - if y <= 15 then - if math_random(1, y + 1) == 1 then - local e = surface.create_entity({ name = 'stone-wall', position = p, force = 'player' }) - e.minable = false - end - else - if math_random(1, 32 - y) == 1 then - local e = surface.create_entity({ name = 'stone-wall', position = p, force = 'player' }) - e.minable = false - end - end - end - end - end - - if math_random(1, 16) == 1 then - if surface.can_place_entity({ name = 'small-worm-turret', position = p, force = 'enemy' }) then - Biters.wave_defense_set_worm_raffle(math_abs(p.y) * worm_level_modifier) - surface.create_entity({ name = Biters.wave_defense_roll_worm_name(), position = p, force = 'enemy' }) - end - end - - if math_random(1, 32) == 1 then - if surface.can_place_entity({ name = 'gun-turret', position = p, force = 'enemy' }) then - local e = surface.create_entity({ name = 'gun-turret', position = p, force = 'enemy' }) - if math_abs(p.y) < level_depth * 2.5 then - e.insert({ name = 'firearm-magazine', count = math_random(64, 128) }) - elseif math_abs(p.y) < level_depth * 4.5 then - e.insert({ name = 'piercing-rounds-magazine', count = math_random(64, 128) }) - else - e.insert({ name = 'uranium-rounds-magazine', count = math_random(64, 128) }) - end - end - end - end - end - end -end - -local function process_chunk(surface, left_top) - if not surface then - return - end - if not surface.valid then - return - end - if left_top.x >= level_depth * 0.5 then - return - end - if left_top.x < level_depth * -0.5 then - return - end - - if left_top.y % level_depth == 0 and left_top.y < 0 then - wall(surface, left_top, surface.map_gen_settings.seed) - return - end - - if left_top.y >= 0 then - replace_water(surface, left_top) - end - if left_top.y > 32 then - game.forces.player.chart(surface, { { left_top.x, left_top.y }, { left_top.x + 31, left_top.y + 31 } }) - end - if left_top.y == -128 and left_top.x == -128 then - local p = storage.locomotive.position - for _, entity in pairs(surface.find_entities_filtered({ area = { { p.x - 3, p.y - 4 }, { p.x + 3, p.y + 10 } }, type = 'simple-entity' })) do - entity.destroy() - end - end - if left_top.y < 0 then - rock_chunk(surface, left_top) - if math_random(1, chance_for_wagon_spawn) == 1 then - place_wagon(surface, left_top) - end - return - end - if left_top.y > 96 then - out_of_map(surface, left_top) - return - end - if left_top.y > 64 then - biter_chunk(surface, left_top) - return - end - if left_top.y >= 0 then - border_chunk(surface, left_top) - return - end -end - -local function on_chunk_generated(event) - if string.sub(event.surface.name, 0, 8) ~= 'mountain' then - return - end - process_chunk(event.surface, event.area.left_top) -end - -local event = require 'utils.event' -event.add(defines.events.on_chunk_generated, on_chunk_generated) - -return level_depth diff --git a/maps/mountain_fortress_v2/treasure.lua b/maps/mountain_fortress_v2/treasure.lua deleted file mode 100644 index 2080e6581..000000000 --- a/maps/mountain_fortress_v2/treasure.lua +++ /dev/null @@ -1,222 +0,0 @@ ---luacheck: ignore -local Public = {} - -local math_random = math.random -local math_floor = math.floor -local math_abs = math.abs - -local LootRaffle = require 'utils.functions.loot_raffle' - -local blacklist = { - ['cargo-wagon'] = true, - ['locomotive'] = true, - ['artillery-wagon'] = true, - ['fluid-wagon'] = true -} - -function Public.treasure_chest(surface, position, container_name) - local budget = 48 + math_abs(position.y) * 1.75 - budget = budget * math_random(25, 175) * 0.01 - - if math_random(1, 128) == 1 then - budget = budget * 4 - container_name = 'crash-site-chest-' .. math_random(1, 2) - end - if math_random(1, 256) == 1 then - budget = budget * 4 - container_name = 'crash-site-chest-' .. math_random(1, 2) - end - - budget = math_floor(budget) + 1 - - local item_stacks = LootRaffle.roll(budget, 8, blacklist) - local container = surface.create_entity({ name = container_name, position = position, force = 'neutral' }) - for _, item_stack in pairs(item_stacks) do - container.insert(item_stack) - end - container.minable = false - - for _ = 1, 3, 1 do - if math_random(1, 8) == 1 then - container.insert({ name = 'explosives', count = math_random(25, 50) }) - else - break - end - end -end - -function Public.treasure_chest_old(surface, position, container_name) - local chest_raffle = {} - local chest_loot = { - { { name = 'submachine-gun', count = math_random(1, 3) }, weight = 3, d_min = 0.0, d_max = 0.1 }, - { { name = 'slowdown-capsule', count = math_random(16, 32) }, weight = 1, d_min = 0.3, d_max = 0.7 }, - { { name = 'poison-capsule', count = math_random(8, 16) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, d_min = 0.6, d_max = 1 }, - { { name = 'cannon-shell', count = math_random(16, 32) }, weight = 5, d_min = 0.4, d_max = 0.7 }, - { { name = 'explosive-uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, d_min = 0.6, d_max = 1 }, - { { name = 'explosive-cannon-shell', count = math_random(16, 32) }, weight = 5, d_min = 0.4, d_max = 0.8 }, - { { name = 'shotgun', count = 1 }, weight = 2, d_min = 0.0, d_max = 0.2 }, - { { name = 'shotgun-shell', count = math_random(16, 32) }, weight = 5, d_min = 0.0, d_max = 0.2 }, - { { name = 'combat-shotgun', count = 1 }, weight = 3, d_min = 0.3, d_max = 0.8 }, - { { name = 'piercing-shotgun-shell', count = math_random(16, 32) }, weight = 10, d_min = 0.2, d_max = 1 }, - { { name = 'flamethrower', count = 1 }, weight = 3, d_min = 0.3, d_max = 0.6 }, - { { name = 'flamethrower-ammo', count = math_random(16, 32) }, weight = 5, d_min = 0.3, d_max = 1 }, - { { name = 'rocket-launcher', count = 1 }, weight = 3, d_min = 0.2, d_max = 0.6 }, - { { name = 'rocket', count = math_random(16, 32) }, weight = 5, d_min = 0.2, d_max = 0.7 }, - { { name = 'explosive-rocket', count = math_random(16, 32) }, weight = 5, d_min = 0.3, d_max = 1 }, - { { name = 'land-mine', count = math_random(16, 32) }, weight = 5, d_min = 0.2, d_max = 0.7 }, - { { name = 'grenade', count = math_random(16, 32) }, weight = 5, d_min = 0.0, d_max = 0.5 }, - { { name = 'cluster-grenade', count = math_random(8, 16) }, weight = 5, d_min = 0.4, d_max = 1 }, - { { name = 'firearm-magazine', count = math_random(32, 128) }, weight = 5, d_min = 0, d_max = 0.3 }, - { { name = 'piercing-rounds-magazine', count = math_random(32, 128) }, weight = 5, d_min = 0.1, d_max = 0.8 }, - { { name = 'uranium-rounds-magazine', count = math_random(32, 128) }, weight = 5, d_min = 0.5, d_max = 1 }, - { { name = 'railgun', count = 1 }, weight = 1, d_min = 0.2, d_max = 1 }, - { { name = 'railgun-dart', count = math_random(16, 32) }, weight = 3, d_min = 0.2, d_max = 0.7 }, - { { name = 'defender-capsule', count = math_random(8, 16) }, weight = 2, d_min = 0.0, d_max = 0.7 }, - { { name = 'distractor-capsule', count = math_random(8, 16) }, weight = 2, d_min = 0.2, d_max = 1 }, - { { name = 'destroyer-capsule', count = math_random(8, 16) }, weight = 2, d_min = 0.3, d_max = 1 }, - { { name = 'atomic-bomb', count = 1 }, weight = 1, d_min = 0.8, d_max = 1 }, - { { name = 'light-armor', count = 1 }, weight = 3, d_min = 0, d_max = 0.1 }, - { { name = 'heavy-armor', count = 1 }, weight = 3, d_min = 0.1, d_max = 0.3 }, - { { name = 'modular-armor', count = 1 }, weight = 2, d_min = 0.2, d_max = 0.6 }, - { { name = 'power-armor', count = 1 }, weight = 1, d_min = 0.4, d_max = 1 }, - --{{name = "power-armor-mk2", count = 1}, weight = 1, d_min = 0.9, d_max = 1}, - { { name = 'battery-equipment', count = 1 }, weight = 2, d_min = 0.3, d_max = 0.7 }, - --{{name = "battery-mk2-equipment", count = 1}, weight = 2, d_min = 0.7, d_max = 1}, - { { name = 'belt-immunity-equipment', count = 1 }, weight = 1, d_min = 0.5, d_max = 1 }, - { { name = 'solar-panel-equipment', count = math_random(1, 4) }, weight = 5, d_min = 0.4, d_max = 0.8 }, - { { name = 'discharge-defense-equipment', count = 1 }, weight = 1, d_min = 0.5, d_max = 1 }, - { { name = 'discharge-defense-remote', count = 1 }, weight = 1, d_min = 0.5, d_max = 1 }, - { { name = 'energy-shield-equipment', count = math_random(1, 2) }, weight = 2, d_min = 0.3, d_max = 0.8 }, - --{{name = "energy-shield-mk2-equipment", count = 1}, weight = 2, d_min = 0.8, d_max = 1}, - { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, d_min = 0.3, d_max = 1 }, - --{{name = "fusion-reactor-equipment", count = 1}, weight = 1, d_min = 0.8, d_max = 1}, - { { name = 'night-vision-equipment', count = 1 }, weight = 1, d_min = 0.3, d_max = 0.8 }, - { { name = 'personal-laser-defense-equipment', count = 1 }, weight = 1, d_min = 0.7, d_max = 1 }, - { { name = 'personal-roboport-equipment', count = math_random(1, 2) }, weight = 3, d_min = 0.4, d_max = 1 }, - --{{name = "personal-roboport-mk2-equipment", count = 1}, weight = 1, d_min = 0.9, d_max = 1}, - { { name = 'logistic-robot', count = math_random(5, 25) }, weight = 2, d_min = 0.5, d_max = 1 }, - { { name = 'construction-robot', count = math_random(5, 25) }, weight = 5, d_min = 0.4, d_max = 1 }, - { { name = 'iron-gear-wheel', count = math_random(80, 100) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'copper-cable', count = math_random(100, 200) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'engine-unit', count = math_random(16, 32) }, weight = 2, d_min = 0.1, d_max = 0.5 }, - { { name = 'electric-engine-unit', count = math_random(16, 32) }, weight = 2, d_min = 0.4, d_max = 0.8 }, - { { name = 'battery', count = math_random(50, 150) }, weight = 2, d_min = 0.3, d_max = 0.8 }, - { { name = 'advanced-circuit', count = math_random(50, 150) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'electronic-circuit', count = math_random(50, 150) }, weight = 4, d_min = 0.0, d_max = 0.4 }, - { { name = 'processing-unit', count = math_random(50, 150) }, weight = 3, d_min = 0.7, d_max = 1 }, - { { name = 'explosives', count = math_random(40, 100) }, weight = 20, d_min = 0.0, d_max = 1 }, - { { name = 'lubricant-barrel', count = math_random(4, 10) }, weight = 1, d_min = 0.3, d_max = 0.5 }, - { { name = 'rocket-fuel', count = math_random(4, 10) }, weight = 2, d_min = 0.3, d_max = 0.7 }, - --{{name = "computer", count = 1}, weight = 2, d_min = 0, d_max = 1}, - - { { name = 'efficiency-module', count = math_random(1, 4) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'productivity-module', count = math_random(1, 4) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'speed-module', count = math_random(1, 4) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'automation-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.0, d_max = 0.2 }, - { { name = 'logistic-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.1, d_max = 0.5 }, - { { name = 'military-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.2, d_max = 1 }, - { { name = 'chemical-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'production-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.4, d_max = 1 }, - { { name = 'utility-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'space-science-pack', count = math_random(16, 64) }, weight = 3, d_min = 0.9, d_max = 1 }, - { { name = 'steel-plate', count = math_random(25, 75) }, weight = 2, d_min = 0.1, d_max = 0.3 }, - { { name = 'nuclear-fuel', count = 1 }, weight = 2, d_min = 0.7, d_max = 1 }, - { { name = 'burner-inserter', count = math_random(8, 16) }, weight = 3, d_min = 0.0, d_max = 0.1 }, - { { name = 'inserter', count = math_random(8, 16) }, weight = 3, d_min = 0.0, d_max = 0.4 }, - { { name = 'long-handed-inserter', count = math_random(8, 16) }, weight = 3, d_min = 0.0, d_max = 0.4 }, - { { name = 'fast-inserter', count = math_random(8, 16) }, weight = 3, d_min = 0.1, d_max = 1 }, - { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 1, d_min = 0.4, d_max = 1 }, - { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'small-electric-pole', count = math_random(16, 24) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'medium-electric-pole', count = math_random(8, 16) }, weight = 3, d_min = 0.2, d_max = 1 }, - { { name = 'big-electric-pole', count = math_random(4, 8) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'substation', count = math_random(2, 4) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'wooden-chest', count = math_random(8, 16) }, weight = 3, d_min = 0.0, d_max = 0.2 }, - { { name = 'iron-chest', count = math_random(8, 16) }, weight = 3, d_min = 0.1, d_max = 0.4 }, - { { name = 'steel-chest', count = math_random(8, 16) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'small-lamp', count = math_random(16, 32) }, weight = 3, d_min = 0.1, d_max = 0.3 }, - { { name = 'rail', count = math_random(25, 75) }, weight = 3, d_min = 0.1, d_max = 0.6 }, - { { name = 'assembling-machine-1', count = math_random(2, 4) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'assembling-machine-2', count = math_random(2, 4) }, weight = 3, d_min = 0.2, d_max = 0.8 }, - { { name = 'assembling-machine-3', count = math_random(2, 4) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'accumulator', count = math_random(4, 8) }, weight = 3, d_min = 0.4, d_max = 1 }, - { { name = 'offshore-pump', count = math_random(1, 3) }, weight = 2, d_min = 0.0, d_max = 0.2 }, - { { name = 'beacon', count = 1 }, weight = 2, d_min = 0.7, d_max = 1 }, - { { name = 'boiler', count = math_random(3, 6) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'steam-engine', count = math_random(2, 4) }, weight = 3, d_min = 0.0, d_max = 0.5 }, - { { name = 'steam-turbine', count = math_random(1, 2) }, weight = 2, d_min = 0.6, d_max = 1 }, - { { name = 'nuclear-reactor', count = 1 }, weight = 1, d_min = 0.7, d_max = 1 }, - { { name = 'centrifuge', count = 1 }, weight = 1, d_min = 0.6, d_max = 1 }, - { { name = 'heat-pipe', count = math_random(4, 8) }, weight = 2, d_min = 0.5, d_max = 1 }, - { { name = 'heat-exchanger', count = math_random(2, 4) }, weight = 2, d_min = 0.5, d_max = 1 }, - { { name = 'arithmetic-combinator', count = math_random(4, 8) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'constant-combinator', count = math_random(4, 8) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'decider-combinator', count = math_random(4, 8) }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'power-switch', count = 1 }, weight = 2, d_min = 0.1, d_max = 1 }, - { { name = 'programmable-speaker', count = math_random(2, 4) }, weight = 1, d_min = 0.1, d_max = 1 }, - { { name = 'chemical-plant', count = math_random(1, 3) }, weight = 3, d_min = 0.3, d_max = 1 }, - { { name = 'burner-mining-drill', count = math_random(2, 4) }, weight = 3, d_min = 0.0, d_max = 0.2 }, - { { name = 'electric-mining-drill', count = math_random(2, 4) }, weight = 3, d_min = 0.2, d_max = 1 }, - { { name = 'express-transport-belt', count = math_random(25, 75) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'express-underground-belt', count = math_random(4, 8) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'express-splitter', count = math_random(1, 4) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'fast-transport-belt', count = math_random(25, 75) }, weight = 3, d_min = 0.2, d_max = 0.7 }, - { { name = 'fast-underground-belt', count = math_random(4, 8) }, weight = 3, d_min = 0.2, d_max = 0.7 }, - { { name = 'fast-splitter', count = math_random(1, 4) }, weight = 3, d_min = 0.2, d_max = 0.3 }, - { { name = 'transport-belt', count = math_random(25, 75) }, weight = 3, d_min = 0, d_max = 0.3 }, - { { name = 'underground-belt', count = math_random(4, 8) }, weight = 3, d_min = 0, d_max = 0.3 }, - { { name = 'splitter', count = math_random(1, 4) }, weight = 3, d_min = 0, d_max = 0.3 }, - --{{name = "oil-refinery", count = math_random(2,4)}, weight = 2, d_min = 0.3, d_max = 1}, - { { name = 'pipe', count = math_random(30, 50) }, weight = 3, d_min = 0.0, d_max = 0.3 }, - { { name = 'pipe-to-ground', count = math_random(4, 8) }, weight = 1, d_min = 0.2, d_max = 0.5 }, - { { name = 'pumpjack', count = math_random(1, 3) }, weight = 1, d_min = 0.3, d_max = 0.8 }, - { { name = 'pump', count = math_random(1, 2) }, weight = 1, d_min = 0.3, d_max = 0.8 }, - { { name = 'solar-panel', count = math_random(3, 6) }, weight = 3, d_min = 0.4, d_max = 0.9 }, - { { name = 'electric-furnace', count = math_random(2, 4) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'steel-furnace', count = math_random(4, 8) }, weight = 3, d_min = 0.2, d_max = 0.7 }, - { { name = 'stone-furnace', count = math_random(8, 16) }, weight = 3, d_min = 0.0, d_max = 0.2 }, - { { name = 'radar', count = math_random(1, 2) }, weight = 1, d_min = 0.1, d_max = 0.4 }, - { { name = 'rail-signal', count = math_random(8, 16) }, weight = 2, d_min = 0.2, d_max = 0.8 }, - { { name = 'rail-chain-signal', count = math_random(8, 16) }, weight = 2, d_min = 0.2, d_max = 0.8 }, - { { name = 'stone-wall', count = math_random(33, 99) }, weight = 3, d_min = 0.0, d_max = 0.7 }, - { { name = 'gate', count = math_random(16, 32) }, weight = 3, d_min = 0.0, d_max = 0.7 }, - { { name = 'storage-tank', count = math_random(2, 6) }, weight = 3, d_min = 0.3, d_max = 0.6 }, - { { name = 'train-stop', count = math_random(1, 2) }, weight = 1, d_min = 0.2, d_max = 0.7 }, - { { name = 'express-loader', count = math_random(1, 2) }, weight = 1, d_min = 0.5, d_max = 1 }, - { { name = 'fast-loader', count = math_random(1, 2) }, weight = 1, d_min = 0.2, d_max = 0.7 }, - { { name = 'loader', count = math_random(1, 2) }, weight = 1, d_min = 0.0, d_max = 0.5 }, - { { name = 'lab', count = math_random(1, 2) }, weight = 2, d_min = 0.0, d_max = 0.3 }, - { { name = 'roboport', count = 1 }, weight = 2, d_min = 0.8, d_max = 1 }, - { { name = 'flamethrower-turret', count = 1 }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'laser-turret', count = math_random(3, 6) }, weight = 3, d_min = 0.5, d_max = 1 }, - { { name = 'gun-turret', count = math_random(2, 4) }, weight = 3, d_min = 0.2, d_max = 0.9 }, - { { name = 'crude-oil-barrel', count = math_random(2, 4) }, weight = 3, d_min = 0.1, d_max = 0.3 }, - { { name = 'crude-oil-barrel', count = math_random(4, 8) }, weight = 3, d_min = 0.2, d_max = 0.5 }, - { { name = 'crude-oil-barrel', count = math_random(8, 16) }, weight = 3, d_min = 0.4, d_max = 0.7 }, - { { name = 'crude-oil-barrel', count = math_random(12, 24) }, weight = 3, d_min = 0.6, d_max = 0.9 } - } - - local distance_to_center = (math.abs(position.y) + 1) * 0.0002 - if distance_to_center > 1 then - distance_to_center = 1 - end - - for _, t in pairs(chest_loot) do - for x = 1, t.weight, 1 do - if t.d_min <= distance_to_center and t.d_max >= distance_to_center then - table.insert(chest_raffle, t[1]) - end - end - end - - local e = surface.create_entity({ name = container_name, position = position, force = 'neutral', create_build_effect_smoke = false }) - e.minable = false - local i = e.get_inventory(defines.inventory.chest) - for x = 1, math_random(2, 6), 1 do - local loot = chest_raffle[math_random(1, #chest_raffle)] - i.insert(loot) - end -end - -return Public.treasure_chest diff --git a/maps/mountain_fortress_v3/functions.lua b/maps/mountain_fortress_v3/functions.lua index c10d5f6b4..30e48b51d 100644 --- a/maps/mountain_fortress_v3/functions.lua +++ b/maps/mountain_fortress_v3/functions.lua @@ -78,7 +78,7 @@ local disabled_ents = { ['rail-support'] = true, ['rail-ramp'] = true, - ['railgun-turret'] = true, + ['railgun-turret'] = false, } local random_respawn_messages = diff --git a/maps/mountain_race/gui.lua b/maps/mountain_race/gui.lua deleted file mode 100644 index 4315a2715..000000000 --- a/maps/mountain_race/gui.lua +++ /dev/null @@ -1,53 +0,0 @@ -local Public = {} - -function Public.create_top_gui(player) - local element = player.gui.top.mountain_race - if element then - return - end - element = player.gui.top.add({type = 'frame', name = 'mountain_race', direction = 'horizontal'}) - element.style.maximal_height = 38 - - local team = element.add({type = 'label', caption = 'Loading...'}) - team.style.font = 'heading-2' - local text = element.add({type = 'label'}) - text.style.font = 'heading-2' - text.style.font_color = {225, 225, 225} -end - -local function get_status_string(mountain_race) - local north = mountain_race.locomotives.north - local south = mountain_race.locomotives.south - - if not north then - return {{255, 65, 65}, 'SOUTH', ' has won the race!'} - end - if not south then - return {{75, 75, 255}, 'NORTH', ' has won the race!'} - end - - local distance = math.floor(math.abs(north.position.x - south.position.x)) - if distance == 0 then - return {{200, 200, 0}, 'Teams', ' are equal'} - end - - if north.position.x > south.position.x then - return {{75, 75, 255}, 'NORTH', ' is ' .. distance .. ' units in the lead'} - else - return {{255, 65, 65}, 'SOUTH', ' is ' .. distance .. ' units in the lead'} - end -end - -function Public.update_top_gui(mountain_race) - local status = get_status_string(mountain_race) - for _, player in pairs(game.connected_players) do - local element = player.gui.top.mountain_race - if element and element.valid then - element.children[1].style.font_color = status[1] - element.children[1].caption = status[2] - element.children[2].caption = status[3] - end - end -end - -return Public diff --git a/maps/mountain_race/main.lua b/maps/mountain_race/main.lua deleted file mode 100644 index 722e43946..000000000 --- a/maps/mountain_race/main.lua +++ /dev/null @@ -1,318 +0,0 @@ ---luacheck: ignore -require 'modules.biters_yield_ore' -require 'modules.rocks_yield_ore_veins' - -local Map_score = require 'utils.gui.map_score' -local Collapse = require 'modules.collapse' -local Immersive_cargo_wagons = require 'modules.immersive_cargo_wagons.main' -local Terrain = require 'maps.mountain_race.terrain' -local Team = require 'maps.mountain_race.team' -local Gui = require 'maps.mountain_race.gui' -local Global = require 'utils.global' -local Server = require 'utils.server' - -local mountain_race = {} -Global.register( - mountain_race, - function(tbl) - mountain_race = tbl - end -) - -local function on_chunk_generated(event) - local surface = event.surface - if surface.index ~= 1 then - return - end - local left_top = event.area.left_top - if left_top.y >= mountain_race.playfield_height or left_top.y < 0 or left_top.x < 0 then - Terrain.draw_out_of_map_chunk(surface, left_top) - return - end - Terrain.draw_terrain(surface, left_top) -end - -local function on_entity_damaged(event) -end - -local function on_entity_died(event) - local entity = event.entity - if not entity then - return - end - if not entity.valid then - return - end - if entity.name == 'locomotive' then - if entity == mountain_race.locomotives.north then - mountain_race.victorious_team = 'south' - mountain_race.gamestate = 'game_over' - return - end - if entity == mountain_race.locomotives.south then - mountain_race.victorious_team = 'north' - mountain_race.gamestate = 'game_over' - return - end - end -end - -local function on_player_died(event) - Team.update_spawn_positions(mountain_race) -end - -local function on_player_joined_game(event) - Team.update_spawn_positions(mountain_race) - - local player = game.players[event.player_index] - Gui.create_top_gui(player) - - if game.tick == 0 then - if player.character then - if player.character.valid then - player.character.destroy() - end - end - player.character = nil - player.set_controller({type = defines.controllers.god}) - return - end - - Team.setup_player(mountain_race, player) - - local surface = game.surfaces.nauvis - local tile = surface.get_tile(player.position) - if tile.valid then - if tile.name == 'out-of-map' then - player.teleport(surface.find_non_colliding_position('character', player.force.get_spawn_position(surface), 64, 0.5), surface) - end - end -end - -local function on_research_finished(event) - local force = event.research.force - force.character_inventory_slots_bonus = force.mining_drill_productivity_bonus * 100 -- +10 Slots / level - - local mining_speed_bonus = 1 + force.mining_drill_productivity_bonus * 10 -- +100% speed / level - if force.technologies['steel-axe'].researched then - mining_speed_bonus = mining_speed_bonus + 1 - end -- +100% speed for steel-axe research - force.manual_mining_speed_modifier = mining_speed_bonus -end - -local function on_console_chat(event) - if not event.message then - return - end - if not event.player_index then - return - end - local player = game.players[event.player_index] - - local color = {} - color = player.color - color.r = color.r * 0.6 + 0.35 - color.g = color.g * 0.6 + 0.35 - color.b = color.b * 0.6 + 0.35 - color.a = 1 - - if player.force.name == 'south' then - game.forces.north.print(player.name .. ' (south): ' .. event.message, color) - end - if player.force.name == 'north' then - game.forces.south.print(player.name .. ' (north): ' .. event.message, color) - end -end - -local function init(mountain_race) - if game.ticks_played % 120 ~= 30 then - return - end - game.print('game resetting..') - - Immersive_cargo_wagons.reset() - - local surface = game.surfaces.nauvis - - Collapse.set_kill_entities(true) - Collapse.set_speed(8) - Collapse.set_amount(0) - Collapse.set_max_line_size(mountain_race.border_width + mountain_race.playfield_height * 2) - Collapse.set_surface_index(surface.index) - Collapse.set_position({0, 0}) - Collapse.set_direction('east') - Collapse.start_now(true) - - game.reset_time_played() - - mountain_race.clone_x = 0 - - Team.configure_teams(mountain_race) - - game.print('rerolling terrain..') - mountain_race.gamestate = 'reroll_terrain' -end - -local function prepare_terrain(mountain_race) - if game.ticks_played % 60 ~= 30 then - return - end - Terrain.clone_south_to_north(mountain_race) - - if mountain_race.clone_x < 6 then - return - end - game.print('preparing spawn..') - mountain_race.gamestate = 'prepare_spawn' -end - -local function prepare_spawn(mountain_race) - if game.ticks_played % 60 ~= 0 then - return - end - Terrain.generate_spawn(mountain_race, 'north') - Terrain.generate_spawn(mountain_race, 'south') - game.print('spawning players..') - mountain_race.gamestate = 'spawn_players' -end - -local function spawn_players(mountain_race) - if game.ticks_played % 60 ~= 0 then - return - end - for _, player in pairs(game.players) do - player.force = game.forces.player - end - for _, player in pairs(game.connected_players) do - Team.setup_player(mountain_race, player) - end - - mountain_race.reset_counter = mountain_race.reset_counter + 1 - local message = 'Mountain race #' .. mountain_race.reset_counter .. ' has begun!' - game.print(message, {255, 155, 0}) - Server.to_discord_bold(table.concat {'*** ', message, ' ***'}) - mountain_race.gamestate = 'game_in_progress' -end - -local function set_collapse_speed(mountain_race) - if not mountain_race.locomotives.north then - return - end - if not mountain_race.locomotives.south then - return - end - local amount = math.abs(mountain_race.locomotives.north.position.x - mountain_race.locomotives.south.position.x) - amount = math.floor(amount / 64) - if amount < 0 then - amount = 0 - end - Collapse.set_amount(amount) -end - -local function chart(mountain_race) - local surface = game.surfaces.nauvis - local north = game.forces.north - local south = game.forces.south - local r = 128 - local p = north.get_spawn_position(surface) - local area = {{p.x - r, p.y - r}, {p.x + r, p.y + r}} - north.chart(surface, area) - south.chart(surface, area) - - local p = south.get_spawn_position(surface) - local area = {{p.x - r, p.y - r}, {p.x + r, p.y + r}} - north.chart(surface, area) - south.chart(surface, area) - - local p = Collapse.get_position() - local h = mountain_race.playfield_height + mountain_race.border_half_width - local area = {{p.x - 32, p.y - h}, {p.x + 32, p.y + h}} - north.chart(surface, area) - south.chart(surface, area) -end - -local game_tasks = { - [15] = Gui.update_top_gui, - [30] = set_collapse_speed, - [60] = Terrain.clone_south_to_north, - [90] = chart -} - -local function game_in_progress(mountain_race) - local tick = game.ticks_played - if tick % 15 ~= 0 then - return - end - local task = tick % 120 - if not game_tasks[task] then - return - end - game_tasks[task](mountain_race) -end - -local function game_over(mountain_race) - local tick = game.ticks_played - if tick % 60 ~= 0 then - return - end - - if not mountain_race.reset_countdown then - mountain_race.reset_countdown = 10 - Collapse.set_amount(0) - local message = 'Team ' .. mountain_race.victorious_team .. ' has won the race!' - game.print(message, {255, 155, 0}) - Server.to_discord_bold(table.concat {'*** ', message, ' ***'}) - - for _, player in pairs(game.forces[mountain_race.victorious_team].connected_players) do - Map_score.set_score(player, Map_score.get_score(player) + 1) - end - - return - end - - mountain_race.reset_countdown = mountain_race.reset_countdown - 1 - if mountain_race.reset_countdown <= 0 then - mountain_race.gamestate = 'init' - mountain_race.reset_countdown = nil - end -end - -local gamestates = { - ['init'] = init, - ['reroll_terrain'] = Terrain.reroll_terrain, - ['generate_chunks'] = Terrain.generate_chunks, - ['prepare_terrain'] = prepare_terrain, - ['prepare_spawn'] = prepare_spawn, - ['spawn_players'] = spawn_players, - ['game_in_progress'] = game_in_progress, - ['game_over'] = game_over -} - -local function on_tick() - gamestates[mountain_race.gamestate](mountain_race) -end - -local function on_init() - game.difficulty_settings.technology_price_multiplier = 0.5 - mountain_race.reset_counter = 0 - mountain_race.gamestate = 'init' - mountain_race.border_width = 32 - mountain_race.border_half_width = mountain_race.border_width * 0.5 - mountain_race.playfield_height = 128 - mountain_race.locomotives = {} - Collapse.set_amount(0) - Team.init_teams() -end - -local Event = require 'utils.event' -Event.on_init(on_init) -Event.add(defines.events.on_tick, on_tick) -Event.add(defines.events.on_chunk_generated, on_chunk_generated) -Event.add(defines.events.on_entity_damaged, on_entity_damaged) -Event.add(defines.events.on_entity_died, on_entity_died) -Event.add(defines.events.on_player_joined_game, on_player_joined_game) -Event.add(defines.events.on_player_died, on_player_died) -Event.add(defines.events.on_research_finished, on_research_finished) -Event.add(defines.events.on_console_chat, on_console_chat) - -require 'modules.rocks_yield_ore' diff --git a/maps/mountain_race/team.lua b/maps/mountain_race/team.lua deleted file mode 100644 index 9587dcff4..000000000 --- a/maps/mountain_race/team.lua +++ /dev/null @@ -1,103 +0,0 @@ ---luacheck: ignore -local Public = {} -local math_random = math.random - -local starting_items = {['iron-plate'] = 32, ['iron-gear-wheel'] = 16, ['stone'] = 20, ['pistol'] = 1, ['firearm-magazine'] = 128, ['rail'] = 16} - -function Public.init_teams() - game.create_force('north') - game.create_force('south') - game.create_force('spectator') - game.forces.spectator.set_friend('north', true) - game.forces.spectator.set_friend('south', true) -end - -function Public.configure_teams(mountain_race) - for _, force_name in pairs({'north', 'south'}) do - local force = game.forces[force_name] - force.reset() - force.share_chart = true - force.technologies['artillery'].enabled = false - force.technologies['artillery-shell-range-1'].enabled = false - force.technologies['artillery-shell-speed-1'].enabled = false - force.technologies['land-mine'].enabled = false - force.technologies['railway'].researched = true - force.manual_mining_speed_modifier = 1 - end - game.forces.north.set_friend('spectator', true) - game.forces.south.set_friend('spectator', true) - - local y = mountain_race.playfield_height * 0.5 + mountain_race.border_half_width - - game.forces.north.set_spawn_position({32, y * -1}, game.surfaces.nauvis) - game.forces.south.set_spawn_position({32, y}, game.surfaces.nauvis) -end - -function Public.teleport_player_to_spawn(player) - local surface = game.surfaces.nauvis - local position - position = surface.find_non_colliding_position('character', player.force.get_spawn_position(surface), 48, 1) - if not position then - position = player.force.get_spawn_position(surface) - end - player.teleport(position, surface) -end - -local function assign_force_to_player(player) - if #game.forces.south.connected_players > #game.forces.north.connected_players then - player.force = game.forces.north - return - end - if #game.forces.north.connected_players > #game.forces.south.connected_players then - player.force = game.forces.south - return - end - if math_random(1, 2) == 1 then - player.force = game.forces.south - else - player.force = game.forces.north - end -end - -function Public.setup_player(mountain_race, player) - if player.force.name == 'player' then - assign_force_to_player(player) - player.print("You have been assigned to team " .. player.force.name .. "!") - - if player.character then - if player.character.valid then - player.character.destroy() - end - end - player.character = nil - player.set_controller({type = defines.controllers.god}) - player.create_character() - for item, amount in pairs(starting_items) do - player.insert({name = item, count = amount}) - end - - Public.teleport_player_to_spawn(player) - end -end - -function Public.update_spawn_positions(mountain_race) - if not mountain_race.locomotives.north then - return - end - if not mountain_race.locomotives.south then - return - end - - local surface = game.surfaces.nauvis - - for _, force_name in pairs({'north', 'south'}) do - local force = game.forces[force_name] - local p = mountain_race.locomotives[force_name].position - force.set_spawn_position({p.x, p.y + 2}, surface) - end - - local p = mountain_race.locomotives['north'].position - game.forces.player.set_spawn_position({p.x, p.y + 2}, surface) -end - -return Public diff --git a/maps/mountain_race/terrain.lua b/maps/mountain_race/terrain.lua deleted file mode 100644 index afde5a7ab..000000000 --- a/maps/mountain_race/terrain.lua +++ /dev/null @@ -1,196 +0,0 @@ ---luacheck: ignore -local Public = {} -local math_random = math.random -local Immersive_cargo_wagons = require 'modules.immersive_cargo_wagons.main' -local GetNoise = require 'utils.math.get_noise' -local LootRaffle = require 'utils.functions.loot_raffle' - -local wagon_raffle = { 'cargo-wagon', 'cargo-wagon', 'cargo-wagon', 'locomotive', 'fluid-wagon' } -local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' } - -local function draw_border(surface, left_x, height) - local tiles = {} - local i = 1 - for x = left_x, left_x + 31, 1 do - for y = height * -1, height - 1, 1 do - tiles[i] = { name = 'out-of-map', position = { x = x, y = y } } - i = i + 1 - end - end - surface.set_tiles(tiles, true) -end - -function Public.clone_south_to_north(mountain_race) - if game.tick < 60 then - return - end - local surface = game.surfaces.nauvis - if not surface.is_chunk_generated({ mountain_race.clone_x + 2, 0 }) then - return - end - - local area = { { mountain_race.clone_x * 32, 0 }, { mountain_race.clone_x * 32 + 32, mountain_race.playfield_height } } - local offset = mountain_race.playfield_height + mountain_race.border_half_width - - draw_border(surface, mountain_race.clone_x * 32, mountain_race.border_half_width) - - surface.clone_area( - { - source_area = area, - destination_area = { { area[1][1], area[1][2] - offset }, { area[2][1], area[2][2] - offset } }, - destination_surface = surface, - --destination_force = …, - clone_tiles = true, - clone_entities = true, - clone_decoratives = true, - clear_destination_entities = true, - clear_destination_decoratives = true, - expand_map = true - } - ) - - mountain_race.clone_x = mountain_race.clone_x + 1 -end - -local function common_loot_crate(surface, position) - local item_stacks = LootRaffle.roll(math.abs(position.x), 16) - local container = surface.create_entity({ name = 'wooden-chest', position = position, force = 'neutral' }) - for _, item_stack in pairs(item_stacks) do - container.insert(item_stack) - end - container.minable = false -end - -function Public.draw_terrain(surface, left_top) - if left_top.x < 64 then - return - end - local seed = surface.map_gen_settings.seed - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local position = { x = left_top.x + x, y = left_top.y + y } - local tile = surface.get_tile(position) - if not tile.collides_with('resource') then - if math_random(1, 3) > 1 and surface.can_place_entity({ name = 'coal', position = position, amount = 1 }) and GetNoise('decoratives', position, seed) > 0.2 then - surface.create_entity({ name = rock_raffle[math_random(1, #rock_raffle)], position = position }) - end - if math_random(1, 756) == 1 then - common_loot_crate(surface, position) - end - end - end - end -end - -function Public.draw_out_of_map_chunk(surface, left_top) - local tiles = {} - local i = 1 - for x = 0, 31, 1 do - for y = 0, 31, 1 do - tiles[i] = { name = 'out-of-map', position = { x = left_top.x + x, y = left_top.y + y } } - i = i + 1 - end - end - surface.set_tiles(tiles, true) -end - -function Public.generate_spawn(mountain_race, force_name) - local force = game.forces[force_name] - local surface = game.surfaces.nauvis - local p = force.get_spawn_position(surface) - - local v = { { 0, 0 }, { 1, 0 }, { 0, 1 }, { 1, 1 } } - local teams = { - ['north'] = { 75, 75, 255 }, - ['south'] = { 255, 65, 65 } - } - - for x = 0, 48, 2 do - surface.create_entity({ name = 'straight-rail', position = { p.x + x, p.y }, direction = 2, force = force_name }) - for k, tile in pairs(surface.find_tiles_filtered({ area = { { p.x + x, p.y }, { p.x + x + 2, p.y + 2 } } })) do - if tile.collides_with('resource') then - surface.set_tiles({ { name = 'landfill', position = tile.position } }, true) - end - end - end - - local entity = surface.create_entity({ name = 'locomotive', position = { p.x + 6, p.y }, force = force_name, direction = 2 }) - entity.minable = false - entity.color = teams[force_name] - - rendering.draw_text( - { - text = string.upper(force_name), - surface = surface, - target = entity, - target_offset = { 0, -3 }, - color = teams[force_name], - scale = 2, - font = 'default-game', - alignment = 'center', - scale_with_zoom = false - } - ) - - mountain_race.locomotives[force_name] = entity - - local wagon = Immersive_cargo_wagons.register_wagon(entity) - wagon.entity_count = 999 -end - -function Public.generate_chunks(mountain_race) - if game.ticks_played % 60 ~= 0 then - return - end - local surface = game.surfaces.nauvis - surface.request_to_generate_chunks({ 0, 0 }, 10) - if not surface.is_chunk_generated({ 9, 0 }) then - return - end - game.print('preparing terrain..') - mountain_race.gamestate = 'prepare_terrain' -end - -function Public.reroll_terrain(mountain_race) - if game.ticks_played % 60 ~= 0 then - return - end - - for _, player in pairs(game.connected_players) do - if player.character then - if player.character.valid then - player.character.destroy() - end - end - player.character = nil - player.set_controller({ type = defines.controllers.god }) - end - - local surface = game.surfaces.nauvis - local mgs = surface.map_gen_settings - mgs.seed = math_random(1, 99999999) - mgs.water = 0.5 - mgs.starting_area = 1 - mgs.terrain_segmentation = 12 - mgs.cliff_settings = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 } - mgs.autoplace_controls = { - ['coal'] = { frequency = 16, size = 1, richness = 0.5 }, - ['stone'] = { frequency = 16, size = 1, richness = 0.5 }, - ['copper-ore'] = { frequency = 16, size = 1, richness = 0.75 }, - ['iron-ore'] = { frequency = 16, size = 1, richness = 1 }, - ['uranium-ore'] = { frequency = 8, size = 0.5, richness = 0.5 }, - ['crude-oil'] = { frequency = 32, size = 1, richness = 1 }, - ['trees'] = { frequency = math.random(4, 32) * 0.1, size = math.random(4, 16) * 0.1, richness = math.random(1, 10) * 0.1 }, - ['enemy-base'] = { frequency = 16, size = 1, richness = 1 } - } - surface.map_gen_settings = mgs - surface.clear(false) - for chunk in surface.get_chunks() do - surface.delete_chunk({ chunk.x, chunk.y }) - end - - game.print('generating chunks..') - mountain_race.gamestate = 'generate_chunks' -end - -return Public diff --git a/maps/native_war/gui.lua b/maps/native_war/gui.lua deleted file mode 100644 index 5cd5d7e3a..000000000 --- a/maps/native_war/gui.lua +++ /dev/null @@ -1,488 +0,0 @@ ---luacheck: ignore -local Public = {} -local Team = require 'maps.native_war.team' -local XP = require 'maps.native_war.xp' -local Settings = require 'maps.native_war.settings' - -local button_science_name = {} -for _, nbw in pairs(Settings.nb_of_waves) do - for k, sp in pairs(Settings.science_pack) do - table.insert(button_science_name, { sp = k, spc = sp.short, button_name = sp.short .. '_' .. nbw, nbw = nbw }) - end -end - -local function create_new_gui_for_market(player, market) - local player_inventory = player.get_main_inventory() - local player_red_science_pack = player_inventory.get_item_count('automation-science-pack') - local player_green_science_pack = player_inventory.get_item_count('logistic-science-pack') - local player_grey_science_pack = player_inventory.get_item_count('military-science-pack') - local player_blue_science_pack = player_inventory.get_item_count('chemical-science-pack') - local player_purple_science_pack = player_inventory.get_item_count('production-science-pack') - local player_yellow_science_pack = player_inventory.get_item_count('utility-science-pack') - local player_white_science_pack = player_inventory.get_item_count('space-science-pack') - - local root = player.gui.screen - local frame = root.add({ type = 'frame', name = 'market_frame', caption = 'Market', direction = 'vertical' }) - frame.style.font = 'default' - frame.style.font_color = { r = 0.3, g = 0.65, b = 0.3 } - frame.style.horizontal_align = 'center' - frame.add({ type = 'label', caption = 'Buy waves of biter/spitter' }) - local line = frame.add({ type = 'line', direction = 'horizontal' }) - local table = frame.add({ type = 'table', column_count = 5, draw_horizontal_lines = true, draw_vertical_lines = true }) - local case = table.add({ type = 'sprite', sprite = 'file/graphics/vide.png' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'entity/small-biter' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'entity/medium-biter' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'entity/big-biter' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'entity/behemoth-biter' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - - for _, nb in pairs(Settings.nb_of_waves) do - local wave_nb = nb - local text_wave = '' - if wave_nd == 1 then - text_wave = wave_nb .. ' wave' - else - text_wave = wave_nb .. ' waves' - end - local case = table.add({ type = 'label', caption = text_wave }) - case.style.right_padding = 30 - local case = table.add({ type = 'flow', direction = 'horizontal' }) - case.add( - { - type = 'sprite-button', - sprite = 'item/automation-science-pack', - name = 'red_' .. wave_nb, - tooltip = 'Buy ' .. - wave_nb .. ' wave of small biter/spitter.\nPrice: ' .. wave_nb * Settings.wave_price['automation-science-pack'].price .. ' [item=automation-science-pack].', - number = math.floor((player_red_science_pack / Settings.wave_price['automation-science-pack'].price) / wave_nb) - } - ) - case.add( - { - type = 'sprite-button', - sprite = 'item/logistic-science-pack', - name = 'green_' .. wave_nb, - tooltip = 'Buy 1 wave of small biter/spitter.\nPrice: ' .. wave_nb * Settings.wave_price['logistic-science-pack'].price .. ' [item=logistic-science-pack].', - number = math.floor((player_green_science_pack / Settings.wave_price['logistic-science-pack'].price) / wave_nb) - } - ) - case.style.right_padding = 12 - case.style.left_padding = 12 - local case = table.add({ type = 'flow', direction = 'horizontal' }) - case.add( - { - type = 'sprite-button', - sprite = 'item/military-science-pack', - name = 'grey_' .. wave_nb, - tooltip = 'Buy ' .. - wave_nb .. ' wave of medium biter/spitter.\nPrice: ' .. wave_nb * Settings.wave_price['military-science-pack'].price .. ' [item=military-science-pack].', - number = math.floor((player_grey_science_pack / Settings.wave_price['military-science-pack'].price) / wave_nb) - } - ) - case.style.left_padding = 30 - case.style.right_padding = 30 - local case = table.add({ type = 'flow', direction = 'horizontal' }) - case.add( - { - type = 'sprite-button', - sprite = 'item/chemical-science-pack', - name = 'blue_' .. wave_nb, - tooltip = 'Buy ' .. - wave_nb .. ' wave of big biter/spitter.\nPrice: ' .. wave_nb * Settings.wave_price['chemical-science-pack'].price .. ' [item=chemical-science-pack].', - number = math.floor((player_blue_science_pack / Settings.wave_price['chemical-science-pack'].price) / wave_nb) - } - ) - case.style.left_padding = 30 - case.style.right_padding = 30 - local case = table.add({ type = 'flow', direction = 'horizontal' }) - case.add( - { - type = 'sprite-button', - sprite = 'item/production-science-pack', - name = 'purple_' .. wave_nb, - tooltip = 'Buy ' .. - wave_nb .. ' wave of behemoth biter/spitter.\nPrice: ' .. wave_nb * Settings.wave_price['production-science-pack'].price .. ' [item=production-science-pack].', - number = math.floor((player_purple_science_pack / Settings.wave_price['production-science-pack'].price) / wave_nb) - } - ) - case.add( - { - type = 'sprite-button', - sprite = 'item/utility-science-pack', - name = 'yellow_' .. wave_nb, - tooltip = 'Buy ' .. - wave_nb .. ' wave of behemoth biter/spitter.\nPrice: ' .. wave_nb * Settings.wave_price['utility-science-pack'].price .. ' [item=utility-science-pack].', - number = math.floor((player_yellow_science_pack / Settings.wave_price['utility-science-pack'].price) / wave_nb) - } - ) - case.style.right_padding = 12 - case.style.left_padding = 12 - end - - local line = frame.add({ type = 'line', direction = 'horizontal' }) - frame.add({ type = 'label', caption = 'Buy/ugrade worm turret' }) - - local table = frame.add({ type = 'table', column_count = 5, draw_horizontal_lines = true, draw_vertical_lines = true }) - local case = table.add({ type = 'sprite', sprite = 'file/graphics/vide.png' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'entity/small-worm-turret' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'entity/medium-worm-turret' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'entity/big-worm-turret' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'entity/behemoth-worm-turret' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - - for _, dist in pairs(Settings.worm_dist) do - local turret = '' - if dist == 'all' then - turret = 'turrets' - else - turret = 'turret' - end - local case = table.add({ type = 'label', caption = dist }) - case.style.right_padding = 30 - local case = table.add({ type = 'flow', direction = 'horizontal' }) - case.add( - { - type = 'sprite-button', - sprite = 'item/automation-science-pack', - name = 'red_' .. dist, - tooltip = 'Buy ' .. - dist .. ' worm ' .. turret .. '.\nPrice: ' .. Settings.upgrade_turret_price['automation-science-pack'].price .. ' [item=automation-science-pack].', - number = math.floor(player_red_science_pack / Settings.upgrade_turret_price['automation-science-pack'].price) - } - ) - case.add( - { - type = 'sprite-button', - sprite = 'item/logistic-science-pack', - name = 'green_' .. dist, - tooltip = 'Buy ' .. dist .. ' worm ' .. turret .. '.\nPrice: ' .. Settings.upgrade_turret_price['logistic-science-pack'].price .. ' [item=logistic-science-pack].', - number = math.floor(player_green_science_pack / Settings.upgrade_turret_price['logistic-science-pack'].price) - } - ) - case.style.right_padding = 12 - case.style.left_padding = 12 - local case = table.add({ type = 'flow', direction = 'horizontal' }) - case.add( - { - type = 'sprite-button', - sprite = 'item/military-science-pack', - name = 'grey_' .. dist, - tooltip = 'Upgrade ' .. - dist .. ' worm ' .. turret .. '.\nPrice: ' .. Settings.upgrade_turret_price['military-science-pack'].price .. ' [item=military-science-pack].', - number = math.floor(player_grey_science_pack / Settings.upgrade_turret_price['military-science-pack'].price) - } - ) - case.style.left_padding = 30 - case.style.right_padding = 30 - local case = table.add({ type = 'flow', direction = 'horizontal' }) - case.add( - { - type = 'sprite-button', - sprite = 'item/chemical-science-pack', - name = 'blue_' .. dist, - tooltip = 'Upgrade ' .. - dist .. ' worm ' .. turret .. '.\nPrice: ' .. Settings.upgrade_turret_price['chemical-science-pack'].price .. ' [item=chemical-science-pack].', - number = math.floor(player_blue_science_pack / Settings.upgrade_turret_price['chemical-science-pack'].price) - } - ) - case.style.left_padding = 30 - case.style.right_padding = 30 - local case = table.add({ type = 'flow', direction = 'horizontal' }) - case.add( - { - type = 'sprite-button', - sprite = 'item/production-science-pack', - name = 'purple_' .. dist, - tooltip = 'Upgrade ' .. - dist .. ' worm ' .. turret .. '.\nPrice: ' .. Settings.upgrade_turret_price['production-science-pack'].price .. ' [item=production-science-pack].', - number = math.floor(player_purple_science_pack / Settings.upgrade_turret_price['production-science-pack'].price) - } - ) - case.add( - { - type = 'sprite-button', - sprite = 'item/utility-science-pack', - name = 'yellow_' .. dist, - tooltip = 'Upgrade ' .. dist .. ' worm ' .. turret .. '.\nPrice: ' .. Settings.upgrade_turret_price['utility-science-pack'].price .. ' [item=utility-science-pack].', - number = math.floor(player_yellow_science_pack / Settings.upgrade_turret_price['utility-science-pack'].price) - } - ) - case.style.right_padding = 12 - case.style.left_padding = 12 - end - - local line = frame.add({ type = 'line', direction = 'horizontal' }) - frame.add({ type = 'label', caption = 'Upgrade biter' }) - local table = frame.add({ type = 'table', column_count = 5, draw_horizontal_lines = true, draw_vertical_lines = true }) - local case = table.add({ type = 'sprite', sprite = 'file/graphics/vide.png' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'file/graphics/Splash.png' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'file/graphics/resist.png' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'file/graphics/griffe.png' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - local case = table.add({ type = 'sprite', sprite = 'file/graphics/life.png' }) - case.style.horizontal_align = 'center' - case.style.right_padding = 30 - case.style.left_padding = 30 - - local xp_t = XP.get_table() - local xp_available = xp_t[player.index].xp - - local case = table.add({ type = 'flow', direction = 'vertical' }) - case.add({ type = 'label', caption = 'Available XP :' }) - case.add({ type = 'label', caption = math.floor(xp_available) }) - local case = table.add({ type = 'flow', direction = 'horizontal' }) - local b = case.add({ type = 'button', name = 'xp_splash', caption = '10 XP', tooltip = 'Increase spitters splash damage.\nPrice: 10 XP.' }) - b.style.minimal_width = 50 - case.style.top_padding = 5 - case.style.left_padding = 20 - local case = table.add({ type = 'flow', direction = 'horizontal' }) - local b = case.add({ type = 'button', name = 'xp_resistance', caption = '10 XP', tooltip = 'Increase resistance of all your biter/spitter.\nPrice: 10 XP.' }) - b.style.minimal_width = 50 - case.style.top_padding = 5 - case.style.left_padding = 20 - local case = table.add({ type = 'flow', direction = 'horizontal' }) - local b = case.add({ type = 'button', name = 'xp_damage', caption = '10 XP', tooltip = 'Increase biter melee damage.\nPrice: 10 XP.' }) - b.style.minimal_width = 50 - case.style.top_padding = 5 - case.style.left_padding = 20 - local case = table.add({ type = 'flow', direction = 'horizontal' }) - case.add( - { - type = 'sprite-button', - name = 'add_life', - sprite = 'item/space-science-pack', - tooltip = 'Buy extra life for all your biter/spitter.\nPrice: 1000 [item=space-science-pack].', - number = math.floor(player_white_science_pack / 1000) - } - ) - case.style.left_padding = 30 - case.style.right_padding = 30 - - local line = frame.add({ type = 'line', direction = 'horizontal' }) - frame.add({ type = 'button', name = 'cancel_market', caption = 'Close' }) -end - -local function on_gui_opened(event) - if not event then - return - end - if not event.entity then - return - end - if event.entity.name == 'market' then - local player = game.players[event.player_index] - event.entity.operable = false - create_new_gui_for_market(player, event.entity) - end -end - -local function on_gui_click(event) - if not event then - return - end - if not event.element then - return - end - if not event.element.valid then - return - end - local player = game.players[event.element.player_index] - local player_inventory = player.get_main_inventory() - - --[[if event.element.name == "confirm_rejoin" then - player.gui.center["rejoin_question_frame"].destroy() - Team.assign_force_to_player(player) - Team.teleport_player_to_active_surface(player) - Team.put_player_into_random_team(player) - game.print(player.name .. " has rejoined the game!") - return - end - if event.element.name == "cancel_rejoin" then player.gui.center["rejoin_question_frame"].destroy() return end - if player.force.name == "spectator" then return end - if event.element.name == "cancel_spectate" then player.gui.center["spectate_confirmation_frame"].destroy() return end - - if event.element.name == "cancel_spectate" then player.gui.center["spectate_confirmation_frame"].destroy() return end]] - if event.element.name == 'cancel_market' then - player.gui.screen['market_frame'].destroy() - local surface = game.surfaces['native_war'] - if player.force.name == 'west' then - local market = surface.find_entities_filtered { position = { -197, 0 }, radius = 5, type = 'market' } - market[1].operable = true - elseif player.force.name == 'east' then - local market = surface.find_entities_filtered { position = { 197, 0 }, radius = 5, type = 'market' } - market[1].operable = true - end - return - end - - --[[if event.element.name == "confirm_spectate" then - player.gui.screen["spectate_confirmation_frame"].destroy() - Team.set_player_to_spectator(player) - game.print(player.name .. " has turned into a spectator ghost.") - return - end - - if event.element.name == "spectate_button" then - if player.gui.screen["spectate_confirmation_frame"] then - player.gui.screen["spectate_confirmation_frame"].destroy() - else - create_spectate_confirmation(player) - end - return - end]] - local xp_t = XP.get_table() - local xp_available = xp_t[player.index].xp - local amount = 10 - if event.element.name == 'xp_splash' and xp_available >= amount then - XP.lost_xp(player, amount) - storage.map_forces[player.force.name].modifier.splash = storage.map_forces[player.force.name].modifier.splash + 0.001 - player.gui.screen['market_frame'].destroy() - create_new_gui_for_market(player, event.entity) - end - if event.element.name == 'xp_damage' and xp_available >= amount then - XP.lost_xp(player, amount) - storage.map_forces[player.force.name].modifier.damage = storage.map_forces[player.force.name].modifier.damage + 0.001 - player.gui.screen['market_frame'].destroy() - create_new_gui_for_market(player, event.entity) - end - if event.element.name == 'xp_resistance' and xp_available >= amount then - XP.lost_xp(player, amount) - storage.map_forces[player.force.name].modifier.resistance = storage.map_forces[player.force.name].modifier.resistance - 0.001 - player.gui.screen['market_frame'].destroy() - create_new_gui_for_market(player, event.entity) - end - if event.element.name == 'add_life' and player_inventory.get_item_count('space-science-pack') >= 1000 then - XP.buy_extra_life(player.force.name) - player.remove_item({ name = 'space-science-pack', count = 1000 }) - player.gui.screen['market_frame'].destroy() - create_new_gui_for_market(player, event.entity) - end - - for _, button in pairs(button_science_name) do - if event.element.name == button.button_name then - local count = 0 - for i = 1, button.nbw, 1 do - if player_inventory.get_item_count(button.sp) < Settings.wave_price[button.sp].price then - break - end - player.remove_item({ name = button.sp, count = Settings.wave_price[button.sp].price }) - Team.on_buy_wave('native_war', player.force.name, button.spc) - count = count + 1 - end - if count > 0 then - if button.nbw > 1 then - game.print(player.name .. ' buy ' .. count .. ' waves of biter/spitters using [item=' .. button.sp .. ']', Settings.color[button.sp]) - else - game.print(player.name .. ' buy ' .. count .. ' wave of biter/spitters using [item=' .. button.sp .. ']', Settings.color[button.sp]) - end - end - player.gui.screen['market_frame'].destroy() - create_new_gui_for_market(player, event.entity) - break - end - end - - for k, button in pairs(Settings.button_upgrade_name) do --sp = k, spc = sp.short, button_name = sp.short.."_"..dist, dist = dist, type_worm = sp.t - if event.element.name == k then - if player_inventory.get_item_count(button.sp) >= Settings.upgrade_turret_price[button.sp].price then - if button.sp == 'automation-science-pack' or button.sp == 'logistic-science-pack' then - if - Team.buy_worm_turret( - game.surfaces['native_war'], - player.force.name, - button.dist, - player, - player_inventory.get_item_count(button.sp), - Settings.upgrade_turret_price[button.sp].price, - button.sp - ) - then - player.gui.screen['market_frame'].destroy() - create_new_gui_for_market(player, event.entity) - break - else - player.print('All small worm turrets are already buy', Settings.color['message']) - player.gui.screen['market_frame'].destroy() - create_new_gui_for_market(player, event.entity) - break - end - else - if - Team.upgrade_worm_turret( - game.surfaces['native_war'], - player.force.name, - button.dist, - player, - player_inventory.get_item_count(button.sp), - Settings.upgrade_turret_price[button.sp].price, - button.sp, - button.type_worm .. '-worm-turret' - ) - then - player.gui.screen['market_frame'].destroy() - create_new_gui_for_market(player, event.entity) - break - else - local table_upgrade = { - ['medium'] = 'small', - ['big'] = 'medium', - ['behemoth'] = 'big' - } - player.print( - 'There is no more ' .. table_upgrade[button.type_worm] .. ' worm turrets to upgrade with [item=' .. button.sp .. '].', - Settings.color['message'] - ) - player.gui.screen['market_frame'].destroy() - create_new_gui_for_market(player, event.entity) - break - end - end - end - end - end -end - -local event = require 'utils.event' -event.add(defines.events.on_gui_click, on_gui_click) -event.add(defines.events.on_gui_opened, on_gui_opened) - -return Public diff --git a/maps/native_war/init.lua b/maps/native_war/init.lua deleted file mode 100644 index 053f4ce1d..000000000 --- a/maps/native_war/init.lua +++ /dev/null @@ -1,255 +0,0 @@ ---luacheck: ignore -local Public = {} - -function Public.settings() - storage.gui_refresh_delay = 0 - storage.game_lobby_active = true - storage.bb_debug = false - storage.combat_balance = {} - storage.nv_settings = { - --TEAM SETTINGS-- - ['team_balancing'] = true, --Should players only be able to join a team that has less or equal members than the opposing team? - ['only_admins_vote'] = false, --Are only admins able to vote on the global difficulty? - --GENERAL SETTINGS-- - ['blueprint_library_importing'] = false, --Allow the importing of blueprints from the blueprint library? - ['blueprint_string_importing'] = false --Allow the importing of blueprints via blueprint strings? - } -end - -function Public.surface() - local map_gen_settings = {} - map_gen_settings.seed = math.random(1, 99999999) - map_gen_settings.water = math.random(5, 10) * 0.025 - map_gen_settings.starting_area = 1 - map_gen_settings.terrain_segmentation = 8 - map_gen_settings.cliff_settings = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 } - map_gen_settings.autoplace_controls = { - ['coal'] = { frequency = 2.5, size = 0.65, richness = 0.5 }, - ['stone'] = { frequency = 2.5, size = 0.65, richness = 0.5 }, - ['copper-ore'] = { frequency = 2.5, size = 0.65, richness = 0.5 }, - ['iron-ore'] = { frequency = 2.5, size = 0.65, richness = 0.5 }, - ['uranium-ore'] = { frequency = 2, size = 1, richness = 1 }, - ['crude-oil'] = { frequency = 3, size = 1, richness = 0.75 }, - ['trees'] = { frequency = math.random(5, 12) * 0.1, size = math.random(5, 12) * 0.1, richness = math.random(1, 10) * 0.1 }, - ['enemy-base'] = { frequency = 0, size = 0, richness = 0 } - } - local surface = game.create_surface('mirror_terrain', map_gen_settings) - local hatchery_position = { x = 200, y = 0 } - local x = hatchery_position.x - 16 - local offset = 38 - - surface.request_to_generate_chunks({ x, 0 }, 5) - surface.force_generate_chunk_requests() - - local positions = { { x = x, y = offset }, { x = x, y = offset * -1 }, { x = x, y = offset * -2 }, { x = x, y = offset * 2 } } - table.shuffle_table(positions) - - local r = 32 - for x = r * -1, r, 1 do - for y = r * -1, r, 1 do - local p = { x = hatchery_position.x + x, y = hatchery_position.y + y } - if math.sqrt(x ^ 2 + y ^ 2) < r then - local tile = surface.get_tile(p) - if tile.name == 'water' or tile.name == 'deepwater' then - surface.set_tiles({ { name = 'landfill', position = p } }, true) - end - end - end - end - local map_gen_settings2 = { - ['seed'] = 1, - ['water'] = 1, - ['starting_area'] = 1, - ['cliff_settings'] = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 }, - ['default_enable_all_autoplace_controls'] = false, - ['autoplace_settings'] = { - ['entity'] = { treat_missing_as_default = false }, - ['tile'] = { treat_missing_as_default = false }, - ['decorative'] = { treat_missing_as_default = false } - } - } - storage.active_surface_index = game.create_surface('native_war', map_gen_settings2) - local surface = game.surfaces['native_war'] - surface.request_to_generate_chunks({ 0, 0 }, 8) - surface.force_generate_chunk_requests() -end - -function Public.forces() - local surface = game.surfaces['native_war'] - game.create_force('west') - game.create_force('east') - game.create_force('spectator') - game.forces.west.set_friend('spectator', true) - game.forces.west.set_spawn_position({ -205, 0 }, surface) - game.forces.west.share_chart = true - game.forces.east.set_friend('spectator', true) - game.forces.east.set_spawn_position({ 205, 0 }, surface) - game.forces.east.share_chart = true - game.forces.spectator.set_friend('west', true) - game.forces.spectator.set_friend('east', true) - game.forces.spectator.set_spawn_position({ 0, -190 }, surface) - game.forces.spectator.share_chart = false - - if not storage.nv_settings.blueprint_library_importing then - game.permissions.get_group('Default').set_allows_action(defines.input_action.grab_blueprint_record, false) - end - if not storage.nv_settings.blueprint_string_importing then - game.permissions.get_group('Default').set_allows_action(defines.input_action.import_blueprint_string, false) - game.permissions.get_group('Default').set_allows_action(defines.input_action.import_blueprint, false) - end - - local p = game.permissions.create_group('spectator') - for action_name, _ in pairs(defines.input_action) do - p.set_allows_action(defines.input_action[action_name], false) - end - - local defs = { - defines.input_action.activate_copy, - defines.input_action.activate_cut, - defines.input_action.activate_paste, - defines.input_action.clear_cursor, - defines.input_action.edit_permission_group, - defines.input_action.gui_click, - defines.input_action.gui_confirmed, - defines.input_action.gui_elem_changed, - defines.input_action.gui_location_changed, - defines.input_action.gui_selected_tab_changed, - defines.input_action.gui_selection_state_changed, - defines.input_action.gui_switch_state_changed, - defines.input_action.gui_text_changed, - defines.input_action.gui_value_changed, - defines.input_action.open_character_gui, - defines.input_action.open_kills_gui, - defines.input_action.rotate_entity, - defines.input_action.start_walking, - defines.input_action.toggle_show_entity_info, - defines.input_action.write_to_console - } - - for _, d in pairs(defs) do - p.set_allows_action(d, true) - end - - storage.rocket_silo = {} - storage.spectator_rejoin_delay = {} - storage.spy_fish_timeout = {} - storage.force_area = {} - storage.unit_spawners = {} - storage.unit_spawners.north_biters = {} - storage.unit_spawners.south_biters = {} - storage.active_biters = {} - storage.biter_raffle = {} - storage.evo_raise_counter = 1 - storage.next_attack = 'north' - if math.random(1, 2) == 1 then - storage.next_attack = 'south' - end - storage.bb_evolution = {} - storage.bb_threat_income = {} - storage.bb_threat = {} - storage.chunks_to_mirror = {} - storage.map_pregen_message_counter = {} - - for _, force_name in pairs({ 'west', 'east' }) do - game.forces[force_name].share_chart = true - game.forces[force_name].technologies['artillery'].enabled = false - game.forces[force_name].technologies['artillery-shell-range-1'].enabled = false - game.forces[force_name].technologies['artillery-shell-speed-1'].enabled = false - game.forces[force_name].technologies['land-mine'].enabled = false - game.forces[force_name].technologies['atomic-bomb'].enabled = false - game.forces[force_name].share_chart = true - local force_index = game.forces[force_name].index - storage.map_forces[force_name].unit_health_boost = 1 - storage.map_forces[force_name].unit_count = 0 - storage.map_forces[force_name].units = {} - storage.map_forces[force_name].radar = {} - storage.map_forces[force_name].max_unit_count = 768 - storage.map_forces[force_name].player_count = 0 - storage.biter_reanimator.forces[force_index] = 0 - storage.map_forces[force_name].energy = 0 - storage.map_forces[force_name].modifier = { damage = 1, resistance = 1, splash = 1 } - storage.map_forces[force_name].ate_buffer_potion = { - ['automation-science-pack'] = 0, - ['logistic-science-pack'] = 0, - ['military-science-pack'] = 0, - ['chemical-science-pack'] = 0, - ['production-science-pack'] = 0, - ['utility-science-pack'] = 0 - } - if force_name == 'west' then - storage.map_forces[force_name].worm_turrets_positions = { - [1] = { x = -127, y = -38 }, - [2] = { x = -112, y = -38 }, - [3] = { x = -127, y = -70 }, - [4] = { x = -112, y = -70 }, - [5] = { x = -127, y = -102 }, - [6] = { x = -112, y = -102 }, - [7] = { x = -90, y = -119 }, - [8] = { x = -90, y = -136 }, - [9] = { x = -70, y = -90 }, - [10] = { x = -50, y = -90 }, - [11] = { x = -70, y = -58 }, - [12] = { x = -50, y = -58 }, - [13] = { x = -70, y = -26 }, - [14] = { x = -50, y = -26 }, - [15] = { x = -70, y = 0 }, - [16] = { x = -50, y = 0 }, - [17] = { x = -70, y = 36 }, - [18] = { x = -50, y = 36 }, - [19] = { x = -70, y = 68 }, - [20] = { x = -50, y = 68 }, - [21] = { x = -70, y = 100 }, - [22] = { x = -50, y = 100 }, - [23] = { x = -30, y = 119 }, - [24] = { x = -30, y = 136 }, - [25] = { x = -9, y = 90 }, - [26] = { x = 9, y = 90 }, - [27] = { x = -9, y = 59 }, - [28] = { x = 9, y = 59 }, - [29] = { x = -9, y = 27 }, - [30] = { x = 9, y = 27 } - } - storage.map_forces[force_name].spawn = { x = -137, y = 0 } - storage.map_forces[force_name].eei = { x = -200, y = 0 } - else - storage.map_forces[force_name].worm_turrets_positions = { - [1] = { x = 127, y = 38 }, - [2] = { x = 112, y = 38 }, - [3] = { x = 127, y = 70 }, - [4] = { x = 112, y = 70 }, - [5] = { x = 127, y = 102 }, - [6] = { x = 112, y = 102 }, - [7] = { x = 90, y = 119 }, - [8] = { x = 90, y = 136 }, - [9] = { x = 70, y = 90 }, - [10] = { x = 50, y = 90 }, - [11] = { x = 70, y = 58 }, - [12] = { x = 50, y = 58 }, - [13] = { x = 70, y = 26 }, - [14] = { x = 50, y = 26 }, - [15] = { x = 70, y = 0 }, - [16] = { x = 50, y = 0 }, - [17] = { x = 70, y = -36 }, - [18] = { x = 50, y = -36 }, - [19] = { x = 70, y = -68 }, - [20] = { x = 50, y = -68 }, - [21] = { x = 70, y = -100 }, - [22] = { x = 50, y = -100 }, - [23] = { x = 30, y = -119 }, - [24] = { x = 30, y = -136 }, - [25] = { x = -9, y = -90 }, - [26] = { x = 9, y = -90 }, - [27] = { x = 9, y = -59 }, - [28] = { x = -9, y = -59 }, - [29] = { x = 9, y = -27 }, - [30] = { x = -9, y = -27 } - } - storage.map_forces[force_name].spawn = { x = 137, y = 0 } - storage.map_forces[force_name].eei = { x = 201, y = 0 } - end - storage.active_biters[force_name] = {} - storage.biter_raffle[force_name] = {} - end -end - -return Public diff --git a/maps/native_war/main.lua b/maps/native_war/main.lua deleted file mode 100644 index 5027a18ce..000000000 --- a/maps/native_war/main.lua +++ /dev/null @@ -1,636 +0,0 @@ ---luacheck: ignore -require 'modules.biter_reanimator' -require 'maps.native_war.share_chat' -require 'maps.native_war.mineable_wreckage_yields_scrap' -require 'maps.native_war.gui' -local Global = require 'utils.global' -local Gui = require 'utils.gui' -local Map_score = require 'modules.map_score' -local Team = require 'maps.native_war.team' -local Terrain = require 'maps.native_war.terrain' -local Init = require 'maps.native_war.init' -local Settings = require 'maps.native_war.settings' -local Reset = require 'utils.functions.soft_reset' -local Map = require 'maps.native_war.map_info' -local Team_manager = require 'maps.native_war.team_manager' -local math_random = math.random -local Public = {} - -local worm_turret_spawn_radius = 18 - -local worm_turret_vectors = {} -worm_turret_vectors.west = {} -for x = 0, worm_turret_spawn_radius, 1 do - for y = worm_turret_spawn_radius * -1, worm_turret_spawn_radius, 1 do - local d = math.sqrt(x ^ 2 + y ^ 2) - if d <= worm_turret_spawn_radius and d > 3 then - table.insert(worm_turret_vectors.west, { x, y }) - end - end -end -worm_turret_vectors.east = {} -for x = worm_turret_spawn_radius * -1, 0, 1 do - for y = worm_turret_spawn_radius * -1, worm_turret_spawn_radius, 1 do - local d = math.sqrt(x ^ 2 + y ^ 2) - if d <= worm_turret_spawn_radius and d > 3 then - table.insert(worm_turret_vectors.east, { x, y }) - end - end -end - -function create_beams(surface, energy, force) - if force == 'west' then - local beams = surface.find_entities_filtered { area = { { -140, -100 }, { -30, 100 } }, name = 'electric-beam' } - for _, e in pairs(beams) do - e.destroy() - end - local beams = surface.find_entities_filtered { area = { { -30, 20 }, { 30, 100 } }, name = 'electric-beam' } - for _, e in pairs(beams) do - e.destroy() - end - storage.map_forces[force].spawn = { x = -137, y = 0 } - if energy >= 6 and energy < 12 then - surface.create_entity({ name = 'electric-beam', position = { -120, -35 }, source = { -120, -35 }, target = { -137, -35 } }) - surface.create_entity({ name = 'electric-beam', position = { -120, -35 }, source = { -120, -35 }, target = { -102, -35 } }) - storage.map_forces[force].spawn = { x = -120, y = -32 } - end - if energy >= 12 and energy < 18 then - surface.create_entity({ name = 'electric-beam', position = { -120, -98 }, source = { -120, -98 }, target = { -137, -98 } }) - surface.create_entity({ name = 'electric-beam', position = { -120, -98 }, source = { -120, -98 }, target = { -102, -98 } }) - storage.map_forces[force].spawn = { x = -120, y = -96 } - end - if energy >= 18 and energy < 24 then - surface.create_entity({ name = 'electric-beam', position = { -60, -98 }, source = { -60, -98 }, target = { -77, -98 } }) - surface.create_entity({ name = 'electric-beam', position = { -60, -98 }, source = { -60, -98 }, target = { -42, -98 } }) - storage.map_forces[force].spawn = { x = -60, y = -100 } - end - if energy >= 24 and energy < 30 then - surface.create_entity({ name = 'electric-beam', position = { -60, -35 }, source = { -60, -35 }, target = { -77, -35 } }) - surface.create_entity({ name = 'electric-beam', position = { -60, -35 }, source = { -60, -35 }, target = { -42, -35 } }) - storage.map_forces[force].spawn = { x = -60, y = -37 } - end - if energy >= 30 and energy < 36 then - surface.create_entity({ name = 'electric-beam', position = { -60, 30 }, source = { -60, 30 }, target = { -77, 30 } }) - surface.create_entity({ name = 'electric-beam', position = { -60, 30 }, source = { -60, 30 }, target = { -42, 30 } }) - storage.map_forces[force].spawn = { x = -60, y = 28 } - end - if energy >= 36 and energy < 42 then - surface.create_entity({ name = 'electric-beam', position = { -60, 93 }, source = { -60, 93 }, target = { -77, 93 } }) - surface.create_entity({ name = 'electric-beam', position = { -60, 93 }, source = { -60, 93 }, target = { -42, 93 } }) - storage.map_forces[force].spawn = { x = -60, y = 91 } - end - if energy >= 42 and energy < 48 then - surface.create_entity({ name = 'electric-beam', position = { 0, 93 }, source = { 0, 93 }, target = { -17, 93 } }) - surface.create_entity({ name = 'electric-beam', position = { 0, 93 }, source = { 0, 93 }, target = { 18, 93 } }) - storage.map_forces[force].spawn = { x = 0, y = 95 } - end - if energy >= 48 then - surface.create_entity({ name = 'electric-beam', position = { 0, -35 }, source = { 0, 30 }, target = { -17, 30 } }) - surface.create_entity({ name = 'electric-beam', position = { 0, -35 }, source = { 0, 30 }, target = { 18, 30 } }) - storage.map_forces[force].spawn = { x = 0, y = -33 } - end - elseif force == 'east' then - local beams2 = surface.find_entities_filtered { area = { { 30, -100 }, { 140, 100 } }, name = 'electric-beam' } - for _, e in pairs(beams2) do - e.destroy() - end - local beams2 = surface.find_entities_filtered { area = { { -30, -100 }, { 30, -20 } }, name = 'electric-beam' } - for _, e in pairs(beams2) do - e.destroy() - end - storage.map_forces[force].spawn = { x = 137, y = 0 } - if energy >= 6 and energy < 12 then - surface.create_entity({ name = 'electric-beam', position = { 120, -35 }, source = { 120, 30 }, target = { 103, 30 } }) - surface.create_entity({ name = 'electric-beam', position = { 120, -35 }, source = { 120, 30 }, target = { 138, 30 } }) - storage.map_forces[force].spawn = { x = 120, y = 32 } - end - if energy >= 12 and energy < 18 then - surface.create_entity({ name = 'electric-beam', position = { 120, 93 }, source = { 120, 93 }, target = { 103, 93 } }) - surface.create_entity({ name = 'electric-beam', position = { 120, 93 }, source = { 120, 93 }, target = { 138, 93 } }) - storage.map_forces[force].spawn = { x = 120, y = 96 } - end - if energy >= 18 and energy < 24 then - surface.create_entity({ name = 'electric-beam', position = { 60, 93 }, source = { 60, 93 }, target = { 43, 93 } }) - surface.create_entity({ name = 'electric-beam', position = { 60, 93 }, source = { 60, 93 }, target = { 78, 93 } }) - storage.map_forces[force].spawn = { x = 60, y = 100 } - end - if energy >= 24 and energy < 30 then - surface.create_entity({ name = 'electric-beam', position = { 60, 30 }, source = { 60, 30 }, target = { 43, 30 } }) - surface.create_entity({ name = 'electric-beam', position = { 60, 30 }, source = { 60, 30 }, target = { 78, 30 } }) - storage.map_forces[force].spawn = { x = 60, y = 37 } - end - if energy >= 30 and energy < 36 then - surface.create_entity({ name = 'electric-beam', position = { 60, -35 }, source = { 60, -35 }, target = { 43, -35 } }) - surface.create_entity({ name = 'electric-beam', position = { 60, -35 }, source = { 60, -35 }, target = { 78, -35 } }) - storage.map_forces[force].spawn = { x = 60, y = -28 } - end - if energy >= 36 and energy < 42 then - surface.create_entity({ name = 'electric-beam', position = { 60, -98 }, source = { 60, -98 }, target = { 43, -98 } }) - surface.create_entity({ name = 'electric-beam', position = { 60, -98 }, source = { 60, -98 }, target = { 78, -98 } }) - storage.map_forces[force].spawn = { x = 60, y = -91 } - end - if energy >= 42 and energy < 48 then - surface.create_entity({ name = 'electric-beam', position = { 0, -98 }, source = { 0, -98 }, target = { -17, -98 } }) - surface.create_entity({ name = 'electric-beam', position = { 0, -98 }, source = { 0, -98 }, target = { 18, -98 } }) - storage.map_forces[force].spawn = { x = 0, y = -95 } - end - if energy >= 48 then - surface.create_entity({ name = 'electric-beam', position = { 0, -35 }, source = { 0, -35 }, target = { -17, -35 } }) - surface.create_entity({ name = 'electric-beam', position = { 0, -35 }, source = { 0, -35 }, target = { 18, -35 } }) - storage.map_forces[force].spawn = { x = 0, y = 33 } - end - else - end -end - -local function initial_worm_turret(surface) - for _, force_name in pairs({ 'west', 'east' }) do - for k, pos in pairs(storage.map_forces[force_name].worm_turrets_positions) do - surface.create_entity({ name = 'small-worm-turret', position = pos, force = force_name }) - end - end -end - -local function get_belts(market) - local belts = - market.surface.find_entities_filtered( - { - type = 'transport-belt', - area = { { market.position.x - 2, market.position.y - 1 }, { market.position.x + 2, market.position.y + 1 } }, - force = market.force - } - ) - return belts -end - -local function eat_food_from_belt(belt) - for i = 1, 2, 1 do - local line = belt.get_transport_line(i) - for _, science_name in pairs(Settings.science_pack_name) do - --if storage.map_forces[belt.force.name].unit_count > storage.map_forces[belt.force.name].max_unit_count then return end - local removed_item_count = line.remove_item({ name = science_name, count = 8 }) - storage.map_forces[belt.force.name].ate_buffer_potion[science_name] = storage.map_forces[belt.force.name].ate_buffer_potion[science_name] + removed_item_count - end - end -end - -local function spawn_wave_from_belt(force_name) - for _, science_name in pairs(Settings.science_pack_name) do - local nb_science = storage.map_forces[force_name].ate_buffer_potion[science_name] - if nb_science >= Settings.wave_price[science_name].price then - Team.on_buy_wave('native_war', force_name, Settings.science_pack[science_name].short) - storage.map_forces[force_name].ate_buffer_potion[science_name] = storage.map_forces[force_name].ate_buffer_potion[science_name] - Settings.wave_price[science_name].price - --if storage.map_forces[belt.force.name].ate_buffer_potion[science_name] < 0 then storage.map_forces[belt.force.name].ate_buffer_potion[science_name] =0 end - end - end -end - -local function nom() - local surface = game.surfaces['native_war'] - for key, force in pairs(storage.map_forces) do - if not force.hatchery then - return - end - force.hatchery.health = force.hatchery.health + 5 - local belts = get_belts(force.hatchery) - for _, belt in pairs(belts) do - eat_food_from_belt(belt) - end - spawn_wave_from_belt(key) - end -end - -local function get_units(force_name) - local units = {} - local count = 1 - for _, unit in pairs(storage.map_forces[force_name].units) do - if not unit.unit_group then - --if math_random(1, 3) ~= 1 then - units[count] = unit - count = count + 1 - -- end - end - end - return units -end - -local function send_unit_groups() - local surface = game.surfaces['native_war'] - for key, force in pairs(storage.map_forces) do - local units = get_units(key) - if #units > 0 then - --alert_bubble(key, units[1]) - local vectors = worm_turret_vectors[key] - local vector = vectors[math_random(1, #vectors)] - local position = { x = storage.map_forces[key].spawn.x + 10 + vector[1], y = storage.map_forces[key].spawn.y + vector[2] } - local unit_group = surface.create_unit_group({ position = position, force = key }) - for _, unit in pairs(units) do - unit_group.add_member(unit) - end - if not force.target then - return - end - if not force.target.valid then - return - end - --unit.ai_settings.allow_destroy_when_commands_fail = false - --unit.ai_settings.allow_try_return_to_spawner = false - unit_group.set_command( - { - type = defines.command.compound, - structure_type = defines.compound_command.return_last, - commands = { - { - type = defines.command.attack_area, - destination = { x = force.target.position.x, y = force.target.position.y }, - radius = 6, - distraction = defines.distraction.by_anything - }, - { - type = defines.command.attack, - target = force.target, - distraction = defines.distraction.by_enemy - } - } - } - ) - unit_group.start_moving() - end - end -end -local function randomize_worms() - for k, pos in pairs(storage.map_forces['west'].worm_turrets_positions) do - local vx = math.random(0, 8) - 4 - local vy = math.random(0, 8) - 4 - storage.map_forces['west'].worm_turrets_positions[k].x = pos.x + vx - storage.map_forces['west'].worm_turrets_positions[k].y = pos.y + vy - storage.map_forces['east'].worm_turrets_positions[k].x = storage.map_forces['east'].worm_turrets_positions[k].x - vx - storage.map_forces['east'].worm_turrets_positions[k].y = storage.map_forces['east'].worm_turrets_positions[k].y - vy - end -end - -local function on_player_changed_position(event) - local player = game.players[event.player_index] - if player.position.y > -175 and player.position.y < -173 and player.position.x <= 15 and player.position.x >= -15 then - player.teleport({ player.position.x, 175 }, game.surfaces['native_war']) - end - if player.position.y < 175 and player.position.y > 173 and player.position.x <= 15 and player.position.x >= -15 then - player.teleport({ player.position.x, -175 }, game.surfaces['native_war']) - end - if math.abs(player.position.x) > 256 then - if player.gui.screen['market_frame'] then - player.gui.screen['market_frame'].destroy() - end - end -end - -local function on_entity_died(event) - local entity = event.entity - if not entity.valid then - return - end - if storage.game_reset_tick then - return - end - - if entity.type == 'unit' then - local team = storage.map_forces[entity.force.name] - team.unit_count = team.unit_count - 1 - team.units[entity.unit_number] = nil - return - end - if entity.name == 'radar' then - storage.map_forces[entity.force.name].radar[entity.unit_number] = nil - end - if entity.type ~= 'market' then - return - end - - if entity.force.name == 'east' then - game.print('East lost their Market.', { 100, 100, 100 }) - game.forces.east.play_sound { path = 'utility/game_lost', volume_modifier = 0.85 } - - game.print('>>>> WEST TEAM HAS WON THE GAME!!! <<<<', { 250, 120, 0 }) - game.forces.west.play_sound { path = 'utility/game_won', volume_modifier = 0.85 } - - for _, player in pairs(game.forces.west.connected_players) do - if storage.map_forces.east.player_count > 0 then - Map_score.set_score(player, Map_score.get_score(player) + 1) - end - end - else - game.print('West lost their Market.', { 100, 100, 100 }) - game.forces.west.play_sound { path = 'utility/game_lost', volume_modifier = 0.85 } - - game.print('>>>> EAST TEAM HAS WON THE GAME!!! <<<<', { 250, 120, 0 }) - game.forces.east.play_sound { path = 'utility/game_won', volume_modifier = 0.85 } - - for _, player in pairs(game.forces.east.connected_players) do - if storage.map_forces.west.player_count > 0 then - Map_score.set_score(player, Map_score.get_score(player) + 1) - end - end - end - - game.print('Next round starting in 60 seconds..', { 150, 150, 150 }) - - game.forces.spectator.play_sound { path = 'utility/game_won', volume_modifier = 0.85 } - - storage.game_reset_tick = game.tick + 3600 - game.delete_surface('mirror_terrain') - - for _, player in pairs(game.connected_players) do - for _, child in pairs(player.gui.left.children) do - child.destroy() - end - Gui.call_existing_tab(player, 'Map Scores') - end -end - -local function on_built_entity(event) - local player = game.players[event.player_index] - if event.entity.name == 'radar' then - local unit_number = event.entity.unit_number - local entity = event.entity - storage.map_forces[player.force.name].radar[unit_number] = entity - end -end --- on robot build radar is elsewhere EVL - -local function on_player_mined_entity(event) - local player = game.players[event.player_index] - if event.entity.name == 'radar' then - storage.map_forces[player.force.name].radar[event.entity.unit_number] = nil - end -end - -local function on_robot_mined_entity(event) - if event.entity.name == 'radar' then - storage.map_forces[event.robot.force.name].radar[event.entity.unit_number] = nil - end -end - -local function on_player_joined_game(event) - local surface = game.surfaces['native_war'] - local player = game.players[event.player_index] - - if player.online_time == 0 then - player.spectator = true - player.force = game.forces.spectator - if surface.is_chunk_generated({ 0, -190 }) then - player.teleport(surface.find_non_colliding_position('character', game.forces.player.get_spawn_position(surface), 32, 0.5), surface) - else - player.teleport({ 0, -190 }, surface) - end - - player.character.destructible = false - game.permissions.get_group('spectator').add_player(player) - end - - Map.player_joined_game(player) - Team_manager.draw_top_toggle_button(player) -end - -local function on_gui_click(event) - local player = game.players[event.player_index] - local element = event.element - if not element then - return - end - if not element.valid then - return - end - if Map.gui_click(player, element) then - return - end - Team_manager.gui_click(event) -end - -local function reveal_map(surface, force_name) - local actif_radar_count = 0 - local radar_range_x = 16 - if force_name == 'east' then - -- find_entities_filtered{name="radar", force="east"} - for k, ent in pairs(storage.map_forces['east'].radar) do - if ent.energy >= 5000 then - actif_radar_count = actif_radar_count + 1 - end - end - if actif_radar_count == 0 then - return - end - local x_east = -224 + actif_radar_count * radar_range_x * -1 - game.forces.east.chart(surface, { { x_east, (x_east) * 0.5 }, { -224, (-x_east) * 0.5 } }) - end - if force_name == 'west' then - for k, ent in pairs(storage.map_forces['west'].radar) do - if ent.energy >= 5000 then - actif_radar_count = actif_radar_count + 1 - end - end - if actif_radar_count == 0 then - return - end - local x_west = 224 + actif_radar_count * radar_range_x - game.forces.west.chart(surface, { { 224, (-x_west) * 0.5 }, { x_west, (x_west) * 0.5 } }) - end -end - -local function reset_operable_market(surface) - local market = surface.find_entities_filtered { position = { -197, 0 }, radius = 5, type = 'market' } - market[1].operable = true - local market = surface.find_entities_filtered { position = { 197, 0 }, radius = 5, type = 'market' } - market[1].operable = true -end - -local function tick() - local game_tick = game.tick - if game_tick == 120 then - randomize_worms() - initial_worm_turret(game.surfaces['native_war']) - end - if game_tick % 240 == 0 then --400 ou 200 - local surface = game.surfaces['native_war'] - reset_operable_market(surface) - local area = { { -224, -150 }, { 224, 150 } } - game.forces.west.chart(surface, area) - game.forces.east.chart(surface, area) - Team_manager.refresh() - end - - if game_tick % 480 == 0 then -- was 600 - local surface = game.surfaces['native_war'] - reveal_map(surface, 'east') - end - if (game_tick + 240) % 480 == 0 then -- was +300 % 600 - local surface = game.surfaces['native_war'] - reveal_map(surface, 'west') - end - - if game_tick % 900 == 0 then - local surface = game.surfaces['native_war'] - for _, force_name in pairs({ 'west', 'east' }) do - local structs = game.surfaces['native_war'].find_entities_filtered { position = storage.map_forces[force_name].eei, radius = 5, type = 'electric-energy-interface' } - local energy = structs[1].energy / 100000 - if energy < storage.map_forces[force_name].energy then - local new_global_energy = storage.map_forces[force_name].energy - 6 - if new_global_energy <= 0 then - new_global_energy = 0 - end - game.print(force_name .. ' recule son beam') - create_beams(surface, new_global_energy, force_name) - storage.map_forces[force_name].energy = new_global_energy - end - end - end - if game_tick % 1800 == 0 then - local surface = game.surfaces['native_war'] - for _, force_name in pairs({ 'west', 'east' }) do - local structs = game.surfaces['native_war'].find_entities_filtered { position = storage.map_forces[force_name].eei, radius = 5, type = 'electric-energy-interface' } - local energy = structs[1].energy / 100000 - if energy >= storage.map_forces[force_name].energy + 6 then - local new_global_energy = storage.map_forces[force_name].energy + 6 - if new_global_energy >= 48 then - new_global_energy = 48 - end - game.print(force_name .. ' avance son beam') - create_beams(surface, new_global_energy, force_name) - storage.map_forces[force_name].energy = new_global_energy - end - end - end -end - ---Construction Robot Restriction -local robot_build_restriction = { - ['east'] = function (x, y) - if x < 170 then - return true - end - if (x - 160) * (x - 160) + y * y <= 40 * 40 then - return true - end - end, - ['west'] = function (x, y) - if x > -170 then - return true - end - if (x + 160) * (x + 160) + y * y <= 40 * 40 then - return true - end - end -} - -local function on_robot_built_entity(event) - if not robot_build_restriction[event.robot.force.name] then - return - end - if not robot_build_restriction[event.robot.force.name](event.entity.position.x, event.entity.position.y) then - if event.entity.name == 'radar' then - local unit_number = event.entity.unit_number - local entity = event.entity - storage.map_forces[event.robot.force.name].radar[unit_number] = entity - end - return - end - local inventory = event.robot.get_inventory(defines.inventory.robot_cargo) - inventory.insert({ name = event.entity.name, count = 1 }) - event.robot.surface.create_entity({ name = 'explosion', position = event.entity.position }) - game.print('Team ' .. event.robot.force.name .. "'s construction drone had an accident.", { r = 200, g = 50, b = 100 }) - event.entity.destroy() -end - -local function on_entity_damaged(event) - local entity = event.entity - local cause = event.cause - if not entity.valid then - return - end - if entity.type == 'unit' or entity.type == 'turret' then - if cause.type == 'unit' then - if cause.name == 'small-biter' or cause.name == 'medium-biter' or cause.name == 'big-biter' or cause.name == 'behemoth-biter' then - local modified_damage = event.original_damage_amount * storage.map_forces[cause.force.name].modifier.damage * storage.map_forces[entity.force.name].modifier.resistance - entity.health = entity.health - modified_damage - elseif cause.name == 'small-spitter' or cause.name == 'medium-spitter' or cause.name == 'big-spitter' or cause.name == 'behemoth-spitter' then - local modified_damage = event.original_damage_amount * storage.map_forces[cause.force.name].modifier.splash * storage.map_forces[entity.force.name].modifier.resistance - entity.health = entity.health - modified_damage - end - end - end - if entity.type ~= 'market' then - return - end - if cause then - if cause.valid then - if cause.type == 'unit' then - if math_random(1, 5) == 1 then - return - end - end - end - end - entity.health = entity.health + event.final_damage_amount -end - -local function show_color_force() - local force_name1 = 'east' - local force_name2 = 'west' - for _, unit in pairs(storage.map_forces[force_name1].units) do - rendering.draw_circle { - color = { 255, 1, 1 }, - radius = 0.1, - filled = true, - target = unit, - target_offset = { -0.1, -0.1 }, - surface = unit.surface, - time_to_live = 60, - only_in_alt_mode = true - } - end - for _, unit in pairs(storage.map_forces[force_name2].units) do - rendering.draw_circle { - color = { 1, 1, 255 }, - radius = 0.1, - filled = true, - target = unit, - target_offset = { -0.1, -0.1 }, - surface = unit.surface, - time_to_live = 60, - only_in_alt_mode = true - } - end -end - -local function on_init() - game.difficulty_settings.technology_price_multiplier = 1 - game.map_settings.enemy_evolution.destroy_factor = 0 - game.map_settings.enemy_evolution.pollution_factor = 0 - game.map_settings.enemy_evolution.time_factor = 0 - game.map_settings.enemy_expansion.enabled = false - game.map_settings.pollution.enabled = false - - storage.map_forces = { - ['west'] = {}, - ['east'] = {} - } - Init.settings() - Init.surface() - Init.forces() - kill_entities_combat_zone(surface) -end - -local event = require 'utils.event' -event.on_init(on_init) -event.on_nth_tick(60, tick) -event.on_nth_tick(60, show_color_force) -event.on_nth_tick(30, nom) -event.on_nth_tick(300, send_unit_groups) -event.add(defines.events.on_robot_built_entity, on_robot_built_entity) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_built_entity, on_built_entity) -event.add(defines.events.on_player_mined_entity, on_player_mined_entity) -event.add(defines.events.on_robot_mined_entity, on_robot_mined_entity) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_player_changed_position, on_player_changed_position) -event.add(defines.events.on_entity_damaged, on_entity_damaged) -event.add(defines.events.on_gui_click, on_gui_click) diff --git a/maps/native_war/map_info.lua b/maps/native_war/map_info.lua deleted file mode 100644 index d8446760e..000000000 --- a/maps/native_war/map_info.lua +++ /dev/null @@ -1,59 +0,0 @@ ---luacheck: ignore -local Public = {} - -local function create_map_intro_button(player) - if player.gui.top['map_intro_button'] then - return - end - local b = player.gui.top.add({type = 'sprite-button', caption = '?', name = 'map_intro_button', tooltip = 'Map Info'}) - b.style.font_color = {r = 0.5, g = 0.3, b = 0.99} - b.style.font = 'heading-1' - b.style.minimal_height = 38 - b.style.minimal_width = 38 - b.style.top_padding = 1 - b.style.left_padding = 1 - b.style.right_padding = 1 - b.style.bottom_padding = 1 -end - -local function create_map_intro(player) - if player.gui.center['map_intro_frame'] then - player.gui.center['map_intro_frame'].destroy() - end - local frame = player.gui.center.add {type = 'frame', name = 'map_intro_frame', direction = 'vertical'} - local frame = frame.add {type = 'frame'} - local l = frame.add {type = 'label', caption = {'native_war.map_info'}, name = 'native_war_map_intro'} - l.style.single_line = false - l.style.font = 'heading-2' - l.style.font_color = {r = 0.7, g = 0.6, b = 0.99} -end - -function Public.player_joined_game(player) - create_map_intro_button(player) - player.print('Check the question mark button "?" for basic information', {255, 0, 0}) - if player.online_time == 0 then - --create_map_intro(player) - end -end - -function Public.gui_click(player, element) - if element.name == 'close_map_intro_frame' then - player.gui.center['map_intro_frame'].destroy() - return true - end - if element.name == 'native_war_map_intro' then - player.gui.center['map_intro_frame'].destroy() - return true - end - if element.name == 'map_intro_button' then - if player.gui.center['map_intro_frame'] then - player.gui.center['map_intro_frame'].destroy() - return true - else - create_map_intro(player) - return true - end - end -end - -return Public diff --git a/maps/native_war/mineable_wreckage_yields_scrap.lua b/maps/native_war/mineable_wreckage_yields_scrap.lua deleted file mode 100644 index c4b84bde2..000000000 --- a/maps/native_war/mineable_wreckage_yields_scrap.lua +++ /dev/null @@ -1,148 +0,0 @@ ---luacheck: ignore ---mineable-wreckage yields scrap -- by mewmew - -local mining_chance_weights = { - { name = 'iron-plate', chance = 1000 }, - { name = 'iron-gear-wheel', chance = 750 }, - { name = 'copper-plate', chance = 750 }, - { name = 'copper-cable', chance = 500 }, - { name = 'electronic-circuit', chance = 300 }, - { name = 'steel-plate', chance = 200 }, - { name = 'solid-fuel', chance = 150 }, - { name = 'pipe', chance = 100 }, - { name = 'iron-stick', chance = 50 }, - { name = 'battery', chance = 20 }, - { name = 'barrel', chance = 10 }, - { name = 'crude-oil-barrel', chance = 30 }, - { name = 'lubricant-barrel', chance = 20 }, - { name = 'petroleum-gas-barrel', chance = 15 }, - { name = 'sulfuric-acid-barrel', chance = 15 }, - { name = 'heavy-oil-barrel', chance = 15 }, - { name = 'light-oil-barrel', chance = 15 }, - { name = 'water-barrel', chance = 10 }, - { name = 'explosives', chance = 5 }, - { name = 'advanced-circuit', chance = 5 }, - { name = 'nuclear-fuel', chance = 1 }, - { name = 'pipe-to-ground', chance = 10 }, - { name = 'plastic-bar', chance = 5 }, - { name = 'processing-unit', chance = 2 }, - { name = 'depleted-uranium-fuel-cell', chance = 1 }, - { name = 'uranium-fuel-cell', chance = 1 }, - { name = 'rocket-fuel', chance = 3 }, - { name = 'low-density-structure', chance = 1 }, - { name = 'heat-pipe', chance = 1 }, - { name = 'engine-unit', chance = 4 }, - { name = 'electric-engine-unit', chance = 2 }, - { name = 'logistic-robot', chance = 1 }, - { name = 'construction-robot', chance = 1 }, - { name = 'land-mine', chance = 3 }, - { name = 'grenade', chance = 10 }, - { name = 'rocket', chance = 3 }, - { name = 'explosive-rocket', chance = 3 }, - { name = 'cannon-shell', chance = 2 }, - { name = 'explosive-cannon-shell', chance = 2 }, - { name = 'uranium-cannon-shell', chance = 1 }, - { name = 'explosive-uranium-cannon-shell', chance = 1 }, - { name = 'artillery-shell', chance = 1 }, - { name = 'cluster-grenade', chance = 2 }, - { name = 'defender-capsule', chance = 5 }, - { name = 'destroyer-capsule', chance = 1 }, - { name = 'distractor-capsule', chance = 2 } -} - -local scrap_yield_amounts = { - ['iron-plate'] = 16, - ['iron-gear-wheel'] = 8, - ['iron-stick'] = 16, - ['copper-plate'] = 16, - ['copper-cable'] = 24, - ['electronic-circuit'] = 8, - ['steel-plate'] = 4, - ['pipe'] = 8, - ['solid-fuel'] = 4, - ['barrel'] = 3, - ['crude-oil-barrel'] = 3, - ['lubricant-barrel'] = 3, - ['petroleum-gas-barrel'] = 3, - ['sulfuric-acid-barrel'] = 3, - ['heavy-oil-barrel'] = 3, - ['light-oil-barrel'] = 3, - ['water-barrel'] = 3, - ['battery'] = 2, - ['explosives'] = 4, - ['advanced-circuit'] = 2, - ['nuclear-fuel'] = 0.1, - ['pipe-to-ground'] = 1, - ['plastic-bar'] = 4, - ['processing-unit'] = 1, - ['depleted-uranium-fuel-cell'] = 1, - ['uranium-fuel-cell'] = 0.3, - ['rocket-fuel'] = 0.3, - ['low-density-structure'] = 0.3, - ['heat-pipe'] = 1, - ['engine-unit'] = 2, - ['electric-engine-unit'] = 2, - ['logistic-robot'] = 0.3, - ['construction-robot'] = 0.3, - ['land-mine'] = 1, - ['grenade'] = 2, - ['rocket'] = 2, - ['explosive-rocket'] = 2, - ['cannon-shell'] = 2, - ['explosive-cannon-shell'] = 2, - ['uranium-cannon-shell'] = 2, - ['explosive-uranium-cannon-shell'] = 2, - ['artillery-shell'] = 0.3, - ['cluster-grenade'] = 0.3, - ['defender-capsule'] = 2, - ['destroyer-capsule'] = 0.3, - ['distractor-capsule'] = 0.3 -} - -local scrap_raffle = {} -for _, t in pairs(mining_chance_weights) do - for x = 1, t.chance, 1 do - table.insert(scrap_raffle, t.name) - end -end - -local size_of_scrap_raffle = #scrap_raffle - -local function on_player_mined_entity(event) - local entity = event.entity - if not entity.valid then - return - end - if entity.name ~= 'mineable-wreckage' then - return - end - - event.buffer.clear() - - local scrap = scrap_raffle[math.random(1, size_of_scrap_raffle)] - - local amount_bonus = (game.forces.enemy.evolution_factor * 2) + (game.forces.player.mining_drill_productivity_bonus * 2) - local r1 = math.ceil(scrap_yield_amounts[scrap] * (0.3 + (amount_bonus * 0.3))) - local r2 = math.ceil(scrap_yield_amounts[scrap] * (1.7 + (amount_bonus * 1.7))) - local amount = math.random(r1, r2) - - local player = game.players[event.player_index] - local inserted_count = player.insert({ name = scrap, count = amount }) - - if inserted_count ~= amount then - local amount_to_spill = amount - inserted_count - entity.surface.spill_item_stack(entity.position, { name = scrap, count = amount_to_spill }, true) - end - - entity.surface.create_entity( - { - name = 'flying-text', - position = entity.position, - text = '+' .. amount .. ' [img=item/' .. scrap .. ']', - color = { r = 0.98, g = 0.66, b = 0.22 } - } - ) -end - -local Event = require 'utils.event' -Event.add(defines.events.on_player_mined_entity, on_player_mined_entity) diff --git a/maps/native_war/settings.lua b/maps/native_war/settings.lua deleted file mode 100644 index 9f1dc6d6e..000000000 --- a/maps/native_war/settings.lua +++ /dev/null @@ -1,59 +0,0 @@ -local Public = {} -Public.wave_price = { - ['automation-science-pack'] = {price = 100}, - ['logistic-science-pack'] = {price = 60}, - ['military-science-pack'] = {price = 100}, - ['chemical-science-pack'] = {price = 100}, - ['production-science-pack'] = {price = 100}, - ['utility-science-pack'] = {price = 80} -} -Public.upgrade_turret_price = { - ['automation-science-pack'] = {price = 200}, - ['logistic-science-pack'] = {price = 120}, - ['military-science-pack'] = {price = 200}, - ['chemical-science-pack'] = {price = 200}, - ['production-science-pack'] = {price = 200}, - ['utility-science-pack'] = {price = 160} -} -Public.nb_of_waves = {1, 5, 10} -Public.science_pack = { - ['automation-science-pack'] = {short = 'red'}, - ['logistic-science-pack'] = {short = 'green'}, - ['military-science-pack'] = {short = 'grey'}, - ['chemical-science-pack'] = {short = 'blue'}, - ['production-science-pack'] = {short = 'purple'}, - ['utility-science-pack'] = {short = 'yellow'} -} -Public.color = { - ['automation-science-pack'] = {r = 255, g = 50, b = 50}, - ['logistic-science-pack'] = {r = 50, g = 255, b = 50}, - ['military-science-pack'] = {r = 105, g = 105, b = 105}, - ['chemical-science-pack'] = {r = 100, g = 200, b = 255}, - ['production-science-pack'] = {r = 150, g = 25, b = 255}, - ['utility-science-pack'] = {r = 210, g = 210, b = 60}, - ['space-science-pack'] = {r = 255, g = 255, b = 255}, - ['message'] = {r = 0.98, g = 0.66, b = 0.22} -} -Public.worm_dist = {'Closest', 'Farthest', 'All'} -Public.button_upgrade_name = { - ['red_Closest'] = {sp = 'automation-science-pack', spc = 'red', dist = 'Closest', type_worm = 'small'}, - ['green_Closest'] = {sp = 'logistic-science-pack', spc = 'green', dist = 'Closest', type_worm = 'small'}, - ['grey_Closest'] = {sp = 'military-science-pack', spc = 'grey', dist = 'Closest', type_worm = 'medium'}, - ['blue_Closest'] = {sp = 'chemical-science-pack', spc = 'blue', dist = 'Closest', type_worm = 'big'}, - ['purple_Closest'] = {sp = 'production-science-pack', spc = 'purple', dist = 'Closest', type_worm = 'behemoth'}, - ['yellow_Closest'] = {sp = 'utility-science-pack', spc = 'yellow', dist = 'Closest', type_worm = 'behemoth'}, - ['red_Farthest'] = {sp = 'automation-science-pack', spc = 'red', dist = 'Farthest', type_worm = 'small'}, - ['green_Farthest'] = {sp = 'logistic-science-pack', spc = 'green', dist = 'Furthest', type_worm = 'small'}, - ['grey_Farthest'] = {sp = 'military-science-pack', spc = 'grey', dist = 'Farthest', type_worm = 'medium'}, - ['blue_Farthest'] = {sp = 'chemical-science-pack', spc = 'blue', dist = 'Furthest', type_worm = 'big'}, - ['purple_Farthest'] = {sp = 'production-science-pack', spc = 'purple', dist = 'Farthest', type_worm = 'behemoth'}, - ['yellow_Farthest'] = {sp = 'utility-science-pack', spc = 'yellow', dist = 'Furthest', type_worm = 'behemoth'}, - ['red_All'] = {sp = 'automation-science-pack', spc = 'red', dist = 'All', type_worm = 'small'}, - ['green_All'] = {sp = 'logistic-science-pack', spc = 'green', dist = 'All', type_worm = 'small'}, - ['grey_All'] = {sp = 'military-science-pack', spc = 'grey', dist = 'All', type_worm = 'medium'}, - ['blue_All'] = {sp = 'chemical-science-pack', spc = 'blue', dist = 'All', type_worm = 'big'}, - ['purple_All'] = {sp = 'production-science-pack', spc = 'purple', dist = 'All', type_worm = 'behemoth'}, - ['yellow_All'] = {sp = 'utility-science-pack', spc = 'yellow', dist = 'All', type_worm = 'behemoth'} -} -Public.science_pack_name = {'automation-science-pack', 'logistic-science-pack', 'military-science-pack', 'chemical-science-pack', 'production-science-pack', 'utility-science-pack'} -return Public diff --git a/maps/native_war/share_chat.lua b/maps/native_war/share_chat.lua deleted file mode 100644 index 357762919..000000000 --- a/maps/native_war/share_chat.lua +++ /dev/null @@ -1,32 +0,0 @@ ---luacheck: ignore -----------share chat with spectator force------------------- -local function on_console_chat(event) - if not event.message then - return - end - if not event.player_index then - return - end - local player = game.players[event.player_index] - - local color = {} - color = player.color - color.r = color.r * 0.6 + 0.35 - color.g = color.g * 0.6 + 0.35 - color.b = color.b * 0.6 + 0.35 - color.a = 1 - - if player.force.name == 'west' then - game.forces.spectator.print(player.name .. ' (west): ' .. event.message, color) - end - if player.force.name == 'east' then - game.forces.spectator.print(player.name .. ' (east): ' .. event.message, color) - end - if player.force.name == 'spectator' then - game.forces.west.print(player.name .. ' (spectator): ' .. event.message, color) - game.forces.east.print(player.name .. ' (spectator): ' .. event.message, color) - end -end - -local event = require 'utils.event' -event.add(defines.events.on_console_chat, on_console_chat) diff --git a/maps/native_war/team.lua b/maps/native_war/team.lua deleted file mode 100644 index d45ea9114..000000000 --- a/maps/native_war/team.lua +++ /dev/null @@ -1,243 +0,0 @@ ---luacheck: ignore -local Public = {} -local math_random = math.random - -function Public.add_unit(force_name, unit_number, unit) - storage.map_forces[force_name].units[unit_number] = unit -end - -function Public.on_buy_wave(surface, force, tier) - if tier == 'red' or tier == 'green' then - local random_biter = math.random(5, 9) - for i = 1, random_biter, 1 do - local unit = - game.surfaces[surface].create_entity { - name = 'small-biter', - position = { storage.map_forces[force].spawn.x + i, storage.map_forces[force].spawn.y }, - force = game.forces[force] - } - storage.map_forces[force].units[unit.unit_number] = unit - end - for i = 1, 10 - random_biter, 1 do - local unit = - game.surfaces[surface].create_entity { - name = 'small-spitter', - position = { storage.map_forces[force].spawn.x + i, storage.map_forces[force].spawn.y }, - force = game.forces[force] - } - storage.map_forces[force].units[unit.unit_number] = unit - end - return - end - if tier == 'grey' then - local random_biter = math.random(5, 9) - for i = 1, random_biter, 1 do - local unit = - game.surfaces[surface].create_entity { - name = 'medium-biter', - position = { storage.map_forces[force].spawn.x + i, storage.map_forces[force].spawn.y }, - force = game.forces[force] - } - storage.map_forces[force].units[unit.unit_number] = unit - end - for i = 1, 10 - random_biter, 1 do - local unit = - game.surfaces[surface].create_entity { - name = 'medium-spitter', - position = { storage.map_forces[force].spawn.x + i, storage.map_forces[force].spawn.y }, - force = game.forces[force] - } - storage.map_forces[force].units[unit.unit_number] = unit - end - return - end - if tier == 'blue' then - local random_biter = math.random(5, 9) - for i = 1, random_biter, 1 do - local unit = - game.surfaces[surface].create_entity { - name = 'big-biter', - position = { storage.map_forces[force].spawn.x + i, storage.map_forces[force].spawn.y }, - force = game.forces[force] - } - storage.map_forces[force].units[unit.unit_number] = unit - end - for i = 1, 10 - random_biter, 1 do - local unit = - game.surfaces[surface].create_entity { - name = 'big-spitter', - position = { storage.map_forces[force].spawn.x + i, storage.map_forces[force].spawn.y }, - force = game.forces[force] - } - storage.map_forces[force].units[unit.unit_number] = unit - end - return - end - if tier == 'purple' or tier == 'yellow' then - local random_biter = math.random(5, 9) - for i = 1, random_biter, 1 do - local unit = - game.surfaces[surface].create_entity { - name = '-biter', - position = { storage.map_forces[force].spawn.x + i, storage.map_forces[force].spawn.y }, - force = game.forces[force] - } - storage.map_forces[force].units[unit.unit_number] = unit - end - for i = 1, 10 - random_biter, 1 do - local unit = - game.surfaces[surface].create_entity { - name = 'behemoth-spitter', - position = { storage.map_forces[force].spawn.x + i, storage.map_forces[force].spawn.y }, - force = game.forces[force] - } - storage.map_forces[force].units[unit.unit_number] = unit - end - return - end -end - -function Public.buy_worm_turret(surface, force_name, dist, player, player_nb_sp, nb_sp_price, sp) - local size_table_turret = #storage.map_forces[force_name].worm_turrets_positions - if dist == 'All' then - local player_sp_count = player_nb_sp - count = 0 - for k, pos in pairs(storage.map_forces[force_name].worm_turrets_positions) do - local turret = surface.find_entity('small-worm-turret', { pos.x, pos.y }) - if turret == nil and player_sp_count >= nb_sp_price then - local turrets = surface.find_entities_filtered { position = { pos.x, pos.y }, name = { 'medium-worm-turret', 'big-worm-turret', 'behemoth-worm-turret' } } - if #turrets == 0 then - local position = surface.find_non_colliding_position('big-worm-turret', { pos.x, pos.y }, 5, 1) - if not position then - position = { pos.x, pos.y } - end - surface.create_entity({ name = 'small-worm-turret', position = { position.x, position.y }, force = force_name }) - player.remove_item({ name = sp, count = nb_sp_price }) - player_sp_count = player_sp_count - nb_sp_price - count = count + 1 - end - end - end - if count == 0 then - return false - else - return true - end - elseif dist == 'Farthest' then - for i = size_table_turret, 1, -1 do - local pos = storage.map_forces[force_name].worm_turrets_positions[i] - local turret = surface.find_entity('small-worm-turret', { pos.x, pos.y }) - if turret == nil and player_nb_sp >= nb_sp_price then - local turrets = surface.find_entities_filtered { position = { pos.x, pos.y }, name = { 'medium-worm-turret', 'big-worm-turret', 'behemoth-worm-turret' } } - if #turrets == 0 then - local position = surface.find_non_colliding_position('big-worm-turret', { pos.x, pos.y }, 5, 1) - if not position then - position = { pos.x, pos.y } - end - surface.create_entity({ name = 'small-worm-turret', position = { position.x, position.y }, force = force_name }) - player.remove_item({ name = sp, count = nb_sp_price }) - return true - end - end - end - return false - elseif dist == 'Closest' then - for i = 1, size_table_turret, 1 do - local pos = storage.map_forces[force_name].worm_turrets_positions[i] - local turret = surface.find_entity('small-worm-turret', { pos.x, pos.y }) - if turret == nil and player_nb_sp >= nb_sp_price then - local turrets = surface.find_entities_filtered { position = { pos.x, pos.y }, name = { 'medium-worm-turret', 'big-worm-turret', 'behemoth-worm-turret' } } - if #turrets == 0 then - local position = surface.find_non_colliding_position('big-worm-turret', { pos.x, pos.y }, 5, 1) - if not position then - position = { pos.x, pos.y } - end - surface.create_entity({ name = 'small-worm-turret', position = { position.x, position.y }, force = force_name }) - player.remove_item({ name = sp, count = nb_sp_price }) - return true - end - end - end - return false - end -end - -function Public.upgrade_worm_turret(surface, force_name, dist, player, player_nb_sp, nb_sp_price, sp, tier) - local table_upgrade = { - ['medium-worm-turret'] = 'small-worm-turret', - ['big-worm-turret'] = 'medium-worm-turret', - ['behemoth-worm-turret'] = 'big-worm-turret' - } - local size_table_turret = #storage.map_forces[force_name].worm_turrets_positions - print(size_table_turret) - if dist == 'All' then - local player_sp_count = player_nb_sp - count = 0 - for k, pos in pairs(storage.map_forces[force_name].worm_turrets_positions) do - local turret = surface.find_entity(table_upgrade[tier], { pos.x, pos.y }) - if turret ~= nil and player_nb_sp >= nb_sp_price then - turret.destroy() - local position = surface.find_non_colliding_position('big-worm-turret', { pos.x, pos.y }, 5, 1) - if not position then - position = { pos.x, pos.y } - end - surface.create_entity({ name = tier, position = { position.x, position.y }, force = force_name }) - player.remove_item({ name = sp, count = nb_sp_price }) - player_sp_count = player_sp_count - nb_sp_price - count = count + 1 - else - end - end - if count == 0 then - return false - else - return true - end - elseif dist == 'Farthest' then - for i = #storage.map_forces[force_name].worm_turrets_positions, 1, -1 do - local turret = - surface.find_entity(table_upgrade[tier], { storage.map_forces[force_name].worm_turrets_positions[i].x, storage.map_forces[force_name].worm_turrets_positions[i].y }) - if turret ~= nil and player_nb_sp >= nb_sp_price then - turret.destroy() - local position = - surface.find_non_colliding_position( - 'big-worm-turret', - { storage.map_forces[force_name].worm_turrets_positions[i].x, storage.map_forces[force_name].worm_turrets_positions[i].y }, - 5, - 1 - ) - if not position then - position = { pos.x, pos.y } - end - surface.create_entity({ name = tier, position = { position.x, position.y }, force = force_name }) - player.remove_item({ name = sp, count = nb_sp_price }) - return true - else - end - end - return false - elseif dist == 'Closest' then - for k, pos in pairs(storage.map_forces[force_name].worm_turrets_positions) do - local turret = surface.find_entity(table_upgrade[tier], { pos.x, pos.y }) - if turret ~= nil and player_nb_sp >= nb_sp_price then - turret.destroy() - local position = surface.find_non_colliding_position('big-worm-turret', { pos.x, pos.y }, 5, 1) - if not position then - position = { pos.x, pos.y } - end - surface.create_entity({ name = tier, position = { position.x, position.y }, force = force_name }) - player.remove_item({ name = sp, count = nb_sp_price }) - return true - else - end - end - return false - end -end - -function Public.buy_extra_life(force_name) - local force_index = game.forces[force_name].index - storage.biter_reanimator.forces[force_index] = storage.biter_reanimator.forces[force_index] + 1 -end - -return Public diff --git a/maps/native_war/team_manager.lua b/maps/native_war/team_manager.lua deleted file mode 100644 index a03db9d32..000000000 --- a/maps/native_war/team_manager.lua +++ /dev/null @@ -1,843 +0,0 @@ ---luacheck: ignore -local Public = {} - -local wait_messages = { - 'please get comfy.', - 'get comfy!!', - 'go and grab a drink.', - 'take a short healthy break.', - 'go and stretch your legs.', - 'please pet the cat.', - 'time to get a bowl of snacks :3', - 'send love to Mewmew' -} -local forces = { - { name = 'west', color = { r = 1, g = 1, b = 255 } }, - { name = 'spectator', color = { r = 111, g = 111, b = 111 } }, - { name = 'east', color = { r = 255, g = 1, b = 1 } } -} -local gui_values = { - ['west'] = { - force = 'west', - c1 = 'west', - c2 = 'JOIN ', - n1 = 'join_west_button', - color1 = { r = 1, g = 1, b = 255 }, - color2 = { r = 0.66, g = 0.66, b = 0.99 } - }, --tech_spy = "spy-north-tech", prod_spy = "spy-north-prod" - ['east'] = { - force = 'east', - c1 = 'east', - c2 = 'JOIN ', - n1 = 'join_east_button', - color1 = { r = 255, g = 1, b = 1 }, - color2 = { r = 0.99, g = 0.44, b = 0.44 } - } --tech_spy = "spy-north-tech", prod_spy = "spy-north-prod" -} - -starting_items = { ['iron-plate'] = 32, ['iron-gear-wheel'] = 16, ['stone'] = 25 } - -local function get_player_array(force_name) - local a = {} - for _, p in pairs(game.forces[force_name].connected_players) do - a[#a + 1] = p.name - end - return a -end - -local function freeze_players() - if not storage.freeze_players then - return - end - storage.team_manager_default_permissions = {} - local p = game.permissions.get_group('Default') - for action_name, _ in pairs(defines.input_action) do - storage.team_manager_default_permissions[action_name] = p.allows_action(defines.input_action[action_name]) - p.set_allows_action(defines.input_action[action_name], false) - end - local defs = { - defines.input_action.write_to_console, - defines.input_action.gui_click, - defines.input_action.gui_selection_state_changed, - defines.input_action.gui_checked_state_changed, - defines.input_action.gui_elem_changed, - defines.input_action.gui_text_changed, - defines.input_action.gui_value_changed, - defines.input_action.edit_permission_group - } - for _, d in pairs(defs) do - p.set_allows_action(d, true) - end -end - -local function unfreeze_players() - local p = game.permissions.get_group('Default') - for action_name, _ in pairs(defines.input_action) do - if storage.team_manager_default_permissions[action_name] then - p.set_allows_action(defines.input_action[action_name], true) - end - end -end - -local function leave_corpse(player) - if not player.character then - return - end - - local inventories = { - player.get_inventory(defines.inventory.character_main), - player.get_inventory(defines.inventory.character_guns), - player.get_inventory(defines.inventory.character_ammo), - player.get_inventory(defines.inventory.character_armor), - player.get_inventory(defines.inventory.character_vehicle), - player.get_inventory(defines.inventory.character_trash) - } - - local corpse = false - for _, i in pairs(inventories) do - for index = 1, #i, 1 do - if not i[index].valid then - break - end - corpse = true - break - end - if corpse then - player.character.die() - break - end - end - - if player.character then - player.character.destroy() - end - player.character = nil - player.set_controller({ type = defines.controllers.god }) - player.create_character() -end - -local function switch_force(player_name, force_name) - if not game.players[player_name] then - game.print('Team Manager >> Player ' .. player_name .. ' does not exist.', { r = 0.98, g = 0.66, b = 0.22 }) - return - end - if not game.forces[force_name] then - game.print('Team Manager >> Force ' .. force_name .. ' does not exist.', { r = 0.98, g = 0.66, b = 0.22 }) - return - end - - local player = game.players[player_name] - player.force = game.forces[force_name] - - game.print(player_name .. ' has been switched into team ' .. force_name .. '.', { r = 0.98, g = 0.66, b = 0.22 }) - - leave_corpse(player) - - storage.chosen_team[player_name] = nil - if force_name == 'spectator' then - spectate(player, true) - else - join_team(player, force_name, true) - end -end - -local function create_first_join_gui(player) - if not storage.game_lobby_timeout then - storage.game_lobby_timeout = 10 - end --[[5999940]] - if storage.game_lobby_timeout - game.tick < 0 then - storage.game_lobby_active = false - end - local frame = player.gui.left.add { type = 'frame', name = 'nv_main_gui', direction = 'vertical' } - local b = frame.add { type = 'label', caption = 'Defend your Market!' } - b.style.font = 'heading-1' - b.style.font_color = { r = 0.98, g = 0.66, b = 0.22 } - local b = frame.add { type = 'label', caption = 'Feed the market with science to send native waves!' } - b.style.font = 'heading-2' - b.style.font_color = { r = 0.98, g = 0.66, b = 0.22 } - frame.add { type = 'label', caption = '-----------------------------------------------------------' } - for _, gui_value in pairs(gui_values) do - local t = frame.add { type = 'table', column_count = 3 } - local c = gui_value.c1 - --if storage.tm_custom_name[gui_value.force] then c = storage.tm_custom_name[gui_value.force] end - local l = t.add { type = 'label', caption = c } - l.style.font = 'heading-2' - l.style.font_color = gui_value.color1 - l.style.single_line = false - l.style.maximal_width = 290 - local l = t.add { type = 'label', caption = ' - ' } - local c = #game.forces[gui_value.force].connected_players .. ' Player' - if #game.forces[gui_value.force].connected_players >= 1 then - c = c .. 's' - end - local l = t.add { type = 'label', caption = c } - l.style.font_color = { r = 0.22, g = 0.88, b = 0.22 } - local c = gui_value.c2 - local font_color = gui_value.color1 - if storage.game_lobby_active then - font_color = { r = 0.7, g = 0.7, b = 0.7 } - c = c .. ' (waiting for players... ' - c = c .. math.ceil((storage.game_lobby_timeout - game.tick) / 60) - c = c .. ')' - end - local t = frame.add { type = 'table', column_count = 4 } - for _, p in pairs(game.forces[gui_value.force].connected_players) do - local l = t.add({ type = 'label', caption = p.name }) - l.style.font_color = { r = p.color.r * 0.6 + 0.4, g = p.color.g * 0.6 + 0.4, b = p.color.b * 0.6 + 0.4, a = 1 } - l.style.font = 'heading-2' - end - local b = frame.add { type = 'sprite-button', name = gui_value.n1, caption = c } - b.style.font = 'default-large-bold' - b.style.font_color = font_color - b.style.minimal_width = 350 - frame.add { type = 'label', caption = '-----------------------------------------------------------' } - end -end - -local function create_main_gui(player) - local is_spec = player.force.name == 'spectator' - if player.gui.left['nv_main_gui'] then - player.gui.left['nv_main_gui'].destroy() - end - --if storage.bb_game_won_by_team then return end - if not storage.chosen_team[player.name] then - if not storage.tournament_mode then - create_first_join_gui(player) - return - end - end - local frame = player.gui.left.add { type = 'frame', name = 'nv_main_gui', direction = 'vertical' } - -- Science sending GUI - local first_team = true - for _, gui_value in pairs(gui_values) do - -- Line separator - if not first_team then - frame.add { type = 'line', caption = 'this line', direction = 'horizontal' } - else - first_team = false - end - -- Team name & Player count - local t = frame.add { type = 'table', column_count = 3 } - -- Team name - local c = gui_value.c1 - --if storage.tm_custom_name[gui_value.force] then c = storage.tm_custom_name[gui_value.force] end - local l = t.add { type = 'label', caption = c } - l.style.font = 'default-bold' - l.style.font_color = gui_value.color1 - l.style.single_line = false - --l.style.minimal_width = 100 - l.style.maximal_width = 102 - -- Number of players - local l = t.add { type = 'label', caption = ' - ' } - local c = #game.forces[gui_value.force].connected_players .. ' Player' - if #game.forces[gui_value.force].connected_players >= 1 then - c = c .. 's' - end - local l = t.add { type = 'label', caption = c } - l.style.font = 'default' - l.style.font_color = { r = 0.22, g = 0.88, b = 0.22 } - -- Player list - local t = frame.add { type = 'table', column_count = 4 } - for _, p in pairs(game.forces[gui_value.force].connected_players) do - local l = t.add { type = 'label', caption = p.name } - l.style.font_color = { r = p.color.r * 0.6 + 0.4, g = p.color.g * 0.6 + 0.4, b = p.color.b * 0.6 + 0.4, a = 1 } - end - - -- Statistics - --local t = frame.add { type = "table", name = "stats_" .. gui_value.force, column_count = 6 } - -- Tech button - -- if is_spec then - -- add_tech_button(t, gui_value) - -- add_prod_button(t, gui_value) - --end - end - -- Action frame - local t = frame.add { type = 'table', column_count = 2 } - -- Spectate / Rejoin team - if is_spec then - local b = t.add { type = 'sprite-button', name = 'nv_leave_spectate', caption = 'Join Team' } - else - local b = t.add { type = 'sprite-button', name = 'nv_spectate', caption = 'Spectate' } - end - -- Playerlist button - local b_width = is_spec and 97 or 86 - -- 111 when prod_spy button will be there - for _, b in pairs(t.children) do - b.style.font = 'default-bold' - b.style.font_color = { r = 0.98, g = 0.66, b = 0.22 } - b.style.top_padding = 1 - b.style.left_padding = 1 - b.style.right_padding = 1 - b.style.bottom_padding = 1 - b.style.maximal_height = 30 - b.style.width = b_width - end -end - -function Public.refresh() - for _, player in pairs(game.connected_players) do - if player.gui.left['nv_main_gui'] then - create_main_gui(player) - end - end -end - -function join_team(player, force_name, forced_join) - if not player.character then - return - end - if not forced_join then - if storage.tournament_mode then - player.print('The game is set to tournament mode. Teams can only be changed via team manager.', { r = 0.98, g = 0.66, b = 0.22 }) - return - end - end - if not force_name then - return - end - local surface = player.surface - - local enemy_team = 'west' - if force_name == 'west' then - enemy_team = 'east' - end - - if not storage.training_mode and storage.nv_settings.team_balancing then - if not forced_join then - if #game.forces[force_name].connected_players > #game.forces[enemy_team].connected_players then - if not storage.chosen_team[player.name] then - player.print('Team ' .. force_name .. ' has too many players currently.', { r = 0.98, g = 0.66, b = 0.22 }) - return - end - end - end - end - - if storage.chosen_team[player.name] then - if not forced_join then - if game.tick - storage.spectator_rejoin_delay[player.name] < 7200 then - player.print( - 'Not ready to return to your team yet. Please wait ' .. 120 - (math.floor((game.tick - storage.spectator_rejoin_delay[player.name]) / 60)) .. ' seconds.', - { r = 0.98, g = 0.66, b = 0.22 } - ) - return - end - end - local p = surface.find_non_colliding_position('character', game.forces[force_name].get_spawn_position(surface), 8, 1) - player.teleport(p, surface) - player.force = game.forces[force_name] - player.character.destructible = true - Public.refresh() - game.permissions.get_group('Default').add_player(player) - local msg = table.concat({ 'Team ', player.force.name, ' player ', player.name, ' is no longer spectating.' }) - game.print(msg, { r = 0.98, g = 0.66, b = 0.22 }) - --Server.to_discord_bold(msg) - player.spectator = false - return - end - local pos = surface.find_non_colliding_position('character', game.forces[force_name].get_spawn_position(surface), 8, 1) - if not pos then - pos = game.forces[force_name].get_spawn_position(surface) - end - player.teleport(pos) - player.force = game.forces[force_name] - player.character.destructible = true - game.permissions.get_group('Default').add_player(player) - if not forced_join then - local c = player.force.name - --if storage.tm_custom_name[player.force.name] then c = storage.tm_custom_name[player.force.name] end - local message = table.concat({ player.name, ' has joined team ', c, '!' }) - game.print(message, { r = 0.98, g = 0.66, b = 0.22 }) - --Server.to_discord_bold(message) - end - local i = player.get_inventory(defines.inventory.character_main) - i.clear() - for item, amount in pairs(starting_items) do - player.insert({ name = item, count = amount }) - end - storage.chosen_team[player.name] = force_name - player.spectator = false - Public.refresh() -end - -function spectate(player, forced_join) - if not player.character then - return - end - if not forced_join then - if storage.tournament_mode then - player.print('The game is set to tournament mode. Teams can only be changed via team manager.', { r = 0.98, g = 0.66, b = 0.22 }) - return - end - end - player.teleport(player.surface.find_non_colliding_position('character', { 0, -190 }, 4, 1)) - player.force = game.forces.spectator - player.character.destructible = false - if not forced_join then - local msg = player.name .. ' is spectating.' - game.print(msg, { r = 0.98, g = 0.66, b = 0.22 }) - --Server.to_discord_bold(msg) - end - game.permissions.get_group('spectator').add_player(player) - storage.spectator_rejoin_delay[player.name] = game.tick - create_main_gui(player) - player.spectator = true -end - -function Public.draw_top_toggle_button(player) - if player.gui.top['team_manager_toggle_button'] then - player.gui.top['team_manager_toggle_button'].destroy() - end - local button = player.gui.top.add({ type = 'sprite-button', name = 'team_manager_toggle_button', caption = 'Team Manager', tooltip = tooltip }) - button.style.font = 'heading-2' - button.style.font_color = { r = 0.88, g = 0.55, b = 0.11 } - button.style.minimal_height = 38 - button.style.minimal_width = 120 - button.style.top_padding = 2 - button.style.left_padding = 0 - button.style.right_padding = 0 - button.style.bottom_padding = 2 -end - -local function draw_manager_gui(player) - if player.gui.center['team_manager_gui'] then - player.gui.center['team_manager_gui'].destroy() - end - - local frame = player.gui.center.add({ type = 'frame', name = 'team_manager_gui', caption = 'Manage Teams', direction = 'vertical' }) - - local t = frame.add({ type = 'table', name = 'team_manager_root_table', column_count = 5 }) - - local i2 = 1 - for i = 1, #forces * 2 - 1, 1 do - if i % 2 == 1 then - local l = t.add({ type = 'sprite-button', caption = string.upper(forces[i2].name), name = forces[i2].name }) - l.style.minimal_width = 160 - l.style.maximal_width = 160 - l.style.font_color = forces[i2].color - l.style.font = 'heading-1' - i2 = i2 + 1 - else - local tt = t.add({ type = 'label', caption = ' ' }) - end - end - - local i2 = 1 - for i = 1, #forces * 2 - 1, 1 do - if i % 2 == 1 then - local list_box = t.add({ type = 'list-box', name = 'team_manager_list_box_' .. i2, items = get_player_array(forces[i2].name) }) - list_box.style.minimal_height = 360 - list_box.style.minimal_width = 160 - list_box.style.maximal_height = 480 - i2 = i2 + 1 - else - local tt = t.add({ type = 'table', column_count = 1 }) - local b = tt.add({ type = 'sprite-button', name = i2 - 1, caption = '→' }) - b.style.font = 'heading-1' - b.style.maximal_height = 38 - b.style.maximal_width = 38 - local b = tt.add({ type = 'sprite-button', name = i2, caption = '←' }) - b.style.font = 'heading-1' - b.style.maximal_height = 38 - b.style.maximal_width = 38 - end - end - - frame.add({ type = 'label', caption = '' }) - - local t = frame.add({ type = 'table', name = 'team_manager_bottom_buttons', column_count = 4 }) - local button = - t.add( - { - type = 'button', - name = 'team_manager_close', - caption = 'Close', - tooltip = 'Close this window.' - } - ) - button.style.font = 'heading-2' - - if storage.tournament_mode then - button = - t.add( - { - type = 'button', - name = 'team_manager_activate_tournament', - caption = 'Tournament Mode Enabled', - tooltip = 'Only admins can move players and vote for difficulty.\nActive players can no longer go spectate.\nNew joining players are spectators.' - } - ) - button.style.font_color = { r = 222, g = 22, b = 22 } - else - button = - t.add( - { - type = 'button', - name = 'team_manager_activate_tournament', - caption = 'Tournament Mode Disabled', - tooltip = 'Only admins can move players. Active players can no longer go spectate. New joining players are spectators.' - } - ) - button.style.font_color = { r = 55, g = 55, b = 55 } - end - button.style.font = 'heading-2' - - if storage.freeze_players then - button = - t.add( - { - type = 'button', - name = 'team_manager_freeze_players', - caption = 'Unfreeze Players', - tooltip = 'Releases all players.' - } - ) - button.style.font_color = { r = 222, g = 22, b = 22 } - else - button = - t.add( - { - type = 'button', - name = 'team_manager_freeze_players', - caption = 'Freeze Players', - tooltip = 'Freezes all players, unable to perform actions, until released.' - } - ) - button.style.font_color = { r = 55, g = 55, b = 222 } - end - button.style.font = 'heading-2' - - if storage.training_mode then - button = - t.add( - { - type = 'button', - name = 'team_manager_activate_training', - caption = 'Training Mode Activated', - tooltip = "Feed your own team's biters and only teams with players gain threat & evo." - } - ) - button.style.font_color = { r = 222, g = 22, b = 22 } - else - button = - t.add( - { - type = 'button', - name = 'team_manager_activate_training', - caption = 'Training Mode Disabled', - tooltip = "Feed your own team's biters and only teams with players gain threat & evo." - } - ) - button.style.font_color = { r = 55, g = 55, b = 55 } - end - button.style.font = 'heading-2' -end - -local function set_custom_team_name(force_name, team_name) - if team_name == '' then - storage.tm_custom_name[force_name] = nil - return - end - if not team_name then - storage.tm_custom_name[force_name] = nil - return - end - storage.tm_custom_name[force_name] = tostring(team_name) -end - -local function custom_team_name_gui(player, force_name) - if player.gui.center['custom_team_name_gui'] then - player.gui.center['custom_team_name_gui'].destroy() - return - end - local frame = player.gui.center.add({ type = 'frame', name = 'custom_team_name_gui', caption = 'Set custom team name:', direction = 'vertical' }) - local text = force_name - if storage.tm_custom_name[force_name] then - text = storage.tm_custom_name[force_name] - end - - local textfield = frame.add({ type = 'textfield', name = force_name, text = text }) - local t = frame.add({ type = 'table', column_count = 2 }) - local button = - t.add( - { - type = 'button', - name = 'custom_team_name_gui_set', - caption = 'Set', - tooltip = 'Set custom team name.' - } - ) - button.style.font = 'heading-2' - - local button = - t.add( - { - type = 'button', - name = 'custom_team_name_gui_close', - caption = 'Close', - tooltip = 'Close this window.' - } - ) - button.style.font = 'heading-2' -end - -local function team_manager_gui_click(event) - local player = game.players[event.player_index] - local name = event.element.name - - if game.forces[name] then - if not player.admin then - player.print('Only admins can change team names.', { r = 175, g = 0, b = 0 }) - return - end - custom_team_name_gui(player, name) - player.gui.center['team_manager_gui'].destroy() - return - end - - if name == 'team_manager_close' then - player.gui.center['team_manager_gui'].destroy() - return - end - - if name == 'team_manager_activate_tournament' then - if not player.admin then - player.print('Only admins can switch tournament mode.', { r = 175, g = 0, b = 0 }) - return - end - if storage.tournament_mode then - storage.tournament_mode = false - draw_manager_gui(player) - game.print('>>> Tournament Mode has been disabled.', { r = 111, g = 111, b = 111 }) - return - end - storage.tournament_mode = true - draw_manager_gui(player) - game.print('>>> Tournament Mode has been enabled!', { r = 225, g = 0, b = 0 }) - return - end - - if name == 'team_manager_freeze_players' then - if storage.freeze_players then - if not player.admin then - player.print('Only admins can unfreeze players.', { r = 175, g = 0, b = 0 }) - return - end - storage.freeze_players = false - draw_manager_gui(player) - game.print('>>> Players have been unfrozen!', { r = 255, g = 77, b = 77 }) - unfreeze_players() - return - end - if not player.admin then - player.print('Only admins can freeze players.', { r = 175, g = 0, b = 0 }) - return - end - storage.freeze_players = true - draw_manager_gui(player) - game.print('>>> Players have been frozen!', { r = 111, g = 111, b = 255 }) - freeze_players() - return - end - - if name == 'team_manager_activate_training' then - if not player.admin then - player.print('Only admins can switch training mode.', { r = 175, g = 0, b = 0 }) - return - end - if storage.training_mode then - storage.training_mode = false - storage.game_lobby_active = true - draw_manager_gui(player) - game.print('>>> Training Mode has been disabled.', { r = 111, g = 111, b = 111 }) - return - end - storage.training_mode = true - storage.game_lobby_active = false - draw_manager_gui(player) - game.print('>>> Training Mode has been enabled!', { r = 225, g = 0, b = 0 }) - return - end - - if not event.element.parent then - return - end - local element = event.element.parent - if not element.parent then - return - end - local element = element.parent - if element.name ~= 'team_manager_root_table' then - return - end - if not player.admin then - player.print('Only admins can manage teams.', { r = 175, g = 0, b = 0 }) - return - end - - local listbox = player.gui.center['team_manager_gui']['team_manager_root_table']['team_manager_list_box_' .. tonumber(name)] - local selected_index = listbox.selected_index - if selected_index == 0 then - player.print('No player selected.', { r = 175, g = 0, b = 0 }) - return - end - local player_name = listbox.items[selected_index] - - local m = -1 - if event.element.caption == '→' then - m = 1 - end - local force_name = forces[tonumber(name) + m].name - - switch_force(player_name, force_name) - draw_manager_gui(player) -end - -local function create_sprite_button(player) - if player.gui.top['nv_toggle_button'] then - return - end - local button = player.gui.top.add({ type = 'sprite-button', name = 'nv_toggle_button', sprite = 'item/splitter' }) - button.style.font = 'default-bold' - button.style.minimal_height = 38 - button.style.minimal_width = 38 - button.style.top_padding = 2 - button.style.left_padding = 4 - button.style.right_padding = 4 - button.style.bottom_padding = 2 -end - -local function join_gui_click(name, player) - local team = { - ['join_west_button'] = 'west', - ['join_east_button'] = 'east' - } - - if not team[name] then - return - end - - if storage.game_lobby_active then - if player.admin then - join_team(player, team[name]) - game.print('Lobby disabled, admin override.', { r = 0.98, g = 0.66, b = 0.22 }) - storage.game_lobby_active = false - return - end - player.print('Waiting for more players, ' .. wait_messages[math_random(1, #wait_messages)], { r = 0.98, g = 0.66, b = 0.22 }) - return - end - join_team(player, team[name]) -end - -function Public.gui_click(event) - if not event.element then - return - end - if not event.element.valid then - return - end - local player = game.players[event.player_index] - local name = event.element.name - - if name == 'team_manager_toggle_button' then - if player.gui.center['team_manager_gui'] then - player.gui.center['team_manager_gui'].destroy() - return - end - draw_manager_gui(player) - return - end - if player.gui.center['team_manager_gui'] then - team_manager_gui_click(event) - end - - --[[if player.gui.center["custom_team_name_gui"] then - if name == "custom_team_name_gui_set" then - local custom_name = player.gui.center["custom_team_name_gui"].children[1].text - local force_name = player.gui.center["custom_team_name_gui"].children[1].name - set_custom_team_name(force_name, custom_name) - player.gui.center["custom_team_name_gui"].destroy() - draw_manager_gui(player) - return - end - if name == "custom_team_name_gui_close" then - player.gui.center["custom_team_name_gui"].destroy() - draw_manager_gui(player) - return - end - end]] -end - -local function on_gui_click(event) - if not event.element then - return - end - if not event.element.valid then - return - end - local player = game.players[event.player_index] - local name = event.element.name - if name == 'nv_toggle_button' then - if player.gui.left['nv_main_gui'] then - player.gui.left['nv_main_gui'].destroy() - else - create_main_gui(player) - end - return - end - if name == 'join_west_button' then - join_gui_click(name, player) - return - end - if name == 'join_east_button' then - join_gui_click(name, player) - return - end - if name == 'nv_leave_spectate' then - join_team(player, storage.chosen_team[player.name]) - end - if name == 'nv_spectate' then - spectate(player) - return - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - - --if not storage.bb_view_players then storage.bb_view_players = {} end - if not storage.chosen_team then - storage.chosen_team = {} - end - - --storage.bb_view_players[player.name] = false - - if #game.connected_players > 1 then - --storage.game_lobby_timeout = math.ceil(36000 / #game.connected_players) - storage.game_lobby_timeout = math.ceil(1 / #game.connected_players) --EVL - else - --storage.game_lobby_timeout = 599940 - storage.game_lobby_timeout = 1 --EVL - end - - if not storage.chosen_team[player.name] then - if storage.tournament_mode then - player.force = game.forces.spectator - else - player.force = game.forces.player - end - end - create_sprite_button(player) - - create_main_gui(player) -end - -function Public.init() - storage.tm_custom_name = {} -end - -local event = require 'utils.event' -event.add(defines.events.on_gui_click, on_gui_click) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -return Public diff --git a/maps/native_war/terrain.lua b/maps/native_war/terrain.lua deleted file mode 100644 index 019cc6d48..000000000 --- a/maps/native_war/terrain.lua +++ /dev/null @@ -1,758 +0,0 @@ ---luacheck: ignore -local math_abs = math.abs -local math_random = math.random -local Map_functions = require 'utils.tools.map_functions' -local simplex_noise = require 'utils.math.simplex_noise'.d2 -local Public = {} - -local hatchery_position = { x = 200, y = 0 } -local table_tiles = { - [1] = 'concrete', - [2] = 'refined-concrete', - [3] = 'stone-path' -} -local function get_replacement_tile(surface, position) - for i = 1, 128, 1 do - local vectors = { { 0, i }, { 0, i * -1 }, { i, 0 }, { i * -1, 0 } } - table.shuffle_table(vectors) - for k, v in pairs(vectors) do - local tile = surface.get_tile(position.x + v[1], position.y + v[2]) - if not tile.collides_with('resource') then - return tile.name - end - end - end - return 'grass-1' -end - -local function place_market(surface, position, team_force) - local market = surface.create_entity({ name = 'market', position = position, force = team_force }) - market.minable = false - return market -end - -local function kill_entities_combat_zone(surface, table_area) - for _, ent in pairs(surface.find_entities_filtered { area = table_area, type = 'resource' }) do - ent.destroy() - end - for _, entity in ipairs(surface.find_entities_filtered { area = table_area, type = 'tree' }) do - entity.destroy() - end -end - -local function create_markets(surface) - local wall = surface.create_entity({ name = 'stone-wall', position = { -15, -174 }, force = 'spectator' }) - wall.destructible = false - wall.minable = false - local wall = surface.create_entity({ name = 'stone-wall', position = { 15, -174 }, force = 'spectator' }) - wall.destructible = false - wall.minable = false - local wall = surface.create_entity({ name = 'stone-wall', position = { -15, 174 }, force = 'spectator' }) - wall.destructible = false - wall.minable = false - local wall = surface.create_entity({ name = 'stone-wall', position = { 15, 174 }, force = 'spectator' }) - wall.destructible = false - wall.minable = false - surface.create_entity({ name = 'electric-beam', position = { -15, -174 }, source = { -15, -174 }, target = { 15, -174 } }) - surface.create_entity({ name = 'electric-beam', position = { -15, 174 }, source = { -15, 174 }, target = { 15, 174 } }) - local x = hatchery_position.x - local y = hatchery_position.y - for i = 169, 200, 1 do - for j = 1, 100, 1 do - if math.sqrt((i * -1 + 160) * (i * -1 + 160) + (j - 50) * (j - 50)) >= 38 and math.sqrt((i * -1 + 160) * (i * -1 + 160) + (j - 50) * (j - 50)) <= 40 then - if j == 50 or j == 49 or j == 51 then - else - local wall = surface.create_entity({ name = 'stone-wall', position = { i * -1, j - 50 }, force = 'west' }) - wall.destructible = false - wall.minable = false - end - end - end - end - for i = 169, 200, 1 do - for j = 1, 100, 1 do - if math.sqrt((i - 160) * (i - 160) + (j - 50) * (j - 50)) >= 38 and math.sqrt((i - 160) * (i - 160) + (j - 50) * (j - 50)) <= 40 then - if j == 50 or j == 49 or j == 51 then - else - local wall = surface.create_entity({ name = 'stone-wall', position = { i, j - 50 }, force = 'east' }) - wall.destructible = false - wall.minable = false - end - end - end - end - local position = { (x * -1) + 2, 0 } - local e = place_market(surface, position, 'west') - storage.market1 = e - - local energy_source = { type = 'electric', buffer_capacity = '10GJ', usage_priority = 'tertiary', input_flow_limit = '1GW', output_flow_limit = '0W', drain = '0W' } - local eei = surface.create_entity({ type = 'electric-energy-interface', name = 'electric-energy-interface', energy_source = energy_source, position = { -200, -2 }, force = 'west' }) - local ep = surface.create_entity({ name = 'small-electric-pole', position = { -200, -5 }, force = 'west' }) - - ep.destructible = false - ep.minable = false - eei.operable = false - eei.destructible = false - eei.minable = false - eei.electric_buffer_size = 100000000 - eei.power_usage = 48000000 - eei.power_production = 1 - - --surface.create_entity({name = "small-worm-turret", position = {x * -1 + 6, 0}, force = "west"}) - - storage.map_forces.west.hatchery = e - storage.map_forces.east.target = e - - local position = { x - 2, 0 } - local f = place_market(surface, position, 'east') - storage.market = f - - local energy_source = { type = 'electric', buffer_capacity = '10GJ', usage_priority = 'tertiary', input_flow_limit = '1GW', output_flow_limit = '0W', drain = '0W' } - local eei2 = surface.create_entity({ type = 'electric-energy-interface', name = 'electric-energy-interface', energy_source = energy_source, position = { 201, -2 }, force = 'east' }) - local ep2 = surface.create_entity({ name = 'small-electric-pole', position = { 200, -5 }, force = 'east' }) - - ep2.destructible = false - ep2.minable = false - eei2.operable = false - eei2.destructible = false - eei2.minable = false - eei2.electric_buffer_size = 100000000 - eei2.power_usage = 48000000 - eei2.power_production = 1 - --surface.create_entity({name = "small-worm-turret", position = {x - 6, 0}, force = "east"}) - storage.map_forces.east.hatchery = f - storage.map_forces.west.target = f - - --storage.map_forces.east.spawn = {x=137,y=0} - --storage.map_forces.west.spawn = {x=-137,y=0} - - local area = { { -174, -150 }, { 174, 150 } } - kill_entities_combat_zone(surface, area) - - local te = surface.create_entity({ name = 'tree-09-red', position = { 137, 0 }, force = 'neutral' }) - local tw = surface.create_entity({ name = 'tree-04', position = { -137, 0 }, force = 'neutral' }) - te.minable = false - tw.minable = false - te.destructible = false - tw.destructible = false -end - -local function draw_noise_ore_patch(position, name, surface, radius, richness) - if not position then - return - end - if not name then - return - end - if not surface then - return - end - if not radius then - return - end - if not richness then - return - end - local seed = game.surfaces[1].map_gen_settings.seed - local noise_seed_add = 25000 - local richness_part = richness / radius - for y = radius * -3, radius * 3, 1 do - for x = radius * -3, radius * 3, 1 do - local pos = { x = x + position.x + 0.5, y = y + position.y + 0.5 } - local noise_1 = simplex_noise(pos.x * 0.0125, pos.y * 0.0125, seed) - local noise_2 = simplex_noise(pos.x * 0.1, pos.y * 0.1, seed + 25000) - local noise = noise_1 + noise_2 * 0.12 - local distance_to_center = math.sqrt(x ^ 2 + y ^ 2) - local a = richness - richness_part * distance_to_center - if distance_to_center < radius - math.abs(noise * radius * 0.85) and a > 1 then - if surface.can_place_entity({ name = name, position = pos, amount = a }) then - surface.create_entity { name = name, position = pos, amount = a } - - local mirror_pos = { x = pos.x * -1, y = pos.y } - surface.create_entity { name = name, position = mirror_pos, amount = a } - - for _, e in pairs(surface.find_entities_filtered({ position = pos, name = { 'wooden-chest', 'gun-turret' } })) do - e.destroy() - end - for _, e in pairs(surface.find_entities_filtered({ position = mirror_pos, name = { 'wooden-chest', 'gun-turret' } })) do - e.destroy() - end - end - end - end - end -end - -local function first_ore_generate(surface) - local area = { { 250, -50 }, { 300, 50 } } - local ores = {} - ores['iron-ore'] = surface.count_entities_filtered({ name = 'iron-ore', area = area }) - ores['copper-ore'] = surface.count_entities_filtered({ name = 'copper-ore', area = area }) - ores['coal'] = surface.count_entities_filtered({ name = 'coal', area = area }) - ores['stone'] = surface.count_entities_filtered({ name = 'stone', area = area }) - for ore, ore_count in pairs(ores) do - if ore_count < 1000 or ore_count == nil then - local pos = {} - for a = 1, 32, 1 do - pos = { x = math_random(250, 300), y = math_random(-50, 50) } - if surface.can_place_entity({ name = 'coal', position = pos, amount = 1 }) then - break - end - end - draw_noise_ore_patch(pos, ore, surface, math_random(18, 24), math_random(1500, 2000)) - end - end -end - -local function mirror_chunk(event, source_surface, x_modifier) - local surface = event.surface - local left_top = event.area.left_top - local offset = 0 - if x_modifier == -1 then - offset = 32 - end - local mirror_left_top = { x = left_top.x * x_modifier - offset, y = left_top.y } - - source_surface.request_to_generate_chunks(mirror_left_top, 1) - source_surface.force_generate_chunk_requests() - - local mirror_area = { { mirror_left_top.x, mirror_left_top.y }, { mirror_left_top.x + 32, mirror_left_top.y + 32 } } - - for _, tile in pairs(source_surface.find_tiles_filtered({ area = mirror_area })) do - surface.set_tiles({ { name = tile.name, position = { x = tile.position.x * x_modifier, y = tile.position.y } } }, true) - end - for _, entity in pairs(source_surface.find_entities_filtered({ area = mirror_area })) do - if surface.can_place_entity({ name = entity.name, position = { x = entity.position.x * x_modifier, y = entity.position.y } }) then - entity.clone({ position = { x = entity.position.x * x_modifier, y = entity.position.y }, surface = surface, force = 'neutral' }) - end - end - for _, decorative in pairs(source_surface.find_decoratives_filtered { area = mirror_area }) do - surface.create_decoratives { - check_collision = false, - decoratives = { { name = decorative.decorative.name, position = { x = decorative.position.x * x_modifier, y = decorative.position.y }, amount = decorative.amount } } - } - end -end - -local function combat_area(event) - local surface = event.surface - local left_top = event.area.left_top - - if left_top.y >= 15 then - return - end - if left_top.y < -15 then - return - end - - local replacement_tile = 'landfill' - local tile = surface.get_tile({ 8, 0 }) - if tile then - replacement_tile = tile.name - end - - for _, tile in pairs(surface.find_tiles_filtered({ area = event.area })) do - -- if tile.name == "water" or tile.name == "deepwater" then - -- surface.set_tiles({{name = replacement_tile, position = tile.position}}, true) - -- end - -- if tile.position.x >= -4 and tile.position.x < 4 then - -- surface.set_tiles({{name = "water-shallow", position = tile.position}}, true) - -- end - end - --[[ - for _, entity in pairs(surface.find_entities_filtered({type = {"resource", "cliff"}, area = event.area})) do - entity.destroy() - end - ]] -end - -local function is_out_of_map(p) - --if math.sqrt((p.x*p.x)+(p.y*p.y))<30 then return end - --if math.sqrt((p.x*p.x)+(p.y*p.y))<30 then return end - if math.sqrt((p.x + 90) * (p.x + 90) + (p.y + 100) * (p.y + 100)) < 15 then - return true - end - if math.sqrt((p.x + 90) * (p.x + 90) + (p.y + 100) * (p.y + 100)) < 45 and p.y <= -100 then - return - end - if math.sqrt((p.x - 30) * (p.x - 30) + (p.y + 100) * (p.y + 100)) < 15 then - return true - end - if math.sqrt((p.x - 30) * (p.x - 30) + (p.y + 100) * (p.y + 100)) < 45 and p.y <= -100 then - return - end - if math.sqrt((p.x - 90) * (p.x - 90) + (p.y - 100) * (p.y - 100)) < 15 then - return true - end - if math.sqrt((p.x - 90) * (p.x - 90) + (p.y - 100) * (p.y - 100)) < 45 and p.y >= 100 then - return - end - if math.sqrt((p.x + 30) * (p.x + 30) + (p.y - 100) * (p.y - 100)) < 15 then - return true - end - if math.sqrt((p.x + 30) * (p.x + 30) + (p.y - 100) * (p.y - 100)) < 45 and p.y >= 100 then - return - end - if math.sqrt((p.x + 135) * (p.x + 135) + (p.y) * (p.y)) < 30 and p.y >= 0 and p.x >= -135 then - return - end - if math.sqrt((p.x - 135) * (p.x - 135) + (p.y) * (p.y)) < 30 and p.y <= 0 and p.x <= 135 then - return - end - if p.x >= -15 and p.x <= 15 and (p.y <= 100 and p.y >= -100) then - return - end - if p.x >= -75 and p.x <= -45 and (p.y <= 100 and p.y >= -100) then - return - end - if p.x >= 45 and p.x <= 75 and (p.y <= 100 and p.y >= -100) then - return - end - if p.x >= -135 and p.x <= -105 and (p.y <= 0 and p.y >= -100) then - return - end - if p.x >= 105 and p.x <= 135 and (p.y <= 100 and p.y >= 0) then - return - end - if p.x > -105 and p.x <= -75 and (p.y >= -15 and p.y <= 15) then - return true - end - if p.x >= 75 and p.x < 105 and (p.y >= -15 and p.y <= 15) then - return true - end - if p.y < 30 and p.y >= -30 and p.x >= 135 then - return - end - if p.y < 30 and p.y >= -30 and p.x <= -135 then - return - end - if p.x * 0.5 >= math_abs(p.y) + 50 then - return - end - if p.x * -0.5 > math_abs(p.y) + 50 then - return - end - return true -end - -local function out_of_map_area(event) - local surface = event.surface - local left_top = event.area.left_top - - for x = -1, 32, 1 do - for y = -1, 32, 1 do - local p = { x = left_top.x + x, y = left_top.y + y } - if is_out_of_map(p) then - if - (p.x == -137 or p.x == -138 or p.x == -102 or p.x == -103 or p.x == -78 or p.x == -77 or p.x == -42 or p.x == -43 or p.x == -17 or p.x == -18 or p.x == 17 or p.x == 18 or p.x == 42 or p.x == 43 or p.x == 77 or p.x == 78) and - (p.y == -32 or p.y == -33 or p.y == -95 or p.y == -96) - then - surface.set_tiles({ { name = 'hazard-concrete-right', position = p } }, true) - if (p.x == -137 and p.y == -32) and surface.can_place_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -137 and p.y == -95) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -102 and p.y == -32) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -102 and p.y == -95) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -77 and p.y == -32) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -77 and p.y == -95) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -42 and p.y == -32) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -42 and p.y == -95) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -17 and p.y == -32) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -17 and p.y == -95) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 18 and p.y == -32) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 18 and p.y == -95) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 43 and p.y == -32) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 43 and p.y == -95) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 78 and p.y == -32) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 78 and p.y == -95) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - elseif - (p.x == 137 or p.x == 138 or p.x == 102 or p.x == 103 or p.x == 78 or p.x == 77 or p.x == 42 or p.x == 43 or p.x == 17 or p.x == 18 or p.x == -17 or p.x == -18 or p.x == -42 or p.x == -43 or p.x == -77 or p.x == -78) and - (p.y == 32 or p.y == 33 or p.y == 95 or p.y == 96) - then - surface.set_tiles({ { name = 'hazard-concrete-right', position = p } }, true) - if (p.x == 138 and p.y == 33) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 138 and p.y == 96) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 103 and p.y == 33) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 103 and p.y == 96) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 78 and p.y == 33) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 78 and p.y == 96) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 43 and p.y == 33) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 43 and p.y == 96) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 18 and p.y == 33) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == 18 and p.y == 96) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -17 and p.y == 33) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -17 and p.y == 96) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -42 and p.y == 33) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -42 and p.y == 96) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -77 and p.y == 33) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - if (p.x == -77 and p.y == 96) then - local e = surface.create_entity({ name = 'substation', position = { p.x, p.y }, force = 'neutral' }) - e.destructible = false - e.minable = false - end - else - surface.set_tiles({ { name = 'out-of-map', position = p } }, true) - end - else - if p.x >= -210 and p.x <= 210 then - local this_tile = surface.get_tile(p) - local replacement_tile = 'landfill' - if this_tile.name == 'water' or this_tile.name == 'deepwater' then - surface.set_tiles({ { name = replacement_tile, position = this_tile.position } }, true) - end - end - end - - if (p.x == -135 or p.x == 75) and (p.y >= -200 and p.y <= -175) then - local this_tile = surface.get_tile(p) - local replacement_tile = 'hazard-concrete-right' - surface.set_tiles({ { name = replacement_tile, position = this_tile.position } }, true) - end - if (p.x >= -135 and p.x <= 75) and (p.y == -200 or p.y == -175) then - local this_tile = surface.get_tile(p) - local replacement_tile = 'hazard-concrete-right' - surface.set_tiles({ { name = replacement_tile, position = this_tile.position } }, true) - end - if (p.x >= -15 and p.x <= 15) and p.y == -174 then - local this_tile = surface.get_tile(p) - local replacement_tile = 'hazard-concrete-right' - surface.set_tiles({ { name = replacement_tile, position = this_tile.position } }, true) - end - if p.x > -135 and p.x < 75 and p.y > -200 and p.y < -175 then - local this_tile = surface.get_tile(p) - local nb_rand = math.random(3) - local replacement_tile = table_tiles[nb_rand] - surface.set_tiles({ { name = replacement_tile, position = this_tile.position } }, true) - end - - if (p.x == -75 or p.x == 135) and (p.y <= 200 and p.y >= 175) then - local this_tile = surface.get_tile(p) - local replacement_tile = 'hazard-concrete-left' - surface.set_tiles({ { name = replacement_tile, position = this_tile.position } }, true) - end - if (p.x >= -75 and p.x <= 135) and (p.y == 200 or p.y == 175) then - local this_tile = surface.get_tile(p) - local replacement_tile = 'hazard-concrete-left' - surface.set_tiles({ { name = replacement_tile, position = this_tile.position } }, true) - end - if (p.x >= -15 and p.x <= 15) and p.y == 174 then - local this_tile = surface.get_tile(p) - local replacement_tile = 'hazard-concrete-left' - surface.set_tiles({ { name = replacement_tile, position = this_tile.position } }, true) - end - if p.x > -75 and p.x < 135 and p.y < 200 and p.y > 175 then - local this_tile = surface.get_tile(p) - local nb_rand = math.random(3) - local replacement_tile = table_tiles[nb_rand] - surface.set_tiles({ { name = replacement_tile, position = this_tile.position } }, true) - end - end - end -end - -local scrap_vectors = {} -for x = -5, 5, 1 do - for y = -5, 5, 1 do - if math.sqrt(x ^ 2 + y ^ 2) <= 5 then - scrap_vectors[#scrap_vectors + 1] = { x, y } - end - end -end - -local function generate_scrap(event) - local distance_to_center = math.sqrt(event.area.left_top.x ^ 2 + event.area.left_top.y ^ 2) - - local worms = event.surface.find_entities_filtered({ area = event.area, type = 'turret' }) - if #worms == 0 then - return - end - - for _, e in pairs(worms) do - if math_random(1, 2) == 1 then - for c = 1, math_random(2, 12), 1 do - local vector = scrap_vectors[math_random(1, #scrap_vectors)] - local position = { e.position.x + vector[1], e.position.y + vector[2] } - if e.surface.can_place_entity({ name = 'mineable-wreckage', position = position, force = 'neutral' }) then - e.surface.create_entity({ name = 'mineable-wreckage', position = position, force = 'neutral' }) - end - end - end - end -end - -local function on_chunk_generated(event) - local source_surface = game.surfaces['mirror_terrain'] - if not source_surface then - return - end - if not source_surface.valid then - return - end - if event.surface.index == source_surface.index then - return - end - local left_top = event.area.left_top - if left_top.x >= 0 then - mirror_chunk(event, source_surface, 1) - else - mirror_chunk(event, source_surface, -1) - end - - out_of_map_area(event) - - if left_top.x >= -150 and left_top.x < 150 then - combat_area(event) - end - if left_top.x == 256 and left_top.y == 256 then - create_markets(event.surface) - first_ore_generate(event.surface) - end - if left_top.x <= -500 and left_top.x >= -1500 then - local density = -0.003 * left_top.x - 0.5 - local floor_density = math.floor(density) - for i = 0, floor_density, 1 do - if math.random(100) <= 10 then - local rand_x = math.random(33) - 1 - local rand_y = math.random(33) - 1 - local pos = { x = left_top.x + rand_x, y = left_top.y + rand_y } - --local position = envent.surface.find_non_colliding_position("big-worm-turret", pos, 8, 1) - if pos.x * -0.5 > math_abs(pos.y) + 50 and event.surface.can_place_entity({ name = 'small-worm-turret', position = pos, force = 'east' }) then - event.surface.create_entity({ name = 'small-worm-turret', position = pos, force = 'east' }) - generate_scrap(event) - end - end - end - end - - if left_top.x <= -1500 and left_top.x >= -2500 then - local density = -0.003 * left_top.x - 2.5 - local floor_density = math.floor(density) - for i = 0, floor_density, 1 do - if math.random(100) <= 10 then - local rand_x = math.random(33) - 1 - local rand_y = math.random(33) - 1 - local pos = { x = left_top.x + rand_x, y = left_top.y + rand_y } - --local position = envent.surface.find_non_colliding_position("big-worm-turret", pos, 8, 1) - if pos.x * -0.5 > math_abs(pos.y) + 50 and event.surface.can_place_entity({ name = 'medium-worm-turret', position = pos, force = 'east' }) then - event.surface.create_entity({ name = 'medium-worm-turret', position = pos, force = 'east' }) - generate_scrap(event) - end - end - end - end - if left_top.x <= -2500 then - local density = -0.003 * left_top.x - 5.5 - local floor_density = math.floor(density) - if floor_density > 4 then - floor_density = 4 - end - for i = 0, floor_density, 1 do - if math.random(100) <= 10 then - local rand_x = math.random(33) - 1 - local rand_y = math.random(33) - 1 - local pos = { x = left_top.x + rand_x, y = left_top.y + rand_y } - --local position = envent.surface.find_non_colliding_position("big-worm-turret", pos, 8, 1) - if pos.x * -0.5 > math_abs(pos.y) + 50 and event.surface.can_place_entity({ name = 'big-worm-turret', position = pos, force = 'east' }) then - event.surface.create_entity({ name = 'big-worm-turret', position = pos, force = 'east' }) - generate_scrap(event) - end - end - end - end - if left_top.x >= 500 and left_top.x <= 1500 then - local density = 0.003 * left_top.x - 0.5 - local floor_density = math.floor(density) - for i = 0, floor_density, 1 do - if math.random(100) <= 10 then - local rand_x = math.random(33) - 1 - local rand_y = math.random(33) - 1 - local pos = { x = left_top.x + rand_x, y = left_top.y + rand_y } - --local position = envent.surface.find_non_colliding_position("big-worm-turret", pos, 8, 1) - if pos.x * 0.5 > math_abs(pos.y) + 50 and event.surface.can_place_entity({ name = 'small-worm-turret', position = pos, force = 'west' }) then - event.surface.create_entity({ name = 'small-worm-turret', position = pos, force = 'west' }) - generate_scrap(event) - end - end - end - end - - if left_top.x >= 1500 and left_top.x <= 2500 then - local density = 0.003 * left_top.x - 2.5 - local floor_density = math.floor(density) - for i = 0, floor_density, 1 do - if math.random(100) <= 10 then - local rand_x = math.random(33) - 1 - local rand_y = math.random(33) - 1 - local pos = { x = left_top.x + rand_x, y = left_top.y + rand_y } - --local position = envent.surface.find_non_colliding_position("big-worm-turret", pos, 8, 1) - if pos.x * 0.5 > math_abs(pos.y) + 50 and event.surface.can_place_entity({ name = 'medium-worm-turret', position = pos, force = 'west' }) then - event.surface.create_entity({ name = 'medium-worm-turret', position = pos, force = 'west' }) - generate_scrap(event) - end - end - end - end - if left_top.x >= 2500 then - local density = 0.003 * left_top.x - 5.5 - local floor_density = math.floor(density) - if floor_density > 4 then - floor_density = 4 - end - for i = 0, floor_density, 1 do - if math.random(100) <= 10 then - local rand_x = math.random(33) - 1 - local rand_y = math.random(33) - 1 - local pos = { x = left_top.x + rand_x, y = left_top.y + rand_y } - --local position = envent.surface.find_non_colliding_position("big-worm-turret", pos, 8, 1) - if pos.x * 0.5 > math_abs(pos.y) + 50 and event.surface.can_place_entity({ name = 'big-worm-turret', position = pos, force = 'west' }) then - event.surface.create_entity({ name = 'big-worm-turret', position = pos, force = 'west' }) - generate_scrap(event) - end - end - end - end - - if left_top.x > 320 then - return - end - if left_top.x < -320 then - return - end - if left_top.y > 320 then - return - end - if left_top.y < -320 then - return - end - - game.forces.west.chart(event.surface, { { left_top.x, left_top.y }, { left_top.x + 31, left_top.y + 31 } }) - game.forces.east.chart(event.surface, { { left_top.x, left_top.y }, { left_top.x + 31, left_top.y + 31 } }) -end - -local event = require 'utils.event' -event.add(defines.events.on_chunk_generated, on_chunk_generated) - -return Public diff --git a/maps/native_war/xp.lua b/maps/native_war/xp.lua deleted file mode 100644 index 4c50fdb97..000000000 --- a/maps/native_war/xp.lua +++ /dev/null @@ -1,297 +0,0 @@ ---luacheck: ignore -local math_random = math.random -local Global = require 'utils.global' -local visuals_delay = 1800 -local level_up_floating_text_color = { 0, 205, 0 } -local xp_floating_text_color = { 157, 157, 157 } -local experience_levels = { 0 } - -local xp_t = {} -local last_built_entities = {} - -Global.register( - { xp_t = xp_t }, - function (tbl) - xp_t = tbl.xp_t - last_built_entities = tbl.last_built_entities - end -) - -local Public = {} - -function Public.get_table() - return xp_t -end - -function Public.lost_xp(player, amount) - xp_t[player.index].xp = xp_t[player.index].xp - amount -end - -local xp_yield = { - ['behemoth-biter'] = 16, - ['behemoth-spitter'] = 16, - ['behemoth-worm-turret'] = 64, - ['big-biter'] = 8, - ['big-spitter'] = 8, - ['big-worm-turret'] = 48, - ['biter-spawner'] = 64, - ['character'] = 16, - ['gun-turret'] = 8, - ['laser-turret'] = 16, - ['medium-biter'] = 4, - ['medium-spitter'] = 4, - ['medium-worm-turret'] = 32, - ['small-biter'] = 1, - ['small-spitter'] = 1, - ['small-worm-turret'] = 16, - ['spitter-spawner'] = 64 -} - -local function gain_xp(player, amount) - if not player.force == 'spectator' then - amount = math.round(amount, 2) - xp_t[player.index].xp = xp_t[player.index].xp + amount - xp_t[player.index].xp_since_last_floaty_text = xp_t[player.index].xp_since_last_floaty_text + amount - if xp_t[player.index].last_floaty_text > game.tick then - return - end - player.create_local_flying_text { - text = '+' .. xp_t[player.index].xp_since_last_floaty_text .. ' xp', - position = player.position, - color = xp_floating_text_color, - time_to_live = 120, - speed = 2 - } - xp_t[player.index].xp_since_last_floaty_text = 0 - xp_t[player.index].last_floaty_text = game.tick + visuals_delay - end -end -function Public.xp_reset_player(player) - if not player.character then - player.set_controller({ type = defines.controllers.god }) - player.create_character() - end - xp_t[player.index] = { - xp = 0, - points_to_distribute = 0, - last_floaty_text = visuals_delay, - xp_since_last_floaty_text = 0, - rotated_entity_delay = 0, - last_mined_entity_position = { x = 0, y = 0 } - } -end - -function Public.xp_reset_all_players() - for _, p in pairs(game.players) do - rpg_t[p.index] = nil - end - for _, p in pairs(game.connected_players) do - Public.xp_reset_player(p) - end -end - -local function on_entity_died(event) - if not event.entity.valid then - return - end - - --Grant XP for hand placed land mines - if event.entity.last_user then - if event.entity.type == 'land-mine' then - if event.cause then - if event.cause.valid then - if event.cause.force.index == event.entity.force.index then - return - end - end - end - gain_xp(event.entity.last_user, 1) - return - end - end - - if not event.cause then - return - end - if not event.cause.valid then - return - end - if event.cause.force.index == event.entity.force.index then - return - end - if not get_cause_player[event.cause.type] then - return - end - - local players = get_cause_player[event.cause.type](event.cause) - if not players then - return - end - if not players[1] then - return - end - - --Grant modified XP for health boosted units - if storage.biter_health_boost then - if event.entity.type == 'unit' then - for _, player in pairs(players) do - if xp_yield[event.entity.name] then - gain_xp(player, xp_yield[event.entity.name] * storage.biter_health_boost) - else - gain_xp(player, 0.5 * storage.biter_health_boost) - end - end - return - end - end - - --Grant normal XP - for _, player in pairs(players) do - if xp_yield[event.entity.name] then - gain_xp(player, xp_yield[event.entity.name]) - else - gain_xp(player, 0.5) - end - end -end -local function on_player_repaired_entity(event) - if math_random(1, 4) ~= 1 then - return - end - local player = game.players[event.player_index] - if not player.character then - return - end - gain_xp(player, 0.40) -end - -local function on_player_rotated_entity(event) - local player = game.players[event.player_index] - if not player.character then - return - end - if xp_t[player.index].rotated_entity_delay > game.tick then - return - end - xp_t[player.index].rotated_entity_delay = game.tick + 20 - gain_xp(player, 0.20) -end - -local function on_player_changed_position(event) - if math_random(1, 64) ~= 1 then - return - end - local player = game.players[event.player_index] - if not player.character then - return - end - if player.character.driving then - return - end - gain_xp(player, 1.0) -end - -local building_and_mining_blacklist = { - ['tile-ghost'] = true, - ['entity-ghost'] = true, - ['item-entity'] = true -} - -local function is_replaced_entity(entity) - if not last_built_entities[entity.position.x .. '_' .. entity.position.y] then - return - end - for key, tick in pairs(last_built_entities) do - if tick < game.tick then - last_built_entities[key] = nil - end - end - return true -end - -local function on_pre_player_mined_item(event) - local entity = event.entity - if not entity.valid then - return - end - if building_and_mining_blacklist[entity.type] then - return - end - - local player = game.players[event.player_index] - - if is_replaced_entity(entity) then - gain_xp(player, -0.1) - return - end - - if xp_t[player.index].last_mined_entity_position.x == event.entity.position.x and xp_t[player.index].last_mined_entity_position.y == event.entity.position.y then - return - end - xp_t[player.index].last_mined_entity_position.x = entity.position.x - xp_t[player.index].last_mined_entity_position.y = entity.position.y - if entity.type == 'resource' then - gain_xp(player, 0.5) - return - end - if entity.force.name == 'neutral' then - gain_xp(player, 1.5 + event.entity.max_health * 0.0035) - return - end - gain_xp(player, 0.1 + event.entity.max_health * 0.0005) -end - -local function on_built_entity(event) - local created_entity = event.entity - if not created_entity.valid then - return - end - if building_and_mining_blacklist[created_entity.type] then - return - end - last_built_entities[created_entity.position.x .. '_' .. created_entity.position.y] = game.tick + 1800 - local player = game.players[event.player_index] - gain_xp(player, 0.1) -end - -local function on_player_crafted_item(event) - if not event.recipe.energy then - return - end - local player = game.players[event.player_index] - gain_xp(player, event.recipe.energy * 0.20) -end - -local function on_player_respawned(event) - local player = game.players[event.player_index] - if not xp_t[player.index] then - Public.xp_reset_player(player) - return - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - if not xp_t[player.index] then - Public.xp_reset_player(player) - end -end - -local function on_init(event) -end - -local event = require 'utils.event' -event.on_init(on_init) -event.add(defines.events.on_built_entity, on_built_entity) -event.add(defines.events.on_entity_damaged, on_entity_damaged) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_gui_click, on_gui_click) -event.add(defines.events.on_player_changed_position, on_player_changed_position) -event.add(defines.events.on_player_crafted_item, on_player_crafted_item) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_player_repaired_entity, on_player_repaired_entity) -event.add(defines.events.on_player_respawned, on_player_respawned) -event.add(defines.events.on_player_rotated_entity, on_player_rotated_entity) -event.add(defines.events.on_pre_player_mined_item, on_pre_player_mined_item) - -return Public diff --git a/maps/overgrowth.lua b/maps/overgrowth.lua index fe761af5c..4ac156b15 100644 --- a/maps/overgrowth.lua +++ b/maps/overgrowth.lua @@ -1,6 +1,10 @@ --luacheck: ignore --overgrowth-- by mewmew -- +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + require 'modules.dynamic_landfill' require 'modules.satellite_score' require 'modules.spawners_contain_biters' @@ -22,10 +26,11 @@ local Difficulty = require 'modules.difficulty_vote' local unearthing_biters = require 'utils.functions.unearthing_biters' -local event = require 'utils.event' +local Event = require 'utils.event' local math_random = math.random -local difficulties_votes = { +local difficulties_votes = +{ [1] = 11, [2] = 10, [3] = 9, @@ -35,7 +40,8 @@ local difficulties_votes = { [7] = 5 } -local difficulties_votes_evo = { +local difficulties_votes_evo = +{ [1] = 0.000016, [2] = 0.000024, [3] = 0.000032, @@ -45,14 +51,13 @@ local difficulties_votes_evo = { [7] = 0.000064 } -local starting_items = { +local starting_items = +{ ['pistol'] = 1, ['firearm-magazine'] = 8 } local function create_particles(surface, name, position, amount, cause_position) - local math_random = math.random - local direction_mod = (-100 + math_random(0, 200)) * 0.0004 local direction_mod_2 = (-100 + math_random(0, 200)) * 0.0004 @@ -61,7 +66,7 @@ local function create_particles(surface, name, position, amount, cause_position) direction_mod_2 = (cause_position.y - position.y) * 0.021 end - for i = 1, amount, 1 do + for _ = 1, amount, 1 do local m = math_random(4, 10) local m2 = m * 0.005 @@ -72,7 +77,8 @@ local function create_particles(surface, name, position, amount, cause_position) frame_speed = 1, vertical_speed = 0.130, height = 0, - movement = { + movement = + { (m2 - (math_random(0, m) * 0.01)) + direction_mod, (m2 - (math_random(0, m) * 0.01)) + direction_mod_2 } @@ -84,44 +90,29 @@ end local function spawn_market(surface, position) local market = surface.create_entity({ name = 'market', position = position, force = 'neutral' }) --market.destructible = false - market.add_market_item({ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'wood', count = 50 } }) - market.add_market_item({ price = { { 'coin', 3 } }, offer = { type = 'give-item', item = 'iron-ore', count = 50 } }) - market.add_market_item({ price = { { 'coin', 3 } }, offer = { type = 'give-item', item = 'copper-ore', count = 50 } }) - market.add_market_item({ price = { { 'coin', 3 } }, offer = { type = 'give-item', item = 'stone', count = 50 } }) - market.add_market_item({ price = { { 'coin', 3 } }, offer = { type = 'give-item', item = 'coal', count = 50 } }) - market.add_market_item({ price = { { 'coin', 5 } }, offer = { type = 'give-item', item = 'uranium-ore', count = 50 } }) - - market.add_market_item({ price = { { 'coin', 2 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }) - market.add_market_item({ price = { { 'coin', 8 } }, offer = { type = 'give-item', item = 'grenade', count = 1 } }) - market.add_market_item({ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'firearm-magazine', count = 1 } }) - market.add_market_item({ price = { { 'coin', 16 } }, offer = { type = 'give-item', item = 'submachine-gun', count = 1 } }) - market.add_market_item({ price = { { 'coin', 32 } }, offer = { type = 'give-item', item = 'car', count = 1 } }) + market.add_market_item({ price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'wood', count = 50 } }) + market.add_market_item({ price = { { name = 'coin', count = 3 } }, offer = { type = 'give-item', item = 'iron-ore', count = 50 } }) + market.add_market_item({ price = { { name = 'coin', count = 3 } }, offer = { type = 'give-item', item = 'copper-ore', count = 50 } }) + market.add_market_item({ price = { { name = 'coin', count = 3 } }, offer = { type = 'give-item', item = 'stone', count = 50 } }) + market.add_market_item({ price = { { name = 'coin', count = 3 } }, offer = { type = 'give-item', item = 'coal', count = 50 } }) + market.add_market_item({ price = { { name = 'coin', count = 5 } }, offer = { type = 'give-item', item = 'uranium-ore', count = 50 } }) + + market.add_market_item({ price = { { name = 'coin', count = 2 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }) + market.add_market_item({ price = { { name = 'coin', count = 8 } }, offer = { type = 'give-item', item = 'grenade', count = 1 } }) + market.add_market_item({ price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'firearm-magazine', count = 1 } }) + market.add_market_item({ price = { { name = 'coin', count = 16 } }, offer = { type = 'give-item', item = 'submachine-gun', count = 1 } }) + market.add_market_item({ price = { { name = 'coin', count = 32 } }, offer = { type = 'give-item', item = 'car', count = 1 } }) return market end -local caption_style = { - { 'font', 'default-bold' }, - { 'font_color', { r = 0.63, g = 0.63, b = 0.63 } }, - { 'top_padding', 2 }, - { 'left_padding', 0 }, - { 'right_padding', 0 }, - { 'minimal_width', 0 } -} -local stat_number_style = { - { 'font', 'default-bold' }, - { 'font_color', { r = 0.77, g = 0.77, b = 0.77 } }, - { 'top_padding', 2 }, - { 'left_padding', 0 }, - { 'right_padding', 0 }, - { 'minimal_width', 0 } -} local function tree_gui() for _, player in pairs(game.connected_players) do if player.gui.top['trees_defeated'] then player.gui.top['trees_defeated'].destroy() end local b = - player.gui.top.add { + player.gui.top.add + { type = 'button', caption = '[img=entity.tree-04] : ' .. storage.trees_defeated, tooltip = 'Trees defeated', @@ -138,11 +129,13 @@ local function get_surface_settings() map_gen_settings.seed = math_random(1, 1000000) map_gen_settings.water = math_random(15, 30) * 0.1 map_gen_settings.starting_area = 1 - map_gen_settings.cliff_settings = { + map_gen_settings.cliff_settings = + { cliff_elevation_interval = math_random(4, 48), cliff_elevation_0 = math_random(4, 48) } - map_gen_settings.autoplace_controls = { + map_gen_settings.autoplace_controls = + { ['coal'] = { frequency = '2', size = '1', richness = '1' }, ['stone'] = { frequency = '2', size = '1', richness = '1' }, ['copper-ore'] = { frequency = '2', size = '1', richness = '1' }, @@ -263,7 +256,8 @@ local function attack_market() end storage.current_surface.set_multi_command( { - command = { + command = + { type = defines.command.attack, target = storage.market, distraction = defines.distraction.by_enemy @@ -275,7 +269,8 @@ local function attack_market() ) storage.current_surface.set_multi_command( { - command = { + command = + { type = defines.command.attack, target = storage.market, distraction = defines.distraction.none @@ -304,7 +299,7 @@ local function tick() storage.map_reset_timeout = nil end -event.on_nth_tick(60, tick) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_player_mined_entity, on_player_mined_entity) -event.add(defines.events.on_entity_died, on_entity_died) +Event.on_nth_tick(60, tick) +Event.add(defines.events.on_player_joined_game, on_player_joined_game) +Event.add(defines.events.on_player_mined_entity, on_player_mined_entity) +Event.add(defines.events.on_entity_died, on_entity_died) diff --git a/maps/pitch_black/blood_moon.lua b/maps/pitch_black/blood_moon.lua deleted file mode 100644 index b7a62d583..000000000 --- a/maps/pitch_black/blood_moon.lua +++ /dev/null @@ -1,33 +0,0 @@ -local Public = {} - -local get_noise = require 'utils.math.get_noise' -local math_abs = math.abs -local math_round = math.round - -function Public.set_daytime(surface, tick) - local noise = get_noise('n1', { x = tick * 1, y = 0 }, surface.map_gen_settings.seed) - local daytime = math_abs(math_round(noise, 5)) - - local brightness_modifier = 1.55 - daytime * 1.5 - if brightness_modifier < 0 then - brightness_modifier = 0 - end - if brightness_modifier > 1 then - brightness_modifier = 1 - end - - if noise > 0 then - surface.brightness_visual_weights = { 1, brightness_modifier, 1 } - else - surface.brightness_visual_weights = { brightness_modifier, 1, 1 } - end - - storage.daytime = daytime - - if daytime > 0.55 then - daytime = 0.55 - end - surface.daytime = daytime -end - -return Public diff --git a/maps/pitch_black/difficulty.lua b/maps/pitch_black/difficulty.lua deleted file mode 100644 index f5377e0ca..000000000 --- a/maps/pitch_black/difficulty.lua +++ /dev/null @@ -1,99 +0,0 @@ -local Public = {} - -local score_values = { - ['small-spitter'] = 1, - ['small-biter'] = 1, - ['medium-spitter'] = 3, - ['medium-biter'] = 3, - ['big-spitter'] = 5, - ['big-biter'] = 5, - ['behemoth-spitter'] = 10, - ['behemoth-biter'] = 10, - ['small-worm-turret'] = 4, - ['medium-worm-turret'] = 6, - ['big-worm-turret'] = 8, - ['behemoth-worm-turret'] = 10, - ['biter-spawner'] = 16, - ['spitter-spawner'] = 16 -} - -function Public.set_daytime_difficulty(surface) - local daytime = surface.daytime - if daytime < 0.30 then - surface.peaceful_mode = true - else - surface.peaceful_mode = false - end -end - -function Public.set_biter_difficulty() - local daytime = storage.daytime - - local daytime_extra_life_modifier = (-0.30 + daytime) * 2 - if daytime_extra_life_modifier < 0 then - daytime_extra_life_modifier = 0 - end - - local extra_lifes = storage.map_score * 0.0001 * daytime + daytime_extra_life_modifier - storage.biter_reanimator.forces[2] = extra_lifes -end - -function Public.add_score(entity) - local value = score_values[entity.name] - if not value then - return - end - storage.map_score = storage.map_score + value -end - -function Public.fleeing_biteys(entity, cause) - local surface = entity.surface - if not surface.peaceful_mode then - return - end - - if not cause then - return - end - if not cause.valid then - return - end - if entity.type ~= 'unit' then - return - end - - local unit_groups = {} - local position = entity.position - local units = surface.find_entities_filtered({ type = 'unit', force = 'enemy', area = { { position.x - 16, position.y - 16 }, { position.x + 16, position.y + 16 } } }) - - for _, unit in pairs(units) do - local unit_group = unit.unit_group - if unit_group then - if unit_group.valid then - if not unit_groups[unit_group.unique_id] then - unit_groups[unit_group.unique_id] = unit_group - end - end - else - unit.set_command( - { - type = defines.command.flee, - from = cause, - distraction = defines.distraction.none - } - ) - end - end - - for _, group in pairs(unit_groups) do - group.set_command( - { - type = defines.command.flee, - from = cause, - distraction = defines.distraction.none - } - ) - end -end - -return Public diff --git a/maps/pitch_black/gui.lua b/maps/pitch_black/gui.lua deleted file mode 100644 index 941640c9a..000000000 --- a/maps/pitch_black/gui.lua +++ /dev/null @@ -1,48 +0,0 @@ -local Public = {} - -local tooltip = 'Difficulty increases with higher score.' - -local function create_score_gui(player) - local frame = player.gui.left.add({ type = 'frame', name = 'pitch_black_score', direction = 'vertical' }) - local t = frame.add({ type = 'table', column_count = 2 }) - - frame.tooltip = tooltip - t.tooltip = tooltip - - local element = t.add({ type = 'label', caption = 'Score: ' }) - element.style.font = 'heading-1' - element.style.font_color = { 175, 175, 200 } - element.style.horizontal_align = 'right' - element.style.maximal_width = 56 - element.style.minimal_width = 56 - element.tooltip = tooltip - - element = t.add({ type = 'label', caption = 0 }) - element.style.font = 'heading-1' - element.style.font_color = { 100, 0, 255 } - element.style.horizontal_align = 'left' - element.style.minimal_width = 32 - element.tooltip = tooltip - - return frame -end - -local function update_score_gui(player) - local frame = player.gui.left.pitch_black_score - if not player.gui.left.pitch_black_score then - frame = create_score_gui(player) - end - - local frame_table = frame.children[1] - - local score_value = frame_table.children[2] - score_value.caption = storage.map_score -end - -function Public.update() - for _, player in pairs(game.connected_players) do - update_score_gui(player) - end -end - -return Public diff --git a/maps/pitch_black/main.lua b/maps/pitch_black/main.lua deleted file mode 100644 index d5a2070bb..000000000 --- a/maps/pitch_black/main.lua +++ /dev/null @@ -1,49 +0,0 @@ -require 'modules.biter_reanimator' - -local Blood_moon = require 'maps.pitch_black.blood_moon' -local Gui = require 'maps.pitch_black.gui' -local Difficulty = require 'maps.pitch_black.difficulty' - -local function on_entity_died(event) - local entity = event.entity - if not entity.valid then - return - end - local cause = event.cause - Difficulty.fleeing_biteys(entity, cause) - Difficulty.add_score(entity) -end - -local function on_tick() - local tick = game.tick - if tick % 2 ~= 0 then - return - end - - local surface = game.surfaces[1] - - Blood_moon.set_daytime(surface, tick) - - if tick % 30 ~= 0 then - return - end - Difficulty.set_daytime_difficulty(surface, tick) - Difficulty.set_biter_difficulty() - - Gui.update() -end - -local function on_init() - local surface = game.surfaces[1] - - surface.freeze_daytime = true - surface.min_brightness = 0 - - storage.daytime = 0 - storage.map_score = 0 -end - -local Event = require 'utils.event' -Event.add(defines.events.on_entity_died, on_entity_died) -Event.add(defines.events.on_tick, on_tick) -Event.on_init(on_init) diff --git a/maps/planet_prison.lua b/maps/planet_prison.lua index f2eaa457b..63bf05117 100644 --- a/maps/planet_prison.lua +++ b/maps/planet_prison.lua @@ -1,6 +1,10 @@ -- map by Cogito -- heavily modified by Gerkiz +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + local Global = require 'utils.global' local Session = require 'utils.datastore.session_data' local Event = require 'utils.event' diff --git a/maps/quarters.lua b/maps/quarters.lua index 10c3f6043..b73a1e180 100644 --- a/maps/quarters.lua +++ b/maps/quarters.lua @@ -1,12 +1,19 @@ --luacheck: ignore + +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + require 'modules.mineable_wreckage_yields_scrap' require 'modules.wave_defense.main' local Map = require 'modules.map_info' local WD = require 'modules.wave_defense.table' +local Event = require 'utils.event' local simplex_noise = require 'utils.math.simplex_noise'.d2 local spawn_size = 96 local wall_thickness = 3 -local small_scraps = { +local small_scraps = +{ 'crash-site-spaceship-wreck-small-1', 'crash-site-spaceship-wreck-small-1', 'crash-site-spaceship-wreck-small-2', @@ -126,22 +133,6 @@ local function spawn_area(event) end end -local function get_quarter_name(position) - if position.x < 0 then - if position.y < 0 then - return 'NW' - else - return 'SW' - end - else - if position.y < 0 then - return 'NE' - else - return 'SE' - end - end -end - local function draw_borders(surface, left_top, area) if left_top.x == 0 or left_top.x == -32 then for x = 0, 31, 1 do @@ -219,11 +210,11 @@ local function set_difficulty() end end -local function on_player_joined_game(event) +local function on_player_joined_game() set_difficulty() end -local function on_player_left_game(event) +local function on_player_left_game() set_difficulty() end @@ -243,14 +234,15 @@ local function on_init() ) T.main_caption_color = { r = 0, g = 120, b = 0 } T.sub_caption_color = { r = 255, g = 0, b = 255 } - for i, quarter in pairs({ 'coal', 'iron-ore', 'stone', 'copper-ore' }) do + for _, quarter in pairs({ 'coal', 'iron-ore', 'stone', 'copper-ore' }) do local map_gen_settings = {} map_gen_settings.seed = math.random(1, 999999999) map_gen_settings.water = math.random(25, 50) * 0.01 map_gen_settings.starting_area = 1.5 map_gen_settings.terrain_segmentation = math.random(25, 50) * 0.1 map_gen_settings.cliff_settings = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 } - map_gen_settings.autoplace_controls = { + map_gen_settings.autoplace_controls = + { ['coal'] = { frequency = 0, size = 0.5, richness = 0.5 }, ['stone'] = { frequency = 0, size = 0.5, richness = 0.5 }, ['copper-ore'] = { frequency = 0, size = 0.5, richness = 0.5 }, @@ -271,33 +263,9 @@ local function on_init() game.create_surface(quarter, map_gen_settings) end - - --[[ - game.map_settings.enemy_expansion.enabled = true - game.map_settings.enemy_expansion.settler_group_min_size = 8 - game.map_settings.enemy_expansion.settler_group_max_size = 16 - game.map_settings.enemy_expansion.min_expansion_cooldown = 2700 - game.map_settings.enemy_expansion.max_expansion_cooldown = 2700 - - game.map_settings.pollution.enabled = true - game.map_settings.enemy_evolution.enabled = true - - local modifier_factor = 2 - - --default game setting values - storage.enemy_evolution_destroy_factor = game.map_settings.enemy_evolution.destroy_factor * modifier_factor - storage.enemy_evolution_time_factor = game.map_settings.enemy_evolution.time_factor * modifier_factor - storage.enemy_evolution_pollution_factor = game.map_settings.enemy_evolution.pollution_factor * modifier_factor - ]] end -local event = require 'utils.event' ---event.on_nth_tick(60, tick) -event.on_init(on_init) -event.add(defines.events.on_chunk_generated, on_chunk_generated) ---event.add(defines.events.on_entity_died, on_entity_died) ---event.add(defines.events.on_research_finished, on_research_finished) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_player_left_game, on_player_left_game) - ---require "modules.difficulty_vote" +Event.on_init(on_init) +Event.add(defines.events.on_chunk_generated, on_chunk_generated) +Event.add(defines.events.on_player_joined_game, on_player_joined_game) +Event.add(defines.events.on_player_left_game, on_player_left_game) diff --git a/maps/railway_troopers/main.lua b/maps/railway_troopers/main.lua index f1a9e46ca..0d1d0e0d7 100644 --- a/maps/railway_troopers/main.lua +++ b/maps/railway_troopers/main.lua @@ -26,14 +26,16 @@ local function set_commands(unit_group) for x = position.x, -8196, -32 do if surface.is_chunk_generated({ math_floor(x / 32), math_floor(position.y / 32) }) then if math_random(1, 16) == 1 then - commands[#commands + 1] = { + commands[#commands + 1] = + { type = defines.command.build_base, destination = { x = x, y = position.y }, distraction = defines.distraction.by_anything, ignore_planner = true } else - commands[#commands + 1] = { + commands[#commands + 1] = + { type = defines.command.attack_area, destination = { x = x, y = position.y }, radius = 16, @@ -135,10 +137,10 @@ local function draw_east_side(surface, left_top) if left_top.y == 0 and left_top.x < 64 then for x = 0, 30, 2 do - surface.create_entity({ name = 'straight-rail', position = { left_top.x + x, 0 }, direction = 2, force = 'player' }) + surface.create_entity({ name = 'straight-rail', position = { left_top.x + x, 0 }, direction = 4, force = 'player' }) end if left_top.x == -32 then - local entity = surface.create_entity({ name = 'cargo-wagon', position = { -24, 0 }, force = 'player', direction = 2 }) + local entity = surface.create_entity({ name = 'cargo-wagon', position = { -24, 0 }, force = 'player', direction = 4 }) entity.get_inventory(defines.inventory.cargo_wagon).insert({ name = 'firearm-magazine', count = 600 }) entity.get_inventory(defines.inventory.cargo_wagon).insert({ name = 'shotgun', count = 2 }) entity.get_inventory(defines.inventory.cargo_wagon).insert({ name = 'shotgun-shell', count = 64 }) @@ -146,7 +148,7 @@ local function draw_east_side(surface, left_top) entity.get_inventory(defines.inventory.cargo_wagon).insert({ name = 'grenade', count = 32 }) entity.get_inventory(defines.inventory.cargo_wagon).insert({ name = 'pistol', count = 10 }) entity.get_inventory(defines.inventory.cargo_wagon).insert({ name = 'rail', count = 100 }) - entity = surface.create_entity({ name = 'locomotive', position = { -18, 0 }, force = 'player', direction = 2 }) + entity = surface.create_entity({ name = 'locomotive', position = { -18, 0 }, force = 'player', direction = 4 }) entity.get_inventory(defines.inventory.fuel).insert({ name = 'wood', count = 25 }) end end @@ -191,7 +193,8 @@ local function on_chunk_generated(event) end end -local type_whitelist = { +local type_whitelist = +{ ['artillery-wagon'] = true, ['car'] = true, ['cargo-wagon'] = true, @@ -307,11 +310,13 @@ local function on_init() game.map_settings.enemy_expansion.max_expansion_distance = 16 game.map_settings.pollution.enemy_attack_pollution_consumption_modifier = 0.25 - local map_gen_settings = { + local map_gen_settings = + { ['water'] = 0, ['starting_area'] = 0.60, ['cliff_settings'] = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 }, - ['autoplace_controls'] = { + ['autoplace_controls'] = + { ['coal'] = { frequency = 0, size = 0.65, richness = 0.5 }, ['stone'] = { frequency = 0, size = 0.65, richness = 0.5 }, ['copper-ore'] = { frequency = 0, size = 0.65, richness = 0.5 }, @@ -335,7 +340,8 @@ local function on_init() force.technologies['railway'].researched = true force.technologies['engine'].researched = true - local types_to_disable = { + local types_to_disable = + { ['ammo'] = true, ['armor'] = true, ['car'] = true, diff --git a/maps/railway_troopers_v2/main.lua b/maps/railway_troopers_v2/main.lua index 0552f3691..560e05fe3 100644 --- a/maps/railway_troopers_v2/main.lua +++ b/maps/railway_troopers_v2/main.lua @@ -1,8 +1,13 @@ +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + local Difficulty = require 'modules.difficulty_vote' require 'modules.satellite_score' require 'modules.biters_yield_ore' -local difficulties_votes = { +local difficulties_votes = +{ [1] = 32, [2] = 16, [3] = 8, @@ -24,10 +29,10 @@ local math_abs = math.abs local function place_spawn_entities(surface) for x = 0, 96, 2 do - surface.create_entity({ name = 'straight-rail', position = { -96 + x, 0 }, direction = 2, force = 'player' }) + surface.create_entity({ name = 'straight-rail', position = { -96 + x, 0 }, direction = 4, force = 'player' }) end - local entity = surface.create_entity({ name = 'cargo-wagon', position = { -24, 1 }, force = 'player', direction = 2 }) + local entity = surface.create_entity({ name = 'cargo-wagon', position = { -24, 1 }, force = 'player', direction = 4 }) entity.get_inventory(defines.inventory.cargo_wagon).insert({ name = 'submachine-gun', count = 3 }) entity.get_inventory(defines.inventory.cargo_wagon).insert({ name = 'firearm-magazine', count = 600 }) entity.get_inventory(defines.inventory.cargo_wagon).insert({ name = 'shotgun', count = 2 }) @@ -127,7 +132,8 @@ local function map_reset() force.technologies['engine'].researched = true force.technologies['fluid-wagon'].researched = true - local types_to_disable = { + local types_to_disable = + { ['ammo'] = true, ['armor'] = true, ['car'] = true, @@ -282,12 +288,14 @@ local function on_init() surface.delete_chunk({ chunk.x, chunk.y }) end - local new_map_gen_settings = { + local new_map_gen_settings = + { ['water'] = 0.50, ['starting_area'] = 0.60, terrain_segmentation = 20, ['cliff_settings'] = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 }, - ['autoplace_controls'] = { + ['autoplace_controls'] = + { ['coal'] = { frequency = 15, size = 0.20, richness = 0.25 }, ['stone'] = { frequency = 15, size = 0.20, richness = 0.25 }, ['copper-ore'] = { frequency = 15, size = 0.20, richness = 0.25 }, diff --git a/maps/spooky_forest.lua b/maps/spooky_forest.lua index 6d7323c22..b3e1e9910 100644 --- a/maps/spooky_forest.lua +++ b/maps/spooky_forest.lua @@ -18,11 +18,10 @@ require 'modules.rocks_broken_paint_tiles' require 'modules.rpg' require 'modules.hunger' -local shapes = require 'utils.tools.shapes' -local event = require 'utils.event' -local map_functions = require 'utils.tools.map_functions' -local simplex_noise = require 'utils.math.simplex_noise' -simplex_noise = simplex_noise.d2 +local Shapes = require 'utils.tools.shapes' +local Event = require 'utils.event' +local MapFunctions = require 'utils.tools.map_functions' +local SimplexNoise = require 'utils.math.simplex_noise'.d2 local math_random = math.random local insert = table.insert @@ -37,7 +36,8 @@ local function shuffle(tbl) return tbl end -local worm_raffle_table = { +local worm_raffle_table = +{ [1] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret' }, [2] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret' }, [3] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret', 'medium-worm-turret' }, @@ -50,7 +50,8 @@ local worm_raffle_table = { [10] = { 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret' } } -local biters_in_the_trees = { +local biters_in_the_trees = +{ [1] = { 'small-biter', 'small-biter', 'small-biter', 'small-biter', 'small-spitter', 'small-spitter' }, [2] = { 'small-biter', 'small-biter', 'small-biter', 'small-spitter', 'small-spitter', 'medium-biter' }, [3] = { 'small-biter', 'small-biter', 'small-biter', 'small-biter', 'medium-biter', 'medium-spitter' }, @@ -76,48 +77,47 @@ local biters_in_the_trees = { local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' } local function secret_shop(pos, surface) - local secret_market_items = { - { price = { { 'raw-fish', math_random(75, 125) } }, offer = { type = 'give-item', item = 'combat-shotgun' } }, - { price = { { 'raw-fish', math_random(40, 60) } }, offer = { type = 'give-item', item = 'rocket-launcher' } }, - { price = { { 'raw-fish', math_random(1, 2) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, - { price = { { 'raw-fish', math_random(3, 6) } }, offer = { type = 'give-item', item = 'uranium-rounds-magazine' } }, - { price = { { 'raw-fish', math_random(1, 4) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } }, - { price = { { 'raw-fish', math_random(1, 2) } }, offer = { type = 'give-item', item = 'rocket' } }, - { price = { { 'raw-fish', math_random(2, 3) } }, offer = { type = 'give-item', item = 'explosive-rocket' } }, - { price = { { 'raw-fish', math_random(1, 2) } }, offer = { type = 'give-item', item = 'explosive-cannon-shell' } }, - { price = { { 'raw-fish', math_random(3, 6) } }, offer = { type = 'give-item', item = 'explosive-uranium-cannon-shell' } }, - { price = { { 'raw-fish', math_random(4, 8) } }, offer = { type = 'give-item', item = 'cluster-grenade' } }, - { price = { { 'raw-fish', math_random(1, 2) } }, offer = { type = 'give-item', item = 'land-mine' } }, - { price = { { 'raw-fish', math_random(25, 50) } }, offer = { type = 'give-item', item = 'heavy-armor' } }, - { price = { { 'raw-fish', math_random(125, 250) } }, offer = { type = 'give-item', item = 'modular-armor' } }, - { price = { { 'raw-fish', math_random(300, 600) } }, offer = { type = 'give-item', item = 'power-armor' } }, - { price = { { 'raw-fish', math_random(300, 600) } }, offer = { type = 'give-item', item = 'fusion-reactor-equipment' } }, - { price = { { 'raw-fish', math_random(20, 40) } }, offer = { type = 'give-item', item = 'battery-equipment' } }, - { price = { { 'raw-fish', math_random(100, 150) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } }, - { price = { { 'raw-fish', math_random(40, 80) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } }, - { price = { { 'raw-fish', math_random(60, 120) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } }, - { price = { { 'raw-fish', math_random(60, 120) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } }, - { price = { { 'raw-fish', math_random(3, 9) } }, offer = { type = 'give-item', item = 'construction-robot' } }, - { price = { { 'raw-fish', math_random(100, 200) } }, offer = { type = 'give-item', item = 'energy-shield-equipment' } }, - { price = { { 'raw-fish', math_random(200, 400) } }, offer = { type = 'give-item', item = 'personal-laser-defense-equipment' } }, - { price = { { 'raw-fish', math_random(30, 60) } }, offer = { type = 'give-item', item = 'loader' } }, - { price = { { 'raw-fish', math_random(50, 80) } }, offer = { type = 'give-item', item = 'fast-loader' } }, - { price = { { 'raw-fish', math_random(70, 100) } }, offer = { type = 'give-item', item = 'express-loader' } }, - { price = { { 'raw-fish', math_random(30, 60) } }, offer = { type = 'give-item', item = 'locomotive' } }, - { price = { { 'raw-fish', math_random(15, 35) } }, offer = { type = 'give-item', item = 'cargo-wagon' } }, - { price = { { 'raw-fish', math_random(1, 4) } }, offer = { type = 'give-item', item = 'grenade' } }, - { price = { { 'raw-fish', 1 } }, offer = { type = 'give-item', item = 'rail', count = 4 } }, - -- {price = {{"raw-fish", 1}}, offer = {type = 'give-item', item = 'rail-signal', count = 2}}, - -- {price = {{"raw-fish", 1}}, offer = {type = 'give-item', item = 'rail-chain-signal', count = 2}}, - { price = { { 'raw-fish', 5 } }, offer = { type = 'give-item', item = 'train-stop' } }, - { price = { { 'raw-fish', 1 } }, offer = { type = 'give-item', item = 'small-lamp' } }, - { price = { { 'raw-fish', 2 } }, offer = { type = 'give-item', item = 'firearm-magazine' } }, - { price = { { 'raw-fish', 1 } }, offer = { type = 'give-item', item = 'wood', count = math_random(25, 75) } }, - { price = { { 'raw-fish', 1 } }, offer = { type = 'give-item', item = 'iron-ore', count = math_random(25, 75) } }, - { price = { { 'raw-fish', 1 } }, offer = { type = 'give-item', item = 'copper-ore', count = math_random(25, 75) } }, - { price = { { 'raw-fish', 1 } }, offer = { type = 'give-item', item = 'stone', count = math_random(25, 75) } }, - { price = { { 'raw-fish', 1 } }, offer = { type = 'give-item', item = 'coal', count = math_random(25, 75) } }, - { price = { { 'raw-fish', 1 } }, offer = { type = 'give-item', item = 'uranium-ore', count = math_random(25, 75) } } + local secret_market_items = + { + { price = { { name = 'raw-fish', count = math_random(75, 125) } }, offer = { type = 'give-item', item = 'combat-shotgun' } }, + { price = { { name = 'raw-fish', count = math_random(40, 60) } }, offer = { type = 'give-item', item = 'rocket-launcher' } }, + { price = { { name = 'raw-fish', count = math_random(1, 2) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, + { price = { { name = 'raw-fish', count = math_random(3, 6) } }, offer = { type = 'give-item', item = 'uranium-rounds-magazine' } }, + { price = { { name = 'raw-fish', count = math_random(1, 4) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } }, + { price = { { name = 'raw-fish', count = math_random(1, 2) } }, offer = { type = 'give-item', item = 'rocket' } }, + { price = { { name = 'raw-fish', count = math_random(2, 3) } }, offer = { type = 'give-item', item = 'explosive-rocket' } }, + { price = { { name = 'raw-fish', count = math_random(1, 2) } }, offer = { type = 'give-item', item = 'explosive-cannon-shell' } }, + { price = { { name = 'raw-fish', count = math_random(3, 6) } }, offer = { type = 'give-item', item = 'explosive-uranium-cannon-shell' } }, + { price = { { name = 'raw-fish', count = math_random(4, 8) } }, offer = { type = 'give-item', item = 'cluster-grenade' } }, + { price = { { name = 'raw-fish', count = math_random(1, 2) } }, offer = { type = 'give-item', item = 'land-mine' } }, + { price = { { name = 'raw-fish', count = math_random(25, 50) } }, offer = { type = 'give-item', item = 'heavy-armor' } }, + { price = { { name = 'raw-fish', count = math_random(125, 250) } }, offer = { type = 'give-item', item = 'modular-armor' } }, + { price = { { name = 'raw-fish', count = math_random(300, 600) } }, offer = { type = 'give-item', item = 'power-armor' } }, + { price = { { name = 'raw-fish', count = math_random(300, 600) } }, offer = { type = 'give-item', item = 'fusion-reactor-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(20, 40) } }, offer = { type = 'give-item', item = 'battery-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(100, 150) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(40, 80) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(60, 120) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(60, 120) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(3, 9) } }, offer = { type = 'give-item', item = 'construction-robot' } }, + { price = { { name = 'raw-fish', count = math_random(100, 200) } }, offer = { type = 'give-item', item = 'energy-shield-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(200, 400) } }, offer = { type = 'give-item', item = 'personal-laser-defense-equipment' } }, + { price = { { name = 'raw-fish', count = math_random(30, 60) } }, offer = { type = 'give-item', item = 'loader' } }, + { price = { { name = 'raw-fish', count = math_random(50, 80) } }, offer = { type = 'give-item', item = 'fast-loader' } }, + { price = { { name = 'raw-fish', count = math_random(70, 100) } }, offer = { type = 'give-item', item = 'express-loader' } }, + { price = { { name = 'raw-fish', count = math_random(30, 60) } }, offer = { type = 'give-item', item = 'locomotive' } }, + { price = { { name = 'raw-fish', count = math_random(15, 35) } }, offer = { type = 'give-item', item = 'cargo-wagon' } }, + { price = { { name = 'raw-fish', count = math_random(1, 4) } }, offer = { type = 'give-item', item = 'grenade' } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'rail', count = 4 } }, + { price = { { name = 'raw-fish', count = 5 } }, offer = { type = 'give-item', item = 'train-stop' } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'small-lamp' } }, + { price = { { name = 'raw-fish', count = 2 } }, offer = { type = 'give-item', item = 'firearm-magazine' } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'wood', count = math_random(25, 75) } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'iron-ore', count = math_random(25, 75) } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'copper-ore', count = math_random(25, 75) } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'stone', count = math_random(25, 75) } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'coal', count = math_random(25, 75) } }, + { price = { { name = 'raw-fish', count = 1 } }, offer = { type = 'give-item', item = 'uranium-ore', count = math_random(25, 75) } } } secret_market_items = shuffle(secret_market_items) @@ -130,7 +130,7 @@ local function secret_shop(pos, surface) end local function spawn_biter(surface, position) - local e = math.ceil(game.forces.enemy.evolution_factor * 20) + local e = math.ceil(game.forces.enemy.get_evolution_factor('spooky_forest') * 20) if e < 1 then e = 1 end @@ -150,33 +150,33 @@ local function get_noise(name, pos) local noise = {} local noise_seed_add = 25000 if name == 'water' then - noise[1] = simplex_noise(pos.x * 0.02, pos.y * 0.02, seed) + noise[1] = SimplexNoise(pos.x * 0.02, pos.y * 0.02, seed) seed = seed + noise_seed_add - noise[2] = simplex_noise(pos.x * 0.1, pos.y * 0.1, seed) + noise[2] = SimplexNoise(pos.x * 0.1, pos.y * 0.1, seed) seed = seed + noise_seed_add - local noise = noise[1] + noise[2] * 0.2 + noise = noise[1] + noise[2] * 0.2 return noise end seed = seed + noise_seed_add if name == 'grass' then --noise[1] = simplex_noise(pos.x * 0.1, pos.y * 0.1, seed) - noise[1] = simplex_noise(pos.x * 0.08, pos.y * 0.08, seed) + noise[1] = SimplexNoise(pos.x * 0.08, pos.y * 0.08, seed) seed = seed + noise_seed_add - local noise = noise[1] + noise = noise[1] return noise end seed = seed + noise_seed_add if name == 'trees' then - noise[1] = simplex_noise(pos.x * 0.045, pos.y * 0.045, seed) + noise[1] = SimplexNoise(pos.x * 0.045, pos.y * 0.045, seed) seed = seed + noise_seed_add - local noise = noise[1] + noise = noise[1] return noise end seed = seed + noise_seed_add if name == 'spawners' then - noise[1] = simplex_noise(pos.x * 0.02, pos.y * 0.02, seed) + noise[1] = SimplexNoise(pos.x * 0.02, pos.y * 0.02, seed) seed = seed + noise_seed_add - local noise = noise[1] + noise = noise[1] return noise end end @@ -194,7 +194,7 @@ local function get_entity(position) entity_name = rock_raffle[math_random(1, #rock_raffle)] if math_random(1, 24) == 1 then if position.x > 32 or position.x < -32 or position.y > 32 or position.y < -32 then - local e = math.ceil(game.forces.enemy.evolution_factor * 10) + local e = math.ceil(game.forces.enemy.get_evolution_factor('spooky_forest') * 10) if e < 1 then e = 1 end @@ -234,7 +234,7 @@ local function get_noise_tile(position) tile_name = 'grass-2' end - local noise = get_noise('water', position) + noise = get_noise('water', position) if noise > 0.71 then tile_name = 'water' if noise > 0.78 then @@ -251,8 +251,8 @@ end local function get_chunk_position(position) local chunk_position = {} - position.x = math.floor(position.x, 0) - position.y = math.floor(position.y, 0) + position.x = math.floor(position.x) + position.y = math.floor(position.y) for x = 0, 31, 1 do if (position.x - x) % 32 == 0 then chunk_position.x = (position.x - x) / 32 @@ -281,7 +281,7 @@ local function regenerate_decoratives_for_chunk(surface, position) end local function uncover_map(surface, position, radius_min, radius_max) - local circles = shapes.circles + local circles = Shapes.circles local tiles = {} local fishes = {} local regenerate_decoratives = false @@ -335,7 +335,7 @@ end local function uncover_map_for_player(player) local position = player.position local surface = player.surface - local circles = shapes.circles + local circles = Shapes.circles local tiles = {} local fishes = {} local uncover_map_schedule = {} @@ -396,8 +396,8 @@ local function uncover_map_for_player(player) end end -local ore_spill_raffle = { 'iron-ore', 'iron-ore', 'iron-ore', 'iron-ore', 'copper-ore', 'copper-ore', 'copper-ore', 'coal', 'coal' } -local ore_spawn_raffle = { +local ore_spawn_raffle = +{ 'iron-ore', 'iron-ore', 'iron-ore', @@ -437,12 +437,12 @@ local function on_entity_died(event) if math_random(1, 2) ~= 1 then local name = ore_spawn_raffle[math.random(1, #ore_spawn_raffle)] local pos = { x = event.entity.position.x, y = event.entity.position.y } - local amount_modifier = math.ceil(1 + game.forces.enemy.evolution_factor * 10) - local size_modifier = math.floor(game.forces.enemy.evolution_factor * 4) + local amount_modifier = math.ceil(1 + game.forces.enemy.get_evolution_factor('spooky_forest') * 10) + local size_modifier = math.floor(game.forces.enemy.get_evolution_factor('spooky_forest') * 4) if name == 'crude-oil' then - map_functions.draw_oil_circle(pos, name, surface, 4, math.ceil(100000 * amount_modifier)) + MapFunctions.draw_oil_circle(pos, name, surface, 4, math.ceil(100000 * amount_modifier)) else - map_functions.draw_smoothed_out_ore_circle(pos, name, surface, 6 + size_modifier, math.ceil(500 * amount_modifier)) + MapFunctions.draw_smoothed_out_ore_circle(pos, name, surface, 6 + size_modifier, math.ceil(500 * amount_modifier)) end end end @@ -463,7 +463,8 @@ local function on_player_joined_game(event) local map_gen_settings = {} map_gen_settings.water = 'small' map_gen_settings.cliff_settings = { cliff_elevation_interval = 22, cliff_elevation_0 = 22 } - map_gen_settings.autoplace_controls = { + map_gen_settings.autoplace_controls = + { ['coal'] = { frequency = 'none', size = 'none', richness = 'none' }, ['stone'] = { frequency = 'none', size = 'none', richness = 'none' }, ['copper-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, @@ -475,7 +476,7 @@ local function on_player_joined_game(event) game.create_surface('spooky_forest', map_gen_settings) local surface = game.surfaces['spooky_forest'] surface.daytime = 0.5 - surface.freeze_daytime = 1 + surface.freeze_daytime = true game.forces['player'].set_spawn_position({ 0, 0 }, surface) game.map_settings.enemy_expansion.enabled = true @@ -585,7 +586,7 @@ local function on_chunk_generated(event) for y = 0, 31, 1 do local tile_to_insert = 'out-of-map' local pos = { x = position_left_top.x + x, y = position_left_top.y + y } - local tile_name = surface.get_tile(pos).name + local tile_name = surface.get_tile(pos.x, pos.y).name if tile_name ~= 'stone-path' then insert(tiles, { name = tile_to_insert, position = pos }) end @@ -608,7 +609,8 @@ local function on_player_mined_entity(event) end end -local disabled_for_deconstruction = { +local disabled_for_deconstruction = +{ ['fish'] = true, ['huge-rock'] = true, ['big-rock'] = true, @@ -624,7 +626,7 @@ local function on_marked_for_deconstruction(event) end end -local function on_research_finished(event) +local function on_research_finished() game.forces.player.recipes['flamethrower-turret'].enabled = false end @@ -647,7 +649,7 @@ local function break_some_random_trees(surface) end if #trees ~= 0 then trees = shuffle(trees) - for i = 1, math_random(4 + math.floor(game.forces.enemy.evolution_factor * 8), 8 + math.floor(game.forces.enemy.evolution_factor * 16)), 1 do + for i = 1, math_random(4 + math.floor(game.forces.enemy.get_evolution_factor('spooky_forest') * 8), 8 + math.floor(game.forces.enemy.get_evolution_factor('spooky_forest') * 16)), 1 do if not trees[i] then break end @@ -665,11 +667,11 @@ local function break_some_random_trees(surface) if not rocks[1] then return end - local e = math.ceil(game.forces.enemy.evolution_factor * 10) + local e = math.ceil(game.forces.enemy.get_evolution_factor('spooky_forest') * 10) if e < 1 then e = 1 end - entity_name = worm_raffle_table[e][math_random(1, #worm_raffle_table[e])] + local entity_name = worm_raffle_table[e][math_random(1, #worm_raffle_table[e])] surface.create_entity({ name = entity_name, position = rocks[1].position, force = 'enemy' }) rocks[1].die('enemy') end @@ -695,14 +697,14 @@ local function on_tick() end end -event.add(defines.events.on_tick, on_tick) -event.add(defines.events.on_research_finished, on_research_finished) -event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction) -event.add(defines.events.on_player_mined_entity, on_player_mined_entity) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_chunk_generated, on_chunk_generated) -event.add(defines.events.on_player_changed_position, on_player_changed_position) -event.add(defines.events.on_player_joined_game, on_player_joined_game) +Event.add(defines.events.on_tick, on_tick) +Event.add(defines.events.on_research_finished, on_research_finished) +Event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction) +Event.add(defines.events.on_player_mined_entity, on_player_mined_entity) +Event.add(defines.events.on_entity_died, on_entity_died) +Event.add(defines.events.on_chunk_generated, on_chunk_generated) +Event.add(defines.events.on_player_changed_position, on_player_changed_position) +Event.add(defines.events.on_player_joined_game, on_player_joined_game) require 'modules.rocks_yield_ore' storage.rocks_yield_ore_base_amount = 100 diff --git a/maps/spooky_forest_changelog.txt b/maps/spooky_forest_changelog.txt deleted file mode 100644 index 1ba9322c2..000000000 --- a/maps/spooky_forest_changelog.txt +++ /dev/null @@ -1,35 +0,0 @@ -0.09 -worms spawn out of rocks rarely -decorative regeneration -spawn now has 1 turret - -0.08 -spawn is now biter free - -0.07 -added randomly breaking trees -added randomly attacking biters -added spawn area - -0.06 -added markets -added hunger and respawning fish - -0.05 -map reveal fixes -reduced evolution - -0.04 -disabled flamethrower turret - -0.03 -bigger map reveal on nest findings -more ore -more tree - -0.02 -less ore spawns -less evolution game on nest destruction - -0.01 -spooked ya diff --git a/maps/stone_maze/global_functions.lua b/maps/stone_maze/global_functions.lua index 3a216d72c..7101499e5 100644 --- a/maps/stone_maze/global_functions.lua +++ b/maps/stone_maze/global_functions.lua @@ -87,139 +87,140 @@ end function get_loot_item_stack() local math_random = math.random local chest_raffle = {} - local chest_loot = { - { { name = 'submachine-gun', count = math_random(1, 3) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'slowdown-capsule', count = math_random(4, 8) }, weight = 1, evolution_min = 0.0, evolution_max = 1 }, - { { name = 'poison-capsule', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.7 }, - { { name = 'explosive-uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'explosive-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.8 }, - { { name = 'shotgun', count = 1 }, weight = 2, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'shotgun-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'combat-shotgun', count = 1 }, weight = 10, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'piercing-shotgun-shell', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'flamethrower', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, - { { name = 'flamethrower-ammo', count = math_random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'rocket-launcher', count = 1 }, weight = 5, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'explosive-rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'land-mine', count = math_random(8, 16) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'grenade', count = math_random(8, 16) }, weight = 10, evolution_min = 0.0, evolution_max = 0.5 }, - { { name = 'cluster-grenade', count = math_random(8, 16) }, weight = 5, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'firearm-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'piercing-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.1, evolution_max = 0.8 }, - { { name = 'uranium-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'railgun', count = 1 }, weight = 1, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'railgun-dart', count = math_random(16, 32) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'defender-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.0, evolution_max = 0.7 }, - { { name = 'distractor-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'destroyer-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'atomic-bomb', count = math_random(8, 16) }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'light-armor', count = 1 }, weight = 3, evolution_min = 0, evolution_max = 0.1 }, - { { name = 'heavy-armor', count = 1 }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'modular-armor', count = 1 }, weight = 2, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'power-armor', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'power-armor-mk2', count = 1 }, weight = 1, evolution_min = 0.8, evolution_max = 1 }, - { { name = 'battery-equipment', count = 1 }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, - { { name = 'battery-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, - { { name = 'belt-immunity-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'solar-panel-equipment', count = math_random(1, 4) }, weight = 5, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'discharge-defense-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 0.8 }, - { { name = 'energy-shield-equipment', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'energy-shield-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'fusion-reactor-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'night-vision-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'personal-laser-defense-equipment', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'iron-gear-wheel', count = math_random(80, 100) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'copper-cable', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'electric-engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.4, evolution_max = 0.8 }, - { { name = 'battery', count = math_random(100, 200) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'advanced-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'electronic-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'processing-unit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'explosives', count = math_random(25, 50) }, weight = 1, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'lubricant-barrel', count = math_random(4, 10) }, weight = 1, evolution_min = 0.3, evolution_max = 0.5 }, - { { name = 'rocket-fuel', count = math_random(4, 10) }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, - { { name = 'computer', count = 1 }, weight = 1, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'steel-plate', count = math_random(50, 100) }, weight = 2, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'nuclear-fuel', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'burner-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'long-handed-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, - { { name = 'fast-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 1, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'small-electric-pole', count = math_random(16, 32) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'medium-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 1 }, - { { name = 'big-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'substation', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'wooden-chest', count = math_random(25, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'iron-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 0.4 }, - { { name = 'steel-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'small-lamp', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'rail', count = math_random(50, 75) }, weight = 3, evolution_min = 0.1, evolution_max = 0.6 }, - { { name = 'assembling-machine-1', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'assembling-machine-2', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'assembling-machine-3', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'accumulator', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, - { { name = 'offshore-pump', count = math_random(1, 2) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'beacon', count = math_random(1, 2) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, - { { name = 'boiler', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'steam-engine', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.5 }, - { { name = 'steam-turbine', count = math_random(1, 2) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + local chest_loot = + { + { { name = 'submachine-gun', count = math_random(1, 3) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'slowdown-capsule', count = math_random(4, 8) }, weight = 1, evolution_min = 0.0, evolution_max = 1 }, + { { name = 'poison-capsule', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.7 }, + { { name = 'explosive-uranium-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'explosive-cannon-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.4, evolution_max = 0.8 }, + { { name = 'shotgun', count = 1 }, weight = 2, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'shotgun-shell', count = math_random(16, 32) }, weight = 5, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'combat-shotgun', count = 1 }, weight = 10, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'piercing-shotgun-shell', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'flamethrower', count = 1 }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, + { { name = 'flamethrower-ammo', count = math_random(16, 32) }, weight = 5, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'rocket-launcher', count = 1 }, weight = 5, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'explosive-rocket', count = math_random(16, 32) }, weight = 10, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'land-mine', count = math_random(8, 16) }, weight = 10, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'grenade', count = math_random(8, 16) }, weight = 10, evolution_min = 0.0, evolution_max = 0.5 }, + { { name = 'cluster-grenade', count = math_random(8, 16) }, weight = 5, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'firearm-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'piercing-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.1, evolution_max = 0.8 }, + { { name = 'uranium-rounds-magazine', count = math_random(32, 128) }, weight = 10, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'railgun', count = 1 }, weight = 1, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'railgun-dart', count = math_random(16, 32) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'defender-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.0, evolution_max = 0.7 }, + { { name = 'distractor-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'destroyer-capsule', count = math_random(8, 16) }, weight = 10, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'atomic-bomb', count = math_random(8, 16) }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'light-armor', count = 1 }, weight = 3, evolution_min = 0, evolution_max = 0.1 }, + { { name = 'heavy-armor', count = 1 }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'modular-armor', count = 1 }, weight = 2, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'power-armor', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'power-armor-mk2', count = 1 }, weight = 1, evolution_min = 0.8, evolution_max = 1 }, + { { name = 'battery-equipment', count = 1 }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, + { { name = 'battery-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.6, evolution_max = 1 }, + { { name = 'belt-immunity-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'solar-panel-equipment', count = math_random(1, 4) }, weight = 5, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'discharge-defense-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 0.8 }, + { { name = 'energy-shield-equipment', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'energy-shield-mk2-equipment', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'fusion-reactor-equipment', count = 1 }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'night-vision-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'personal-laser-defense-equipment', count = 1 }, weight = 2, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'exoskeleton-equipment', count = 1 }, weight = 1, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'iron-gear-wheel', count = math_random(80, 100) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'copper-cable', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'electric-engine-unit', count = math_random(16, 32) }, weight = 2, evolution_min = 0.4, evolution_max = 0.8 }, + { { name = 'battery', count = math_random(100, 200) }, weight = 2, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'advanced-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'electronic-circuit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, + { { name = 'processing-unit', count = math_random(100, 200) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'explosives', count = math_random(25, 50) }, weight = 1, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'lubricant-barrel', count = math_random(4, 10) }, weight = 1, evolution_min = 0.3, evolution_max = 0.5 }, + { { name = 'rocket-fuel', count = math_random(4, 10) }, weight = 2, evolution_min = 0.3, evolution_max = 0.7 }, + { { name = 'computer', count = 1 }, weight = 1, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'steel-plate', count = math_random(50, 100) }, weight = 2, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'nuclear-fuel', count = 1 }, weight = 2, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'burner-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, + { { name = 'long-handed-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.4 }, + { { name = 'fast-inserter', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 1, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'bulk-inserter', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'small-electric-pole', count = math_random(16, 32) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'medium-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.2, evolution_max = 1 }, + { { name = 'big-electric-pole', count = math_random(8, 16) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'substation', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'wooden-chest', count = math_random(25, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'iron-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.1, evolution_max = 0.4 }, + { { name = 'steel-chest', count = math_random(4, 8) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'small-lamp', count = math_random(8, 16) }, weight = 3, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'rail', count = math_random(50, 75) }, weight = 3, evolution_min = 0.1, evolution_max = 0.6 }, + { { name = 'assembling-machine-1', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'assembling-machine-2', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.8 }, + { { name = 'assembling-machine-3', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'accumulator', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 1 }, + { { name = 'offshore-pump', count = math_random(1, 2) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'beacon', count = math_random(1, 2) }, weight = 3, evolution_min = 0.7, evolution_max = 1 }, + { { name = 'boiler', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'steam-engine', count = math_random(2, 4) }, weight = 3, evolution_min = 0.0, evolution_max = 0.5 }, + { { name = 'steam-turbine', count = math_random(1, 2) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, --{{name = "nuclear-reactor", count = 1}, weight = 2, evolution_min = 0.5, evolution_max = 1}, - { { name = 'centrifuge', count = math_random(1, 2) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'heat-pipe', count = math_random(8, 12) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'heat-exchanger', count = math_random(2, 4) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'arithmetic-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'constant-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'decider-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'power-switch', count = math_random(2, 4) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'programmable-speaker', count = math_random(2, 4) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, - { { name = 'chemical-plant', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'burner-mining-drill', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, - { { name = 'electric-mining-drill', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 }, - { { name = 'express-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'express-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'express-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'fast-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'fast-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'fast-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.3 }, - { { name = 'transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, - { { name = 'oil-refinery', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 1 }, - { { name = 'pipe', count = math_random(40, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, - { { name = 'pipe-to-ground', count = math_random(8, 16) }, weight = 1, evolution_min = 0.2, evolution_max = 0.5 }, - { { name = 'pumpjack', count = math_random(1, 2) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'pump', count = math_random(1, 4) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, - { { name = 'solar-panel', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 0.9 }, - { { name = 'electric-furnace', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'steel-furnace', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'stone-furnace', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, - { { name = 'radar', count = math_random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 0.3 }, - { { name = 'rail-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'rail-chain-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, - { { name = 'stone-wall', count = math_random(25, 75) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'gate', count = math_random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, - { { name = 'storage-tank', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, - { { name = 'train-stop', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'express-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, - { { name = 'fast-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, - { { name = 'loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.0, evolution_max = 0.5 }, - { { name = 'lab', count = math_random(2, 4) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'centrifuge', count = math_random(1, 2) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'heat-pipe', count = math_random(8, 12) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'heat-exchanger', count = math_random(2, 4) }, weight = 2, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'arithmetic-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'constant-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'decider-combinator', count = math_random(8, 16) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'power-switch', count = math_random(2, 4) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'programmable-speaker', count = math_random(2, 4) }, weight = 1, evolution_min = 0.1, evolution_max = 1 }, + { { name = 'chemical-plant', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'burner-mining-drill', count = math_random(4, 8) }, weight = 3, evolution_min = 0.0, evolution_max = 0.2 }, + { { name = 'electric-mining-drill', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.6 }, + { { name = 'express-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'express-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'express-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'fast-transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'fast-underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'fast-splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.3 }, + { { name = 'transport-belt', count = math_random(25, 75) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'underground-belt', count = math_random(4, 8) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'splitter', count = math_random(2, 4) }, weight = 3, evolution_min = 0, evolution_max = 0.3 }, + { { name = 'oil-refinery', count = math_random(1, 2) }, weight = 2, evolution_min = 0.3, evolution_max = 1 }, + { { name = 'pipe', count = math_random(40, 50) }, weight = 3, evolution_min = 0.0, evolution_max = 0.3 }, + { { name = 'pipe-to-ground', count = math_random(8, 16) }, weight = 1, evolution_min = 0.2, evolution_max = 0.5 }, + { { name = 'pumpjack', count = math_random(1, 2) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'pump', count = math_random(1, 4) }, weight = 1, evolution_min = 0.3, evolution_max = 0.8 }, + { { name = 'solar-panel', count = math_random(4, 8) }, weight = 3, evolution_min = 0.4, evolution_max = 0.9 }, + { { name = 'electric-furnace', count = math_random(2, 4) }, weight = 3, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'steel-furnace', count = math_random(4, 8) }, weight = 3, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'stone-furnace', count = math_random(8, 16) }, weight = 3, evolution_min = 0.0, evolution_max = 0.1 }, + { { name = 'radar', count = math_random(1, 2) }, weight = 1, evolution_min = 0.1, evolution_max = 0.3 }, + { { name = 'rail-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, + { { name = 'rail-chain-signal', count = math_random(8, 16) }, weight = 2, evolution_min = 0.2, evolution_max = 0.8 }, + { { name = 'stone-wall', count = math_random(25, 75) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'gate', count = math_random(4, 8) }, weight = 1, evolution_min = 0.1, evolution_max = 0.5 }, + { { name = 'storage-tank', count = math_random(2, 4) }, weight = 3, evolution_min = 0.3, evolution_max = 0.6 }, + { { name = 'train-stop', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'express-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.5, evolution_max = 1 }, + { { name = 'fast-loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.2, evolution_max = 0.7 }, + { { name = 'loader', count = math_random(1, 2) }, weight = 1, evolution_min = 0.0, evolution_max = 0.5 }, + { { name = 'lab', count = math_random(2, 4) }, weight = 2, evolution_min = 0.0, evolution_max = 0.1 }, --{{name = "roboport", count = math_random(2,4)}, weight = 2, evolution_min = 0.6, evolution_max = 1}, --{{name = "flamethrower-turret", count = math_random(4,8)}, weight = 3, evolution_min = 0.5, evolution_max = 1}, --{{name = "laser-turret", count = math_random(4,8)}, weight = 3, evolution_min = 0.5, evolution_max = 1}, - { { name = 'gun-turret', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.9 } + { { name = 'gun-turret', count = math_random(2, 4) }, weight = 3, evolution_min = 0.2, evolution_max = 0.9 } } for _, t in pairs(chest_loot) do for x = 1, t.weight, 1 do - if t.evolution_min <= game.forces.enemy.evolution_factor and t.evolution_max >= game.forces.enemy.evolution_factor then + if t.evolution_min <= game.forces.enemy.get_evolution_factor(1) and t.evolution_max >= game.forces.enemy.get_evolution_factor(1) then table.insert(chest_raffle, t[1]) end end @@ -244,9 +245,9 @@ function spawn_market(surface, position) market.add_market_item({price = {{"uranium-ore", 25}}, offer = {type = 'give-item', item = 'coin', count = 5}}) market.add_market_item({price = {{'coin', 1}}, offer = {type = 'give-item', item = "wood", count = 50}}) ]] - market.add_market_item({ price = { { 'coin', 2 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }) - market.add_market_item({ price = { { 'coin', 10 } }, offer = { type = 'give-item', item = 'grenade', count = 1 } }) - market.add_market_item({ price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'firearm-magazine', count = 1 } }) - market.add_market_item({ price = { { 'coin', 16 } }, offer = { type = 'give-item', item = 'submachine-gun', count = 1 } }) - market.add_market_item({ price = { { 'coin', 64 } }, offer = { type = 'give-item', item = 'car', count = 1 } }) + market.add_market_item({ price = { { name = 'coin', count = 2 } }, offer = { type = 'give-item', item = 'raw-fish', count = 1 } }) + market.add_market_item({ price = { { name = 'coin', count = 10 } }, offer = { type = 'give-item', item = 'grenade', count = 1 } }) + market.add_market_item({ price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'firearm-magazine', count = 1 } }) + market.add_market_item({ price = { { name = 'coin', count = 16 } }, offer = { type = 'give-item', item = 'submachine-gun', count = 1 } }) + market.add_market_item({ price = { { name = 'coin', count = 64 } }, offer = { type = 'give-item', item = 'car', count = 1 } }) end diff --git a/maps/stone_maze/main.lua b/maps/stone_maze/main.lua index 8caf4fd14..93c5278cd 100644 --- a/maps/stone_maze/main.lua +++ b/maps/stone_maze/main.lua @@ -1,5 +1,10 @@ --luacheck: ignore --optionals + +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + require 'modules.satellite_score' require 'modules.dangerous_goods' require 'modules.spawners_contain_biters' @@ -18,11 +23,11 @@ require 'utils.table' require 'maps.stone_maze.global_functions' -local event = require 'utils.event' -local table_insert = table.insert +local Event = require 'utils.event' local math_random = math.random -local disabled_for_deconstruction = { +local disabled_for_deconstruction = +{ ['fish'] = true, ['huge-rock'] = true, ['big-rock'] = true, @@ -40,7 +45,8 @@ grid_size = 24 --manual_mining_speed_modifier = 1 main_ground_tile = 'dirt-3' rock_raffle = { 'huge-rock', 'big-rock', 'big-rock', 'big-rock' } -tree_raffle = { +tree_raffle = +{ 'tree-01', 'tree-02', 'tree-03', @@ -63,7 +69,8 @@ tree_raffle = { 'dead-grey-trunk' } -local visited_tile_translation = { +local visited_tile_translation = +{ --["dirt-7"] = "grass-2", ['dirt-3'] = 'dirt-7', ['dirt-5'] = 'dirt-7' @@ -107,7 +114,7 @@ local function increase_depth() if evo > 1 then evo = 1 end - game.forces.enemy.evolution_factor = evo + game.forces.enemy.set_evolution_factor(evo, game.surfaces.nauvis) end local function coord_to_string(pos) @@ -122,8 +129,10 @@ local function coord_to_string(pos) return tostring(x .. '_' .. y) end -local cells = { - ['2x2'] = { +local cells = +{ + ['2x2'] = + { size_x = 2, size_y = 2, ['0_-1'] = { { -1, -1 }, { 0, -1 } }, @@ -131,7 +140,8 @@ local cells = { ['-1_0'] = { { -1, -1 }, { -1, 0 } }, ['1_0'] = { { 0, 0 }, { 0, -1 } } }, - ['3x3'] = { + ['3x3'] = + { size_x = 3, size_y = 3, ['0_-1'] = { { -2, -2 }, { -1, -2 }, { 0, -2 } }, @@ -141,7 +151,8 @@ local cells = { } } -local cells_1x1 = { +local cells_1x1 = +{ --["0_-1"] = {core = {{0, 0}}, border = {{-1, 0}, {1, 0}, {-1, -1}, {1, -1}, {0, -1}}}, --["0_1"] = {core = {{0, 0}}, border = {{-1, 0}, {1, 0}, {1, 1}, {-1, 1}, {0, 1}}}, --["-1_0"] = {core = {{0, 0}}, border = {{-1, 0}, {-1, -1}, {-1, 1}, {0, -1}, {0, 1}}}, @@ -165,8 +176,8 @@ end local function get_chunk_position(position) local chunk_position = {} - position.x = math.floor(position.x, 0) - position.y = math.floor(position.y, 0) + position.x = math.floor(position.x) + position.y = math.floor(position.y) for x = 0, 31, 1 do if (position.x - x) % 32 == 0 then chunk_position.x = (position.x - x) / 32 @@ -273,7 +284,8 @@ local function can_1x1_expand(cell_position, direction) return true end -local multi_cell_chances = { +local multi_cell_chances = +{ '3x3', '2x2', '2x2', @@ -379,7 +391,6 @@ end local function on_chunk_generated(event) local surface = event.surface local left_top = event.area.left_top - local tiles = {} if left_top.x == 0 and left_top.y == 0 then for x = 0, 31, 1 do @@ -418,11 +429,6 @@ local function on_player_joined_game(event) draw_depth_gui() end ---local function on_research_finished(event) ---if not event.research.force.technologies["steel-axe"].researched then return end ---event.research.force.manual_mining_speed_modifier = manual_mining_speed_modifier + 2 ---end - local function on_marked_for_deconstruction(event) if disabled_for_deconstruction[event.entity.name] then event.entity.cancel_deconstruction(game.players[event.player_index].force.name) @@ -432,14 +438,15 @@ local function on_marked_for_deconstruction(event) end end -local function on_init(event) +local function on_init() storage.maze_cells = {} storage.maze_depth = 0 - storage.enemy_appearances = { - { biter = 'small-biter', spitter = 'small-spitter', worm = 'small-worm-turret', ammo = 'firearm-magazine', chance = 100 }, - { biter = 'medium-biter', spitter = 'medium-spitter', worm = 'medium-worm-turret', ammo = 'piercing-rounds-magazine', chance = 0 }, - { biter = 'big-biter', spitter = 'big-spitter', worm = 'big-worm-turret', ammo = 'uranium-rounds-magazine', chance = 0 }, - { biter = 'behemoth-biter', spitter = 'behemoth-spitter', worm = 'behemoth-worm-turret', ammo = 'uranium-rounds-magazine', chance = 0 } + storage.enemy_appearances = + { + { biter = 'small-biter', spitter = 'small-spitter', worm = 'small-worm-turret', ammo = 'firearm-magazine', chance = 100 }, + { biter = 'medium-biter', spitter = 'medium-spitter', worm = 'medium-worm-turret', ammo = 'piercing-rounds-magazine', chance = 0 }, + { biter = 'big-biter', spitter = 'big-spitter', worm = 'big-worm-turret', ammo = 'uranium-rounds-magazine', chance = 0 }, + { biter = 'behemoth-biter', spitter = 'behemoth-spitter', worm = 'behemoth-worm-turret', ammo = 'uranium-rounds-magazine', chance = 0 } } game.forces['player'].set_spawn_position({ x = 2, y = 2 }, game.surfaces.nauvis) @@ -450,9 +457,8 @@ local function on_init(event) game.map_settings.enemy_evolution.pollution_factor = 0 end -event.on_init(on_init) -event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction) -event.add(defines.events.on_player_changed_position, on_player_changed_position) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_chunk_generated, on_chunk_generated) ---event.add(defines.events.on_research_finished, on_research_finished) +Event.on_init(on_init) +Event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction) +Event.add(defines.events.on_player_changed_position, on_player_changed_position) +Event.add(defines.events.on_player_joined_game, on_player_joined_game) +Event.add(defines.events.on_chunk_generated, on_chunk_generated) diff --git a/maps/tank_battles_old.lua b/maps/tank_battles_old.lua deleted file mode 100644 index 028d57677..000000000 --- a/maps/tank_battles_old.lua +++ /dev/null @@ -1,609 +0,0 @@ ---luacheck: ignore ---tank battles (royale)-- mewmew made this -- - -local event = require 'utils.event' -local table_insert = table.insert -local math_random = math.random -local map_functions = require 'utils.tools.map_functions' -local arena_size = 160 - -local function shuffle(tbl) - local size = #tbl - for i = size, 1, -1 do - local rand = math.random(size) - tbl[i], tbl[rand] = tbl[rand], tbl[i] - end - return tbl -end - -local function create_tank_battle_score_gui() - for _, player in pairs(game.connected_players) do - if player.gui.left['tank_battle_score'] then - player.gui.left['tank_battle_score'].destroy() - end - local frame = player.gui.left.add({ type = 'frame', name = 'tank_battle_score', direction = 'vertical' }) - - local l = frame.add({ type = 'label', caption = 'Won rounds' }) - l.style.font_color = { r = 0.98, g = 0.66, b = 0.22 } - l.style.font = 'default-listbox' - - local t = frame.add({ type = 'table', column_count = 2 }) - - local scores = {} - for _, player in pairs(game.connected_players) do - if storage.tank_battles_score[player.index] then - table_insert(scores, { name = player.name, score = storage.tank_battles_score[player.index] }) - end - end - - for x = 1, #scores, 1 do - for y = 1, #scores, 1 do - if not scores[y + 1] then - break - end - if scores[y]['score'] < scores[y + 1]['score'] then - local key = scores[y] - scores[y] = scores[y + 1] - scores[y + 1] = key - end - end - end - - for i = 1, 8, 1 do - if scores[i] then - local l = t.add({ type = 'label', caption = scores[i].name }) - local color = game.players[scores[i].name].color - color = { r = color.r * 0.6 + 0.4, g = color.g * 0.6 + 0.4, b = color.b * 0.6 + 0.4, a = 1 } - l.style.font_color = color - l.style.font = 'default-bold' - t.add({ type = 'label', caption = scores[i].score }) - end - end - end -end - -local loot = { - --{{name = "submachine-gun", count = 1}, weight = 2}, - --{{name = "combat-shotgun", count = 1}, weight = 2}, - --{{name = "flamethrower", count = 1}, weight = 1}, - --{{name = "rocket-launcher", count = 1}, weight = 2}, - - { { name = 'flamethrower-ammo', count = 16 }, weight = 2 }, - { { name = 'piercing-shotgun-shell', count = 16 }, weight = 2 }, - --{{name = "piercing-rounds-magazine", count = 16}, weight = 2}, - --{{name = "uranium-rounds-magazine", count = 8}, weight = 1}, - { { name = 'explosive-rocket', count = 8 }, weight = 2 }, - { { name = 'rocket', count = 8 }, weight = 2 }, - { { name = 'grenade', count = 16 }, weight = 2 }, - { { name = 'cluster-grenade', count = 8 }, weight = 2 }, - --{{name = "poison-capsule", count = 4}, weight = 1}, - { { name = 'defender-capsule', count = 6 }, weight = 1 }, - { { name = 'distractor-capsule', count = 3 }, weight = 1 }, - --{{name = "destroyer-capsule", count = 1}, weight = 1}, - - { { name = 'cannon-shell', count = 8 }, weight = 16 }, - { { name = 'explosive-cannon-shell', count = 8 }, weight = 16 }, - { { name = 'uranium-cannon-shell', count = 8 }, weight = 6 }, - { { name = 'explosive-uranium-cannon-shell', count = 8 }, weight = 6 }, - --{{name = "light-armor", count = 1}, weight = 5}, - --{{name = "heavy-armor", count = 1}, weight = 2}, - { { name = 'modular-armor', count = 1 }, weight = 3 }, - { { name = 'power-armor', count = 1 }, weight = 2 }, - { { name = 'power-armor-mk2', count = 1 }, weight = 1 }, - --{{name = "battery-mk2-equipment", count = 1}, weight = 2}, - { { name = 'energy-shield-equipment', count = 1 }, weight = 2 }, - { { name = 'exoskeleton-equipment', count = 1 }, weight = 2 }, - { { name = 'fusion-reactor-equipment', count = 1 }, weight = 2 }, - { { name = 'repair-pack', count = 1 }, weight = 6 }, - { { name = 'coal', count = 16 }, weight = 3 }, - --{{name = "solid-fuel", count = 8}, weight = 2}, - { { name = 'nuclear-fuel', count = 1 }, weight = 1 }, - { { name = 'gate', count = 16 }, weight = 2 }, - { { name = 'stone-wall', count = 16 }, weight = 2 } -} -local loot_raffle = {} -for _, item in pairs(loot) do - for x = 1, item.weight, 1 do - table.insert(loot_raffle, item[1]) - end -end - -local function get_valid_random_spawn_position(surface) - local chunks = {} - for chunk in surface.get_chunks() do - table_insert(chunks, { x = chunk.x, y = chunk.y }) - end - chunks = shuffle(chunks) - - for _, chunk in pairs(chunks) do - if chunk.x * 32 < arena_size and chunk.y * 32 < arena_size and chunk.x * 32 >= arena_size * -1 and chunk.y * 32 >= arena_size * -1 then - local area = { { chunk.x * 32 - 64, chunk.y * 32 - 64 }, { chunk.x * 32 + 64, chunk.y * 32 + 64 } } - if surface.count_entities_filtered({ name = 'tank', area = area }) == 0 then - local pos = surface.find_non_colliding_position('tank', { chunk.x * 32 + 16, chunk.y * 32 + 16 }, 16, 8) - return pos - end - end - end - - local pos = surface.find_non_colliding_position('tank', { 0, 0 }, 32, 4) - if pos then - return pos - end - - return { 0, 0 } -end - -local function put_players_into_arena() - for _, player in pairs(game.connected_players) do - local permissions_group = game.permissions.get_group('Default') - permissions_group.add_player(player.name) - - player.character.destroy() - player.character = nil - player.create_character() - - player.insert({ name = 'combat-shotgun', count = 1 }) - player.insert({ name = 'rocket-launcher', count = 1 }) - player.insert({ name = 'flamethrower', count = 1 }) - --player.insert({name = "firearm-magazine", count = 512}) - - local surface = game.surfaces['tank_battles'] - local pos = get_valid_random_spawn_position(surface) - - player.teleport(pos, surface) - local tank = surface.create_entity({ name = 'tank', force = game.forces[player.index], position = pos }) - tank.insert({ name = 'coal', count = 24 }) - tank.insert({ name = 'cannon-shell', count = 16 }) - tank.set_driver(player) - end -end - -function create_new_arena() - local map_gen_settings = {} - map_gen_settings.seed = math_random(1, 2097152) - map_gen_settings.water = 'none' - map_gen_settings.cliff_settings = { cliff_elevation_interval = 4, cliff_elevation_0 = 0.1 } - map_gen_settings.autoplace_controls = { - ['coal'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['stone'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['copper-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['iron-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['crude-oil'] = { frequency = 'none', size = 'none', richness = 'none' }, - ['trees'] = { frequency = 'normal', size = 'normal', richness = 'normal' }, - ['enemy-base'] = { frequency = 'none', size = 'none', richness = 'none' } - } - game.create_surface('tank_battles', map_gen_settings) - local surface = game.surfaces['tank_battles'] - surface.request_to_generate_chunks({ 0, 0 }, math.ceil(arena_size / 32) + 2) - surface.force_generate_chunk_requests() - surface.daytime = 1 - surface.freeze_daytime = 1 - - storage.current_arena_size = arena_size - - put_players_into_arena() - - storage.game_stage = 'ongoing_game' -end - -local function set_unique_player_force(player) - if not game.forces[player.index] then - game.create_force(player.index) - game.forces[player.index].technologies['follower-robot-count-1'].researched = true - game.forces[player.index].technologies['follower-robot-count-2'].researched = true - game.forces[player.index].technologies['follower-robot-count-3'].researched = true - game.forces[player.index].technologies['follower-robot-count-4'].researched = true - game.forces[player.index].technologies['follower-robot-count-5'].researched = true - end - player.force = game.forces[player.index] -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - - set_unique_player_force(player) - - if not storage.map_init_done then - local spectator_permission_group = game.permissions.create_group('Spectator') - for action_name, _ in pairs(defines.input_action) do - spectator_permission_group.set_allows_action(defines.input_action[action_name], false) - end - spectator_permission_group.set_allows_action(defines.input_action.write_to_console, true) - spectator_permission_group.set_allows_action(defines.input_action.gui_click, true) - spectator_permission_group.set_allows_action(defines.input_action.gui_selection_state_changed, true) - spectator_permission_group.set_allows_action(defines.input_action.start_walking, true) - spectator_permission_group.set_allows_action(defines.input_action.open_kills_gui, true) - spectator_permission_group.set_allows_action(defines.input_action.open_character_gui, true) - --spectator_permission_group.set_allows_action(defines.input_action.open_equipment_gui, true) - spectator_permission_group.set_allows_action(defines.input_action.edit_permission_group, true) - spectator_permission_group.set_allows_action(defines.input_action.toggle_show_entity_info, true) - - storage.tank_battles_score = {} - storage.game_stage = 'lobby' - - storage.map_init_done = true - end - - if #storage.tank_battles_score > 0 then - create_tank_battle_score_gui() - end - - if game.surfaces['tank_battles'] then - player.character.destroy() - player.character = nil - local permissions_group = game.permissions.get_group('Spectator') - permissions_group.add_player(player.name) - player.teleport({ 0, 0 }, game.surfaces['tank_battles']) - end - - if not game.surfaces['tank_battles'] then - player.character.destroy() - player.character = nil - if storage.lobby_timer then - storage.lobby_timer = 1800 - end - if player.online_time < 1 then - player.insert({ name = 'concrete', count = 500 }) - player.insert({ name = 'hazard-concrete', count = 500 }) - player.insert({ name = 'stone-brick', count = 500 }) - player.insert({ name = 'refined-concrete', count = 500 }) - player.insert({ name = 'refined-hazard-concrete', count = 500 }) - end - return - end -end - -local function on_marked_for_deconstruction(event) - event.entity.cancel_deconstruction(game.players[event.player_index].force.name) -end - -function shrink_arena() - local surface = game.surfaces['tank_battles'] - - if storage.current_arena_size < 0 then - return - end - - local shrink_width = 8 - local current_arena_size = storage.current_arena_size - local tiles = {} - - for x = arena_size * -1, arena_size, 1 do - for y = current_arena_size * -1 - shrink_width, current_arena_size * -1, 1 do - local pos = { x = x, y = y } - if surface.get_tile(pos).name ~= 'water' and surface.get_tile(pos).name ~= 'deepwater' then - if x > current_arena_size or y > current_arena_size or x < current_arena_size * -1 or y < current_arena_size * -1 then - if math_random(1, 3) ~= 1 then - table_insert(tiles, { name = 'water', position = pos }) - end - end - end - end - end - - for x = arena_size * -1, arena_size, 1 do - for y = current_arena_size, current_arena_size + shrink_width, 1 do - local pos = { x = x, y = y } - if surface.get_tile(pos).name ~= 'water' and surface.get_tile(pos).name ~= 'deepwater' then - if x > current_arena_size or y > current_arena_size or x < current_arena_size * -1 or y < current_arena_size * -1 then - if math_random(1, 3) ~= 1 then - table_insert(tiles, { name = 'water', position = pos }) - end - end - end - end - end - - for x = current_arena_size * -1 - shrink_width, current_arena_size * -1, 1 do - for y = arena_size * -1, arena_size, 1 do - local pos = { x = x, y = y } - if surface.get_tile(pos).name ~= 'water' and surface.get_tile(pos).name ~= 'deepwater' then - if x > current_arena_size or y > current_arena_size or x < current_arena_size * -1 or y < current_arena_size * -1 then - if math_random(1, 3) ~= 1 then - table_insert(tiles, { name = 'water', position = pos }) - end - end - end - end - end - - for x = current_arena_size, current_arena_size + shrink_width, 1 do - for y = arena_size * -1, arena_size, 1 do - local pos = { x = x, y = y } - if surface.get_tile(pos).name ~= 'water' and surface.get_tile(pos).name ~= 'deepwater' then - if x > current_arena_size or y > current_arena_size or x < current_arena_size * -1 or y < current_arena_size * -1 then - if math_random(1, 3) ~= 1 then - table_insert(tiles, { name = 'water', position = pos }) - end - end - end - end - end - - storage.current_arena_size = storage.current_arena_size - 1 - - surface.set_tiles(tiles, true) -end - -local function render_arena_chunk(event) - if event.surface.name ~= 'tank_battles' then - return - end - local surface = event.surface - - local left_top = event.area.left_top - - local tiles = {} - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - if pos.x > arena_size or pos.y > arena_size or pos.x < arena_size * -1 or pos.y < arena_size * -1 then - table_insert(tiles, { name = 'water', position = pos }) - else - if math_random(1, 256) == 1 then - if surface.can_place_entity({ name = 'wooden-chest', position = pos, force = 'enemy' }) then - surface.create_entity({ name = 'wooden-chest', position = pos, force = 'enemy' }) - end - end - if math_random(1, 1024) == 1 then - if math_random(1, 64) == 1 then - if surface.can_place_entity({ name = 'assembling-machine-1', position = pos, force = 'enemy' }) then - surface.create_entity({ name = 'assembling-machine-1', position = pos, force = 'enemy' }) - end - end - if math_random(1, 64) == 1 then - if surface.can_place_entity({ name = 'big-worm-turret', position = pos, force = 'enemy' }) then - surface.create_entity({ name = 'big-worm-turret', position = pos, force = 'enemy' }) - end - end - if math_random(1, 32) == 1 then - if surface.can_place_entity({ name = 'medium-worm-turret', position = pos, force = 'enemy' }) then - surface.create_entity({ name = 'medium-worm-turret', position = pos, force = 'enemy' }) - end - end - if math_random(1, 512) == 1 then - if surface.can_place_entity({ name = 'behemoth-biter', position = pos, force = 'enemy' }) then - surface.create_entity({ name = 'behemoth-biter', position = pos, force = 'enemy' }) - end - end - if math_random(1, 64) == 1 then - if surface.can_place_entity({ name = 'big-biter', position = pos, force = 'enemy' }) then - surface.create_entity({ name = 'big-biter', position = pos, force = 'enemy' }) - end - end - end - end - end - end - surface.set_tiles(tiles, true) -end - -local function render_spawn_chunk(event) - if event.surface.name ~= 'nauvis' then - return - end - local surface = event.surface - local left_top = event.area.left_top - - for _, entity in pairs(surface.find_entities_filtered({ area = event.area })) do - if entity.name ~= 'character' then - entity.destroy() - end - end - - local tiles = {} - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local pos = { x = left_top.x + x, y = left_top.y + y } - table_insert(tiles, { name = 'grass-2', position = pos }) - end - end - surface.set_tiles(tiles, true) -end - -local function kill_idle_players() - for _, player in pairs(game.connected_players) do - if player.character then - if player.afk_time > 600 then - local area = { { player.position.x - 1, player.position.y - 1 }, { player.position.x + 1, player.position.y + 1 } } - local water_tile_count = player.surface.count_tiles_filtered({ name = { 'water', 'deepwater' }, area = area }) - if water_tile_count > 3 then - player.character.die() - game.print(player.name .. ' drowned.', { r = 150, g = 150, b = 0 }) - else - if player.afk_time > 9000 then - player.character.die() - game.print(player.name .. ' was idle for too long.', { r = 150, g = 150, b = 0 }) - end - end - end - end - end -end - -local function check_for_game_over() - local surface = game.surfaces['tank_battles'] - - kill_idle_players() - - local alive_players = 0 - for _, player in pairs(game.connected_players) do - if player.character and player.surface.name == 'tank_battles' then - alive_players = alive_players + 1 - end - end - - if alive_players > 1 then - return - end ----------------- - - local player - for _, p in pairs(game.connected_players) do - if p.character and p.surface.name == 'tank_battles' then - player = p - end - end - - if alive_players == 1 then - if not storage.tank_battles_score[player.index] then - storage.tank_battles_score[player.index] = 1 - else - storage.tank_battles_score[player.index] = storage.tank_battles_score[player.index] + 1 - end - game.print(player.name .. ' has won the battle!', { r = 150, g = 150, b = 0 }) - create_tank_battle_score_gui() - end - - if alive_players == 0 then - game.print('No alive players! Round ends in a draw!', { r = 150, g = 150, b = 0 }) - end - - storage.game_stage = 'lobby' -end - -local function on_chunk_generated(event) - render_arena_chunk(event) - render_spawn_chunk(event) -end - -local function on_player_respawned(event) - local player = game.players[event.player_index] - - local permissions_group = game.permissions.get_group('Spectator') - permissions_group.add_player(player.name) - player.character.destroy() - player.character = nil -end - -local function lobby() - if game.surfaces['tank_battles'] then - game.delete_surface(game.surfaces['tank_battles']) - for _, player in pairs(game.connected_players) do - if player.character then - player.character.destroy() - player.character = nil - end - end - end - - local connected_players_count = 0 - local permissions_group = game.permissions.get_group('Default') - - for _, player in pairs(game.connected_players) do - permissions_group.add_player(player.name) - if not player.character and player.ticks_to_respawn == nil then - player.create_character() - local pos = player.surface.find_non_colliding_position('character', { 0, 0 }, 16, 3) - player.insert({ name = 'concrete', count = 500 }) - player.insert({ name = 'hazard-concrete', count = 500 }) - player.insert({ name = 'stone-brick', count = 500 }) - player.insert({ name = 'refined-concrete', count = 500 }) - player.insert({ name = 'refined-hazard-concrete', count = 500 }) - player.teleport({ math_random(1, 32), math_random(1, 32) }, game.surfaces[1]) - end - connected_players_count = connected_players_count + 1 - end - - if connected_players_count < 2 then - --game.print("Waiting for players.", {r = 0, g = 150, b = 150}) - return - end - - if not storage.lobby_timer then - storage.lobby_timer = 1800 - end - if storage.lobby_timer % 600 == 0 then - if storage.lobby_timer <= 0 then - game.print('Round has started!', { r = 0, g = 150, b = 150 }) - else - game.print('Round will begin in ' .. storage.lobby_timer / 60 .. ' seconds.', { r = 0, g = 150, b = 150 }) - end - end - storage.lobby_timer = storage.lobby_timer - 300 - if storage.lobby_timer >= 0 then - return - end - storage.lobby_timer = nil - storage.game_stage = 'create_arena' -end - -local function on_tick(event) - if game.tick % 300 == 0 then - if storage.game_stage == 'lobby' then - lobby() - end - if storage.game_stage == 'create_arena' then - create_new_arena() - end - if storage.game_stage == 'ongoing_game' then - shrink_arena() - check_for_game_over() - end - end -end - -local function on_entity_died(event) - if event.entity.name == 'wooden-chest' then - local loot = loot_raffle[math_random(1, #loot_raffle)] - event.entity.surface.spill_item_stack(event.entity.position, loot, true) - --event.entity.surface.create_entity({name = "flying-text", position = event.entity.position, text = loot.name, color = {r=0.98, g=0.66, b=0.22}}) - end -end - -local function on_player_died(event) - local player = game.players[event.player_index] - local str = ' ' - if event.cause then - if event.cause.name ~= nil then - str = ' by ' .. event.cause.name - end - if event.cause.name == 'character' then - str = ' by ' .. event.cause.player.name - end - if event.cause.name == 'tank' then - local driver = event.cause.get_driver() - if driver.player then - str = ' by ' .. driver.player.name - end - end - end - for _, target_player in pairs(game.connected_players) do - if target_player.name ~= player.name then - player.print(player.name .. ' was killed' .. str, { r = 0.99, g = 0.0, b = 0.0 }) - end - end -end - -----------share chat with player and spectator force------------------- -local function on_console_chat(event) - if not event.message then - return - end - if not event.player_index then - return - end - local player = game.players[event.player_index] - - local color = {} - color = player.color - color.r = color.r * 0.6 + 0.35 - color.g = color.g * 0.6 + 0.35 - color.b = color.b * 0.6 + 0.35 - color.a = 1 - - for _, target_player in pairs(game.connected_players) do - if target_player.name ~= player.name then - target_player.print(player.name .. ': ' .. event.message, color) - end - end -end - -event.add(defines.events.on_tick, on_tick) -event.add(defines.events.on_console_chat, on_console_chat) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_entity_damaged, on_entity_damaged) -event.add(defines.events.on_player_died, on_player_died) -event.add(defines.events.on_marked_for_deconstruction, on_marked_for_deconstruction) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_player_respawned, on_player_respawned) -event.add(defines.events.on_chunk_generated, on_chunk_generated) diff --git a/maps/tank_conquest/blueprint_poi_base_json.lua b/maps/tank_conquest/blueprint_poi_base_json.lua deleted file mode 100644 index 2b510f475..000000000 --- a/maps/tank_conquest/blueprint_poi_base_json.lua +++ /dev/null @@ -1 +0,0 @@ -return '{"blueprint":{"icons":[{"signal":{"type":"item","name":"land-mine"},"index":1},{"signal":{"type":"item","name":"stone-wall"},"index":2}],"entities":[{"entity_number":1,"name":"land-mine","position":{"x":-19.30078125,"y":-22.3046875}},{"entity_number":2,"name":"stone-wall","position":{"x":-19,"y":-23}},{"entity_number":3,"name":"land-mine","position":{"x":-18.0703125,"y":-23}},{"entity_number":4,"name":"stone-wall","position":{"x":-18,"y":-24}},{"entity_number":5,"name":"land-mine","position":{"x":-16.21484375,"y":-22.91015625}},{"entity_number":6,"name":"stone-wall","position":{"x":-17,"y":-23}},{"entity_number":7,"name":"stone-wall","position":{"x":-16,"y":-24}},{"entity_number":8,"name":"stone-wall","position":{"x":-15,"y":-23}},{"entity_number":9,"name":"land-mine","position":{"x":-14.0625,"y":-23.1171875}},{"entity_number":10,"name":"stone-wall","position":{"x":-14,"y":-24}},{"entity_number":11,"name":"stone-wall","position":{"x":-13,"y":-23}},{"entity_number":12,"name":"stone-wall","position":{"x":-11,"y":-23}},{"entity_number":13,"name":"stone-wall","position":{"x":-7,"y":-23}},{"entity_number":14,"name":"stone-wall","position":{"x":-5,"y":-23}},{"entity_number":15,"name":"stone-wall","position":{"x":5,"y":-23}},{"entity_number":16,"name":"land-mine","position":{"x":6.296875,"y":-23.1328125}},{"entity_number":17,"name":"land-mine","position":{"x":7.734375,"y":-23.1328125}},{"entity_number":18,"name":"stone-wall","position":{"x":7,"y":-23}},{"entity_number":19,"name":"land-mine","position":{"x":8.80859375,"y":-22.2890625}},{"entity_number":20,"name":"stone-wall","position":{"x":8,"y":-24}},{"entity_number":21,"name":"stone-wall","position":{"x":9,"y":-23}},{"entity_number":22,"name":"stone-wall","position":{"x":10,"y":-24}},{"entity_number":23,"name":"land-mine","position":{"x":10.98828125,"y":-22.1328125}},{"entity_number":24,"name":"land-mine","position":{"x":11.859375,"y":-22.87890625}},{"entity_number":25,"name":"stone-wall","position":{"x":11,"y":-23}},{"entity_number":26,"name":"stone-wall","position":{"x":12,"y":-24}},{"entity_number":27,"name":"stone-wall","position":{"x":13,"y":-23}},{"entity_number":28,"name":"land-mine","position":{"x":13.91015625,"y":-22.87890625}},{"entity_number":29,"name":"stone-wall","position":{"x":14,"y":-24}},{"entity_number":30,"name":"land-mine","position":{"x":15.296875,"y":-22.2890625}},{"entity_number":31,"name":"stone-wall","position":{"x":15,"y":-23}},{"entity_number":32,"name":"land-mine","position":{"x":16.16796875,"y":-22.75}},{"entity_number":33,"name":"stone-wall","position":{"x":16,"y":-24}},{"entity_number":34,"name":"stone-wall","position":{"x":17,"y":-23}},{"entity_number":35,"name":"land-mine","position":{"x":18.19921875,"y":-22.69921875}},{"entity_number":36,"name":"land-mine","position":{"x":-21.203125,"y":-20.23828125}},{"entity_number":37,"name":"stone-wall","position":{"x":-21,"y":-21}},{"entity_number":38,"name":"land-mine","position":{"x":-19.8125,"y":-20.98046875}},{"entity_number":39,"name":"stone-wall","position":{"x":-20,"y":-22}},{"entity_number":40,"name":"land-mine","position":{"x":-18.2578125,"y":-21.23828125}},{"entity_number":41,"name":"stone-wall","position":{"x":-19,"y":-21}},{"entity_number":42,"name":"stone-wall","position":{"x":-18,"y":-22}},{"entity_number":43,"name":"land-mine","position":{"x":-16.81640625,"y":-22.00390625}},{"entity_number":44,"name":"land-mine","position":{"x":-16.19921875,"y":-20.75}},{"entity_number":45,"name":"stone-wall","position":{"x":-17,"y":-21}},{"entity_number":46,"name":"stone-wall","position":{"x":-16,"y":-22}},{"entity_number":47,"name":"land-mine","position":{"x":-14.828125,"y":-22.05078125}},{"entity_number":48,"name":"stone-wall","position":{"x":-15,"y":-21}},{"entity_number":49,"name":"land-mine","position":{"x":-13.11328125,"y":-20.21484375}},{"entity_number":50,"name":"land-mine","position":{"x":-14.0859375,"y":-20.95703125}},{"entity_number":51,"name":"stone-wall","position":{"x":-14,"y":-22}},{"entity_number":52,"name":"stone-wall","position":{"x":-13,"y":-21}},{"entity_number":53,"name":"land-mine","position":{"x":-11.6953125,"y":-21.28515625}},{"entity_number":54,"name":"stone-wall","position":{"x":-12,"y":-22}},{"entity_number":55,"name":"land-mine","position":{"x":-10.8125,"y":-21.91015625}},{"entity_number":56,"name":"land-mine","position":{"x":-10.71875,"y":-20.12109375}},{"entity_number":57,"name":"stone-wall","position":{"x":-11,"y":-21}},{"entity_number":58,"name":"land-mine","position":{"x":-9.1640625,"y":-20.30859375}},{"entity_number":59,"name":"stone-wall","position":{"x":-10,"y":-22}},{"entity_number":60,"name":"stone-wall","position":{"x":-9,"y":-21}},{"entity_number":61,"name":"land-mine","position":{"x":-7.98046875,"y":-20.8203125}},{"entity_number":62,"name":"land-mine","position":{"x":-7.12109375,"y":-21.88671875}},{"entity_number":63,"name":"stone-wall","position":{"x":-8,"y":-22}},{"entity_number":64,"name":"land-mine","position":{"x":-7.07421875,"y":-20.28515625}},{"entity_number":65,"name":"stone-wall","position":{"x":-7,"y":-21}},{"entity_number":66,"name":"stone-wall","position":{"x":-6,"y":-22}},{"entity_number":67,"name":"stone-wall","position":{"x":-5,"y":-21}},{"entity_number":68,"name":"land-mine","position":{"x":-2.1640625,"y":-21.84375}},{"entity_number":69,"name":"land-mine","position":{"x":-3.0390625,"y":-21.84375}},{"entity_number":70,"name":"land-mine","position":{"x":-0.8515625,"y":-21.875}},{"entity_number":71,"name":"land-mine","position":{"x":1.4609375,"y":-21.78125}},{"entity_number":72,"name":"land-mine","position":{"x":-0.0390625,"y":-21.84375}},{"entity_number":73,"name":"land-mine","position":{"x":3.765625,"y":-21.73828125}},{"entity_number":74,"name":"land-mine","position":{"x":2.4609375,"y":-21.78125}},{"entity_number":75,"name":"stone-wall","position":{"x":5,"y":-21}},{"entity_number":76,"name":"land-mine","position":{"x":6.296875,"y":-21.18359375}},{"entity_number":77,"name":"land-mine","position":{"x":6.734375,"y":-20.2890625}},{"entity_number":78,"name":"stone-wall","position":{"x":6,"y":-22}},{"entity_number":79,"name":"land-mine","position":{"x":6.9140625,"y":-22.08203125}},{"entity_number":80,"name":"stone-wall","position":{"x":7,"y":-21}},{"entity_number":81,"name":"land-mine","position":{"x":8.22265625,"y":-21.16015625}},{"entity_number":82,"name":"stone-wall","position":{"x":8,"y":-22}},{"entity_number":83,"name":"stone-wall","position":{"x":9,"y":-21}},{"entity_number":84,"name":"land-mine","position":{"x":9.9140625,"y":-21.2890625}},{"entity_number":85,"name":"stone-wall","position":{"x":10,"y":-22}},{"entity_number":86,"name":"land-mine","position":{"x":11.7578125,"y":-21.05859375}},{"entity_number":87,"name":"stone-wall","position":{"x":11,"y":-21}},{"entity_number":88,"name":"land-mine","position":{"x":12.8359375,"y":-21.953125}},{"entity_number":89,"name":"stone-wall","position":{"x":12,"y":-22}},{"entity_number":90,"name":"stone-wall","position":{"x":13,"y":-21}},{"entity_number":91,"name":"land-mine","position":{"x":13.9375,"y":-20.82421875}},{"entity_number":92,"name":"stone-wall","position":{"x":14,"y":-22}},{"entity_number":93,"name":"stone-wall","position":{"x":15,"y":-21}},{"entity_number":94,"name":"land-mine","position":{"x":16.24609375,"y":-20.8515625}},{"entity_number":95,"name":"stone-wall","position":{"x":16,"y":-22}},{"entity_number":96,"name":"land-mine","position":{"x":16.98828125,"y":-21.90234375}},{"entity_number":97,"name":"land-mine","position":{"x":17.765625,"y":-20.76171875}},{"entity_number":98,"name":"stone-wall","position":{"x":17,"y":-21}},{"entity_number":99,"name":"land-mine","position":{"x":18.765625,"y":-21.69921875}},{"entity_number":100,"name":"stone-wall","position":{"x":18,"y":-22}},{"entity_number":101,"name":"stone-wall","position":{"x":19,"y":-21}},{"entity_number":102,"name":"land-mine","position":{"x":20.25390625,"y":-20.91796875}},{"entity_number":103,"name":"stone-wall","position":{"x":20,"y":-22}},{"entity_number":104,"name":"stone-wall","position":{"x":21,"y":-21}},{"entity_number":105,"name":"stone-wall","position":{"x":-23,"y":-19}},{"entity_number":106,"name":"land-mine","position":{"x":-22.0390625,"y":-18.9375}},{"entity_number":107,"name":"stone-wall","position":{"x":-22,"y":-20}},{"entity_number":108,"name":"land-mine","position":{"x":-20.78515625,"y":-18.21875}},{"entity_number":109,"name":"stone-wall","position":{"x":-21,"y":-19}},{"entity_number":110,"name":"land-mine","position":{"x":-19.9296875,"y":-18.80078125}},{"entity_number":111,"name":"land-mine","position":{"x":-19.25390625,"y":-19.703125}},{"entity_number":112,"name":"stone-wall","position":{"x":-20,"y":-20}},{"entity_number":113,"name":"stone-wall","position":{"x":-19,"y":-19}},{"entity_number":114,"name":"land-mine","position":{"x":-17.24609375,"y":-19.9609375}},{"entity_number":115,"name":"stone-wall","position":{"x":-18,"y":-20}},{"entity_number":116,"name":"stone-wall","position":{"x":-17,"y":-19}},{"entity_number":117,"name":"land-mine","position":{"x":-15.9921875,"y":-19.28515625}},{"entity_number":118,"name":"stone-wall","position":{"x":-16,"y":-20}},{"entity_number":119,"name":"land-mine","position":{"x":-14.71484375,"y":-20.03125}},{"entity_number":120,"name":"stone-wall","position":{"x":-15,"y":-19}},{"entity_number":121,"name":"land-mine","position":{"x":-13.73828125,"y":-19.23828125}},{"entity_number":122,"name":"stone-wall","position":{"x":-14,"y":-20}},{"entity_number":123,"name":"stone-wall","position":{"x":-13,"y":-19}},{"entity_number":124,"name":"land-mine","position":{"x":-11.87890625,"y":-19.26171875}},{"entity_number":125,"name":"stone-wall","position":{"x":-12,"y":-20}},{"entity_number":126,"name":"land-mine","position":{"x":-10.30078125,"y":-19.28515625}},{"entity_number":127,"name":"stone-wall","position":{"x":-11,"y":-19}},{"entity_number":128,"name":"stone-wall","position":{"x":-10,"y":-20}},{"entity_number":129,"name":"land-mine","position":{"x":-8.1875,"y":-19.30859375}},{"entity_number":130,"name":"stone-wall","position":{"x":-9,"y":-19}},{"entity_number":131,"name":"stone-wall","position":{"x":-8,"y":-20}},{"entity_number":132,"name":"land-mine","position":{"x":-6.16796875,"y":-19.28515625}},{"entity_number":133,"name":"stone-wall","position":{"x":-7,"y":-19}},{"entity_number":134,"name":"stone-wall","position":{"x":-6,"y":-20}},{"entity_number":135,"name":"stone-wall","position":{"x":-5,"y":-19}},{"entity_number":136,"name":"land-mine","position":{"x":-2.1640625,"y":-19.53125}},{"entity_number":137,"name":"land-mine","position":{"x":-3.0078125,"y":-19.53125}},{"entity_number":138,"name":"land-mine","position":{"x":-0.9140625,"y":-19.53125}},{"entity_number":139,"name":"land-mine","position":{"x":0.9296875,"y":-19.625}},{"entity_number":140,"name":"land-mine","position":{"x":0.1171875,"y":-19.59375}},{"entity_number":141,"name":"land-mine","position":{"x":3.765625,"y":-19.76953125}},{"entity_number":142,"name":"land-mine","position":{"x":2.1484375,"y":-19.75}},{"entity_number":143,"name":"stone-wall","position":{"x":5,"y":-19}},{"entity_number":144,"name":"stone-wall","position":{"x":6,"y":-20}},{"entity_number":145,"name":"stone-wall","position":{"x":7,"y":-19}},{"entity_number":146,"name":"land-mine","position":{"x":8.04296875,"y":-19.26171875}},{"entity_number":147,"name":"stone-wall","position":{"x":8,"y":-20}},{"entity_number":148,"name":"land-mine","position":{"x":8.9140625,"y":-19.828125}},{"entity_number":149,"name":"stone-wall","position":{"x":9,"y":-19}},{"entity_number":150,"name":"land-mine","position":{"x":9.9140625,"y":-19.16015625}},{"entity_number":151,"name":"stone-wall","position":{"x":10,"y":-20}},{"entity_number":152,"name":"land-mine","position":{"x":11.859375,"y":-19.16015625}},{"entity_number":153,"name":"land-mine","position":{"x":11.015625,"y":-19.80078125}},{"entity_number":154,"name":"stone-wall","position":{"x":11,"y":-19}},{"entity_number":155,"name":"land-mine","position":{"x":12.8359375,"y":-19.80078125}},{"entity_number":156,"name":"stone-wall","position":{"x":12,"y":-20}},{"entity_number":157,"name":"land-mine","position":{"x":13.859375,"y":-19.2109375}},{"entity_number":158,"name":"stone-wall","position":{"x":13,"y":-19}},{"entity_number":159,"name":"land-mine","position":{"x":14.8359375,"y":-19.69921875}},{"entity_number":160,"name":"stone-wall","position":{"x":14,"y":-20}},{"entity_number":161,"name":"stone-wall","position":{"x":15,"y":-19}},{"entity_number":162,"name":"land-mine","position":{"x":15.9609375,"y":-19.0078125}},{"entity_number":163,"name":"stone-wall","position":{"x":16,"y":-20}},{"entity_number":164,"name":"land-mine","position":{"x":16.98828125,"y":-19.90234375}},{"entity_number":165,"name":"stone-wall","position":{"x":17,"y":-19}},{"entity_number":166,"name":"land-mine","position":{"x":18.125,"y":-19.1328125}},{"entity_number":167,"name":"land-mine","position":{"x":18.71484375,"y":-19.953125}},{"entity_number":168,"name":"stone-wall","position":{"x":18,"y":-20}},{"entity_number":169,"name":"land-mine","position":{"x":19.1484375,"y":-18.27734375}},{"entity_number":170,"name":"stone-wall","position":{"x":19,"y":-19}},{"entity_number":171,"name":"land-mine","position":{"x":20.1484375,"y":-18.8671875}},{"entity_number":172,"name":"stone-wall","position":{"x":20,"y":-20}},{"entity_number":173,"name":"land-mine","position":{"x":21.83984375,"y":-18.71484375}},{"entity_number":174,"name":"stone-wall","position":{"x":21,"y":-19}},{"entity_number":175,"name":"stone-wall","position":{"x":22,"y":-20}},{"entity_number":176,"name":"land-mine","position":{"x":-22.1796875,"y":-17.03515625}},{"entity_number":177,"name":"land-mine","position":{"x":-23.015625,"y":-17.80078125}},{"entity_number":178,"name":"stone-wall","position":{"x":-23,"y":-17}},{"entity_number":179,"name":"stone-wall","position":{"x":-22,"y":-18}},{"entity_number":180,"name":"land-mine","position":{"x":-20.23046875,"y":-16.7109375}},{"entity_number":181,"name":"stone-wall","position":{"x":-21,"y":-17}},{"entity_number":182,"name":"stone-wall","position":{"x":-20,"y":-18}},{"entity_number":183,"name":"land-mine","position":{"x":-18.859375,"y":-17.91796875}},{"entity_number":184,"name":"stone-wall","position":{"x":-19,"y":-17}},{"entity_number":185,"name":"stone-wall","position":{"x":-18,"y":-18}},{"entity_number":186,"name":"stone-wall","position":{"x":-18,"y":-17}},{"entity_number":187,"name":"stone-wall","position":{"x":-17,"y":-18}},{"entity_number":188,"name":"stone-wall","position":{"x":-17,"y":-17}},{"entity_number":189,"name":"stone-wall","position":{"x":-16,"y":-18}},{"entity_number":190,"name":"stone-wall","position":{"x":-16,"y":-17}},{"entity_number":191,"name":"stone-wall","position":{"x":-15,"y":-18}},{"entity_number":192,"name":"stone-wall","position":{"x":-15,"y":-17}},{"entity_number":193,"name":"stone-wall","position":{"x":-14,"y":-18}},{"entity_number":194,"name":"stone-wall","position":{"x":-14,"y":-17}},{"entity_number":195,"name":"stone-wall","position":{"x":-13,"y":-18}},{"entity_number":196,"name":"stone-wall","position":{"x":-13,"y":-17}},{"entity_number":197,"name":"stone-wall","position":{"x":-12,"y":-18}},{"entity_number":198,"name":"stone-wall","position":{"x":-12,"y":-17}},{"entity_number":199,"name":"stone-wall","position":{"x":-11,"y":-18}},{"entity_number":200,"name":"stone-wall","position":{"x":-11,"y":-17}},{"entity_number":201,"name":"stone-wall","position":{"x":-10,"y":-18}},{"entity_number":202,"name":"stone-wall","position":{"x":-10,"y":-17}},{"entity_number":203,"name":"stone-wall","position":{"x":-9,"y":-18}},{"entity_number":204,"name":"stone-wall","position":{"x":-9,"y":-17}},{"entity_number":205,"name":"stone-wall","position":{"x":-8,"y":-18}},{"entity_number":206,"name":"stone-wall","position":{"x":-8,"y":-17}},{"entity_number":207,"name":"stone-wall","position":{"x":-7,"y":-18}},{"entity_number":208,"name":"stone-wall","position":{"x":-7,"y":-17}},{"entity_number":209,"name":"stone-wall","position":{"x":-6,"y":-18}},{"entity_number":210,"name":"stone-wall","position":{"x":-6,"y":-17}},{"entity_number":211,"name":"stone-wall","position":{"x":-5,"y":-18}},{"entity_number":212,"name":"stone-wall","position":{"x":-5,"y":-17}},{"entity_number":213,"name":"gate","position":{"x":-4,"y":-18},"direction":2},{"entity_number":214,"name":"gate","position":{"x":-4,"y":-17},"direction":2},{"entity_number":215,"name":"gate","position":{"x":-3,"y":-18},"direction":2},{"entity_number":216,"name":"gate","position":{"x":-3,"y":-17},"direction":2},{"entity_number":217,"name":"gate","position":{"x":-2,"y":-18},"direction":2},{"entity_number":218,"name":"gate","position":{"x":-2,"y":-17},"direction":2},{"entity_number":219,"name":"gate","position":{"x":-1,"y":-18},"direction":2},{"entity_number":220,"name":"gate","position":{"x":-1,"y":-17},"direction":2},{"entity_number":221,"name":"gate","position":{"x":0,"y":-18},"direction":2},{"entity_number":222,"name":"gate","position":{"x":0,"y":-17},"direction":2},{"entity_number":223,"name":"gate","position":{"x":1,"y":-18},"direction":2},{"entity_number":224,"name":"gate","position":{"x":1,"y":-17},"direction":2},{"entity_number":225,"name":"gate","position":{"x":2,"y":-18},"direction":2},{"entity_number":226,"name":"gate","position":{"x":2,"y":-17},"direction":2},{"entity_number":227,"name":"gate","position":{"x":3,"y":-18},"direction":2},{"entity_number":228,"name":"gate","position":{"x":3,"y":-17},"direction":2},{"entity_number":229,"name":"stone-wall","position":{"x":4,"y":-18}},{"entity_number":230,"name":"stone-wall","position":{"x":4,"y":-17}},{"entity_number":231,"name":"stone-wall","position":{"x":5,"y":-18}},{"entity_number":232,"name":"stone-wall","position":{"x":5,"y":-17}},{"entity_number":233,"name":"stone-wall","position":{"x":6,"y":-18}},{"entity_number":234,"name":"stone-wall","position":{"x":6,"y":-17}},{"entity_number":235,"name":"stone-wall","position":{"x":7,"y":-18}},{"entity_number":236,"name":"stone-wall","position":{"x":7,"y":-17}},{"entity_number":237,"name":"stone-wall","position":{"x":8,"y":-18}},{"entity_number":238,"name":"stone-wall","position":{"x":8,"y":-17}},{"entity_number":239,"name":"stone-wall","position":{"x":9,"y":-18}},{"entity_number":240,"name":"stone-wall","position":{"x":9,"y":-17}},{"entity_number":241,"name":"stone-wall","position":{"x":10,"y":-18}},{"entity_number":242,"name":"stone-wall","position":{"x":10,"y":-17}},{"entity_number":243,"name":"stone-wall","position":{"x":11,"y":-18}},{"entity_number":244,"name":"stone-wall","position":{"x":11,"y":-17}},{"entity_number":245,"name":"stone-wall","position":{"x":12,"y":-18}},{"entity_number":246,"name":"stone-wall","position":{"x":12,"y":-17}},{"entity_number":247,"name":"stone-wall","position":{"x":13,"y":-18}},{"entity_number":248,"name":"stone-wall","position":{"x":13,"y":-17}},{"entity_number":249,"name":"stone-wall","position":{"x":14,"y":-18}},{"entity_number":250,"name":"stone-wall","position":{"x":14,"y":-17}},{"entity_number":251,"name":"stone-wall","position":{"x":15,"y":-17}},{"entity_number":252,"name":"stone-wall","position":{"x":15,"y":-18}},{"entity_number":253,"name":"stone-wall","position":{"x":16,"y":-18}},{"entity_number":254,"name":"stone-wall","position":{"x":16,"y":-17}},{"entity_number":255,"name":"stone-wall","position":{"x":17,"y":-18}},{"entity_number":256,"name":"stone-wall","position":{"x":17,"y":-17}},{"entity_number":257,"name":"land-mine","position":{"x":18.3046875,"y":-17.07421875}},{"entity_number":258,"name":"stone-wall","position":{"x":18,"y":-18}},{"entity_number":259,"name":"stone-wall","position":{"x":19,"y":-17}},{"entity_number":260,"name":"land-mine","position":{"x":20.09765625,"y":-16.84375}},{"entity_number":261,"name":"land-mine","position":{"x":20.81640625,"y":-17.69140625}},{"entity_number":262,"name":"stone-wall","position":{"x":20,"y":-18}},{"entity_number":263,"name":"land-mine","position":{"x":21.8671875,"y":-16.81640625}},{"entity_number":264,"name":"stone-wall","position":{"x":21,"y":-17}},{"entity_number":265,"name":"stone-wall","position":{"x":22,"y":-18}},{"entity_number":266,"name":"stone-wall","position":{"x":-24,"y":-16}},{"entity_number":267,"name":"land-mine","position":{"x":-22.8984375,"y":-15.73828125}},{"entity_number":268,"name":"land-mine","position":{"x":-23.0859375,"y":-14.25}},{"entity_number":269,"name":"stone-wall","position":{"x":-23,"y":-15}},{"entity_number":270,"name":"land-mine","position":{"x":-21.97265625,"y":-15.109375}},{"entity_number":271,"name":"stone-wall","position":{"x":-22,"y":-16}},{"entity_number":272,"name":"stone-wall","position":{"x":-21,"y":-15}},{"entity_number":273,"name":"land-mine","position":{"x":-19.71875,"y":-15.17578125}},{"entity_number":274,"name":"land-mine","position":{"x":-19.30078125,"y":-16.01171875}},{"entity_number":275,"name":"stone-wall","position":{"x":-20,"y":-16}},{"entity_number":276,"name":"stone-wall","position":{"x":-19,"y":-15}},{"entity_number":277,"name":"stone-wall","position":{"x":-18,"y":-16}},{"entity_number":278,"name":"stone-wall","position":{"x":-18,"y":-15}},{"entity_number":279,"name":"stone-wall","position":{"x":-17,"y":-16}},{"entity_number":280,"name":"stone-wall","position":{"x":-17,"y":-15}},{"entity_number":281,"name":"solar-panel","position":{"x":-15,"y":-15}},{"entity_number":282,"name":"solar-panel","position":{"x":-12,"y":-15}},{"entity_number":283,"name":"inserter","position":{"x":-7,"y":-16},"direction":6},{"entity_number":284,"name":"infinity-chest","position":{"x":-8,"y":-16},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":285,"name":"medium-electric-pole","position":{"x":-7,"y":-15}},{"entity_number":286,"name":"gun-turret","position":{"x":-5.5,"y":-15.5}},{"entity_number":287,"name":"gun-turret","position":{"x":4.5,"y":-15.5}},{"entity_number":288,"name":"medium-electric-pole","position":{"x":6,"y":-15}},{"entity_number":289,"name":"inserter","position":{"x":6,"y":-16},"direction":2},{"entity_number":290,"name":"infinity-chest","position":{"x":7,"y":-16},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":291,"name":"solar-panel","position":{"x":11,"y":-15}},{"entity_number":292,"name":"solar-panel","position":{"x":14,"y":-15}},{"entity_number":293,"name":"stone-wall","position":{"x":16,"y":-15}},{"entity_number":294,"name":"stone-wall","position":{"x":16,"y":-16}},{"entity_number":295,"name":"stone-wall","position":{"x":17,"y":-16}},{"entity_number":296,"name":"stone-wall","position":{"x":17,"y":-15}},{"entity_number":297,"name":"stone-wall","position":{"x":18,"y":-16}},{"entity_number":298,"name":"stone-wall","position":{"x":19,"y":-15}},{"entity_number":299,"name":"land-mine","position":{"x":19.99609375,"y":-14.7421875}},{"entity_number":300,"name":"land-mine","position":{"x":20.81640625,"y":-15.8359375}},{"entity_number":301,"name":"stone-wall","position":{"x":20,"y":-16}},{"entity_number":302,"name":"land-mine","position":{"x":21.71484375,"y":-14.9453125}},{"entity_number":303,"name":"stone-wall","position":{"x":21,"y":-15}},{"entity_number":304,"name":"land-mine","position":{"x":22.7890625,"y":-14.125}},{"entity_number":305,"name":"stone-wall","position":{"x":22,"y":-16}},{"entity_number":306,"name":"stone-wall","position":{"x":23,"y":-15}},{"entity_number":307,"name":"land-mine","position":{"x":-23.1328125,"y":-12.30078125}},{"entity_number":308,"name":"stone-wall","position":{"x":-24,"y":-14}},{"entity_number":309,"name":"stone-wall","position":{"x":-23,"y":-13}},{"entity_number":310,"name":"land-mine","position":{"x":-21.83203125,"y":-12.7890625}},{"entity_number":311,"name":"stone-wall","position":{"x":-22,"y":-14}},{"entity_number":312,"name":"land-mine","position":{"x":-20.85546875,"y":-13.97265625}},{"entity_number":313,"name":"stone-wall","position":{"x":-21,"y":-13}},{"entity_number":314,"name":"land-mine","position":{"x":-19.20703125,"y":-12.1171875}},{"entity_number":315,"name":"land-mine","position":{"x":-19.30078125,"y":-13.92578125}},{"entity_number":316,"name":"land-mine","position":{"x":-19.7890625,"y":-13.06640625}},{"entity_number":317,"name":"stone-wall","position":{"x":-20,"y":-14}},{"entity_number":318,"name":"stone-wall","position":{"x":-19,"y":-13}},{"entity_number":319,"name":"stone-wall","position":{"x":-18,"y":-14}},{"entity_number":320,"name":"stone-wall","position":{"x":-18,"y":-13}},{"entity_number":321,"name":"stone-wall","position":{"x":-17,"y":-14}},{"entity_number":322,"name":"stone-wall","position":{"x":-17,"y":-13}},{"entity_number":323,"name":"solar-panel","position":{"x":-15,"y":-12}},{"entity_number":324,"name":"big-electric-pole","position":{"x":-12.5,"y":-12.5}},{"entity_number":325,"name":"big-electric-pole","position":{"x":11.5,"y":-12.5}},{"entity_number":326,"name":"solar-panel","position":{"x":14,"y":-12}},{"entity_number":327,"name":"stone-wall","position":{"x":16,"y":-14}},{"entity_number":328,"name":"stone-wall","position":{"x":16,"y":-13}},{"entity_number":329,"name":"stone-wall","position":{"x":17,"y":-14}},{"entity_number":330,"name":"stone-wall","position":{"x":17,"y":-13}},{"entity_number":331,"name":"land-mine","position":{"x":18.25390625,"y":-13.125}},{"entity_number":332,"name":"stone-wall","position":{"x":18,"y":-14}},{"entity_number":333,"name":"land-mine","position":{"x":19.0234375,"y":-13.9453125}},{"entity_number":334,"name":"stone-wall","position":{"x":19,"y":-13}},{"entity_number":335,"name":"land-mine","position":{"x":19.99609375,"y":-13.3046875}},{"entity_number":336,"name":"land-mine","position":{"x":20.89453125,"y":-13.72265625}},{"entity_number":337,"name":"stone-wall","position":{"x":20,"y":-14}},{"entity_number":338,"name":"stone-wall","position":{"x":21,"y":-13}},{"entity_number":339,"name":"land-mine","position":{"x":22.046875,"y":-13.25390625}},{"entity_number":340,"name":"stone-wall","position":{"x":22,"y":-14}},{"entity_number":341,"name":"land-mine","position":{"x":23.3046875,"y":-12.17578125}},{"entity_number":342,"name":"stone-wall","position":{"x":23,"y":-13}},{"entity_number":343,"name":"land-mine","position":{"x":-23.15625,"y":-10.234375}},{"entity_number":344,"name":"land-mine","position":{"x":-23.9921875,"y":-10.72265625}},{"entity_number":345,"name":"stone-wall","position":{"x":-24,"y":-12}},{"entity_number":346,"name":"stone-wall","position":{"x":-23,"y":-11}},{"entity_number":347,"name":"land-mine","position":{"x":-22.0390625,"y":-10.81640625}},{"entity_number":348,"name":"stone-wall","position":{"x":-22,"y":-12}},{"entity_number":349,"name":"land-mine","position":{"x":-20.7421875,"y":-11.69921875}},{"entity_number":350,"name":"land-mine","position":{"x":-20.30078125,"y":-10.79296875}},{"entity_number":351,"name":"stone-wall","position":{"x":-21,"y":-11}},{"entity_number":352,"name":"land-mine","position":{"x":-19.27734375,"y":-10.234375}},{"entity_number":353,"name":"stone-wall","position":{"x":-20,"y":-12}},{"entity_number":354,"name":"stone-wall","position":{"x":-19,"y":-11}},{"entity_number":355,"name":"stone-wall","position":{"x":-18,"y":-12}},{"entity_number":356,"name":"stone-wall","position":{"x":-18,"y":-11}},{"entity_number":357,"name":"stone-wall","position":{"x":-17,"y":-11}},{"entity_number":358,"name":"stone-wall","position":{"x":-17,"y":-12}},{"entity_number":359,"name":"stone-wall","position":{"x":16,"y":-11}},{"entity_number":360,"name":"stone-wall","position":{"x":16,"y":-12}},{"entity_number":361,"name":"stone-wall","position":{"x":17,"y":-12}},{"entity_number":362,"name":"stone-wall","position":{"x":17,"y":-11}},{"entity_number":363,"name":"land-mine","position":{"x":18.203125,"y":-10.765625}},{"entity_number":364,"name":"stone-wall","position":{"x":18,"y":-12}},{"entity_number":365,"name":"land-mine","position":{"x":19.07421875,"y":-11.84375}},{"entity_number":366,"name":"stone-wall","position":{"x":19,"y":-11}},{"entity_number":367,"name":"land-mine","position":{"x":20.0234375,"y":-10.87109375}},{"entity_number":368,"name":"stone-wall","position":{"x":20,"y":-12}},{"entity_number":369,"name":"land-mine","position":{"x":20.91796875,"y":-11.87109375}},{"entity_number":370,"name":"land-mine","position":{"x":21.73828125,"y":-10.97265625}},{"entity_number":371,"name":"stone-wall","position":{"x":21,"y":-11}},{"entity_number":372,"name":"stone-wall","position":{"x":22,"y":-12}},{"entity_number":373,"name":"land-mine","position":{"x":23.73828125,"y":-10.79296875}},{"entity_number":374,"name":"stone-wall","position":{"x":23,"y":-11}},{"entity_number":375,"name":"stone-wall","position":{"x":24,"y":-12}},{"entity_number":376,"name":"land-mine","position":{"x":-23.7109375,"y":-9.07421875}},{"entity_number":377,"name":"stone-wall","position":{"x":-24,"y":-10}},{"entity_number":378,"name":"stone-wall","position":{"x":-23,"y":-9}},{"entity_number":379,"name":"land-mine","position":{"x":-21.97265625,"y":-9.19140625}},{"entity_number":380,"name":"stone-wall","position":{"x":-22,"y":-10}},{"entity_number":381,"name":"land-mine","position":{"x":-20.92578125,"y":-8.30859375}},{"entity_number":382,"name":"stone-wall","position":{"x":-21,"y":-9}},{"entity_number":383,"name":"land-mine","position":{"x":-20.01953125,"y":-9.00390625}},{"entity_number":384,"name":"stone-wall","position":{"x":-20,"y":-10}},{"entity_number":385,"name":"stone-wall","position":{"x":-19,"y":-9}},{"entity_number":386,"name":"stone-wall","position":{"x":-18,"y":-10}},{"entity_number":387,"name":"stone-wall","position":{"x":-18,"y":-9}},{"entity_number":388,"name":"stone-wall","position":{"x":-17,"y":-9}},{"entity_number":389,"name":"stone-wall","position":{"x":-17,"y":-10}},{"entity_number":390,"name":"stone-wall","position":{"x":16,"y":-10}},{"entity_number":391,"name":"stone-wall","position":{"x":16,"y":-9}},{"entity_number":392,"name":"stone-wall","position":{"x":17,"y":-10}},{"entity_number":393,"name":"stone-wall","position":{"x":17,"y":-9}},{"entity_number":394,"name":"land-mine","position":{"x":18.25390625,"y":-9.1015625}},{"entity_number":395,"name":"land-mine","position":{"x":18.81640625,"y":-8.28125}},{"entity_number":396,"name":"stone-wall","position":{"x":18,"y":-10}},{"entity_number":397,"name":"stone-wall","position":{"x":19,"y":-9}},{"entity_number":398,"name":"land-mine","position":{"x":20.27734375,"y":-8.84375}},{"entity_number":399,"name":"stone-wall","position":{"x":20,"y":-10}},{"entity_number":400,"name":"stone-wall","position":{"x":21,"y":-9}},{"entity_number":401,"name":"land-mine","position":{"x":22.73828125,"y":-8.203125}},{"entity_number":402,"name":"land-mine","position":{"x":22.2265625,"y":-9.05078125}},{"entity_number":403,"name":"stone-wall","position":{"x":22,"y":-10}},{"entity_number":404,"name":"land-mine","position":{"x":23.09765625,"y":-9.76953125}},{"entity_number":405,"name":"stone-wall","position":{"x":23,"y":-9}},{"entity_number":406,"name":"stone-wall","position":{"x":24,"y":-10}},{"entity_number":407,"name":"land-mine","position":{"x":-23.29296875,"y":-7.8671875}},{"entity_number":408,"name":"stone-wall","position":{"x":-23,"y":-7}},{"entity_number":409,"name":"stone-wall","position":{"x":-24,"y":-8}},{"entity_number":410,"name":"land-mine","position":{"x":-21.97265625,"y":-7.1015625}},{"entity_number":411,"name":"stone-wall","position":{"x":-22,"y":-8}},{"entity_number":412,"name":"land-mine","position":{"x":-20.27734375,"y":-6.796875}},{"entity_number":413,"name":"stone-wall","position":{"x":-21,"y":-7}},{"entity_number":414,"name":"stone-wall","position":{"x":-20,"y":-8}},{"entity_number":415,"name":"stone-wall","position":{"x":-19,"y":-7}},{"entity_number":416,"name":"stone-wall","position":{"x":-18,"y":-8}},{"entity_number":417,"name":"stone-wall","position":{"x":-18,"y":-7}},{"entity_number":418,"name":"stone-wall","position":{"x":-17,"y":-7}},{"entity_number":419,"name":"stone-wall","position":{"x":-17,"y":-8}},{"entity_number":420,"name":"inserter","position":{"x":-16,"y":-7}},{"entity_number":421,"name":"infinity-chest","position":{"x":-16,"y":-8},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":422,"name":"medium-electric-pole","position":{"x":-15,"y":-7}},{"entity_number":423,"name":"medium-electric-pole","position":{"x":14,"y":-7}},{"entity_number":424,"name":"inserter","position":{"x":15,"y":-7}},{"entity_number":425,"name":"infinity-chest","position":{"x":15,"y":-8},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":426,"name":"stone-wall","position":{"x":16,"y":-7}},{"entity_number":427,"name":"stone-wall","position":{"x":16,"y":-8}},{"entity_number":428,"name":"stone-wall","position":{"x":17,"y":-8}},{"entity_number":429,"name":"stone-wall","position":{"x":17,"y":-7}},{"entity_number":430,"name":"stone-wall","position":{"x":18,"y":-8}},{"entity_number":431,"name":"stone-wall","position":{"x":19,"y":-7}},{"entity_number":432,"name":"land-mine","position":{"x":19.96875,"y":-7.1796875}},{"entity_number":433,"name":"stone-wall","position":{"x":20,"y":-8}},{"entity_number":434,"name":"land-mine","position":{"x":21.1484375,"y":-8.07421875}},{"entity_number":435,"name":"stone-wall","position":{"x":21,"y":-7}},{"entity_number":436,"name":"land-mine","position":{"x":22.01953125,"y":-7.25390625}},{"entity_number":437,"name":"stone-wall","position":{"x":22,"y":-8}},{"entity_number":438,"name":"stone-wall","position":{"x":23,"y":-7}},{"entity_number":439,"name":"land-mine","position":{"x":-20.109375,"y":-4.3984375}},{"entity_number":440,"name":"stone-wall","position":{"x":-22,"y":-6}},{"entity_number":441,"name":"stone-wall","position":{"x":-20,"y":-6}},{"entity_number":442,"name":"stone-wall","position":{"x":-18,"y":-5}},{"entity_number":443,"name":"stone-wall","position":{"x":-18,"y":-6}},{"entity_number":444,"name":"stone-wall","position":{"x":-17,"y":-5}},{"entity_number":445,"name":"stone-wall","position":{"x":-17,"y":-6}},{"entity_number":446,"name":"gun-turret","position":{"x":-15.5,"y":-5.5}},{"entity_number":447,"name":"solar-panel","position":{"x":-3,"y":-5}},{"entity_number":448,"name":"wooden-chest","position":{"x":-1,"y":-6},"bar":1},{"entity_number":449,"name":"inserter","position":{"x":-1,"y":-5},"direction":4},{"entity_number":450,"name":"wooden-chest","position":{"x":0,"y":-6},"bar":1},{"entity_number":451,"name":"inserter","position":{"x":0,"y":-5},"direction":4},{"entity_number":452,"name":"solar-panel","position":{"x":2,"y":-5}},{"entity_number":453,"name":"gun-turret","position":{"x":14.5,"y":-5.5}},{"entity_number":454,"name":"stone-wall","position":{"x":16,"y":-6}},{"entity_number":455,"name":"stone-wall","position":{"x":16,"y":-5}},{"entity_number":456,"name":"stone-wall","position":{"x":17,"y":-6}},{"entity_number":457,"name":"stone-wall","position":{"x":17,"y":-5}},{"entity_number":458,"name":"stone-wall","position":{"x":18,"y":-6}},{"entity_number":459,"name":"land-mine","position":{"x":21.546875,"y":-4.4140625}},{"entity_number":460,"name":"stone-wall","position":{"x":20,"y":-6}},{"entity_number":461,"name":"stone-wall","position":{"x":22,"y":-6}},{"entity_number":462,"name":"land-mine","position":{"x":-22.453125,"y":-2.9921875}},{"entity_number":463,"name":"land-mine","position":{"x":-22.390625,"y":-4.0234375}},{"entity_number":464,"name":"land-mine","position":{"x":-20.109375,"y":-3.3984375}},{"entity_number":465,"name":"land-mine","position":{"x":-20.109375,"y":-2.3984375}},{"entity_number":466,"name":"gate","position":{"x":-18,"y":-4}},{"entity_number":467,"name":"gate","position":{"x":-18,"y":-3}},{"entity_number":468,"name":"gate","position":{"x":-17,"y":-4}},{"entity_number":469,"name":"gate","position":{"x":-17,"y":-3}},{"entity_number":470,"name":"solar-panel","position":{"x":-3,"y":-2}},{"entity_number":471,"name":"infinity-chest","position":{"x":-1,"y":-4},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"repair-pack","count":1,"mode":"at-least","index":1}]}},{"entity_number":472,"name":"accumulator","position":{"x":-0.5,"y":-2.5}},{"entity_number":473,"name":"solar-panel","position":{"x":2,"y":-2}},{"entity_number":474,"name":"infinity-chest","position":{"x":0,"y":-4},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":475,"name":"gate","position":{"x":16,"y":-4}},{"entity_number":476,"name":"gate","position":{"x":16,"y":-3}},{"entity_number":477,"name":"gate","position":{"x":17,"y":-4}},{"entity_number":478,"name":"gate","position":{"x":17,"y":-3}},{"entity_number":479,"name":"land-mine","position":{"x":18.984375,"y":-3.9140625}},{"entity_number":480,"name":"land-mine","position":{"x":18.984375,"y":-3.0390625}},{"entity_number":481,"name":"land-mine","position":{"x":21.390625,"y":-2.6015625}},{"entity_number":482,"name":"land-mine","position":{"x":21.484375,"y":-3.5703125}},{"entity_number":483,"name":"land-mine","position":{"x":-22.265625,"y":-0.2734375}},{"entity_number":484,"name":"land-mine","position":{"x":-22.359375,"y":-1.0859375}},{"entity_number":485,"name":"land-mine","position":{"x":-22.453125,"y":-2.0234375}},{"entity_number":486,"name":"land-mine","position":{"x":-20.109375,"y":-1.3359375}},{"entity_number":487,"name":"land-mine","position":{"x":-20.109375,"y":-0.1484375}},{"entity_number":488,"name":"gate","position":{"x":-18,"y":-2}},{"entity_number":489,"name":"gate","position":{"x":-18,"y":-1}},{"entity_number":490,"name":"gate","position":{"x":-17,"y":-1}},{"entity_number":491,"name":"gate","position":{"x":-17,"y":-2}},{"entity_number":492,"name":"substation","position":{"x":-0.5,"y":-0.5}},{"entity_number":493,"name":"gate","position":{"x":16,"y":-2}},{"entity_number":494,"name":"gate","position":{"x":16,"y":-1}},{"entity_number":495,"name":"gate","position":{"x":17,"y":-1}},{"entity_number":496,"name":"gate","position":{"x":17,"y":-2}},{"entity_number":497,"name":"land-mine","position":{"x":18.921875,"y":-2.0390625}},{"entity_number":498,"name":"land-mine","position":{"x":18.859375,"y":-1.1015625}},{"entity_number":499,"name":"land-mine","position":{"x":21.203125,"y":-0.5703125}},{"entity_number":500,"name":"land-mine","position":{"x":21.296875,"y":-1.5078125}},{"entity_number":501,"name":"land-mine","position":{"x":-22.390625,"y":1.5078125}},{"entity_number":502,"name":"land-mine","position":{"x":-22.234375,"y":0.5703125}},{"entity_number":503,"name":"land-mine","position":{"x":-20.171875,"y":1.0703125}},{"entity_number":504,"name":"gate","position":{"x":-18,"y":0}},{"entity_number":505,"name":"gate","position":{"x":-18,"y":1}},{"entity_number":506,"name":"gate","position":{"x":-17,"y":1}},{"entity_number":507,"name":"gate","position":{"x":-17,"y":0}},{"entity_number":508,"name":"solar-panel","position":{"x":-3,"y":1}},{"entity_number":509,"name":"accumulator","position":{"x":-0.5,"y":1.5}},{"entity_number":510,"name":"solar-panel","position":{"x":2,"y":1}},{"entity_number":511,"name":"gate","position":{"x":16,"y":0}},{"entity_number":512,"name":"gate","position":{"x":16,"y":1}},{"entity_number":513,"name":"gate","position":{"x":17,"y":0}},{"entity_number":514,"name":"gate","position":{"x":17,"y":1}},{"entity_number":515,"name":"land-mine","position":{"x":18.953125,"y":-0.0078125}},{"entity_number":516,"name":"land-mine","position":{"x":19.046875,"y":1.2421875}},{"entity_number":517,"name":"land-mine","position":{"x":21.265625,"y":1.1171875}},{"entity_number":518,"name":"land-mine","position":{"x":21.203125,"y":0.2734375}},{"entity_number":519,"name":"land-mine","position":{"x":-22.453125,"y":2.3203125}},{"entity_number":520,"name":"land-mine","position":{"x":-20.171875,"y":2.2578125}},{"entity_number":521,"name":"gate","position":{"x":-18,"y":2}},{"entity_number":522,"name":"gate","position":{"x":-18,"y":3}},{"entity_number":523,"name":"gate","position":{"x":-17,"y":3}},{"entity_number":524,"name":"gate","position":{"x":-17,"y":2}},{"entity_number":525,"name":"solar-panel","position":{"x":-3,"y":4}},{"entity_number":526,"name":"infinity-chest","position":{"x":-1,"y":3},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"wood","count":1,"mode":"at-least","index":1}]}},{"entity_number":527,"name":"infinity-chest","position":{"x":0,"y":3},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"cannon-shell","count":1,"mode":"at-least","index":1}]}},{"entity_number":528,"name":"solar-panel","position":{"x":2,"y":4}},{"entity_number":529,"name":"gate","position":{"x":16,"y":3}},{"entity_number":530,"name":"gate","position":{"x":16,"y":2}},{"entity_number":531,"name":"gate","position":{"x":17,"y":2}},{"entity_number":532,"name":"gate","position":{"x":17,"y":3}},{"entity_number":533,"name":"land-mine","position":{"x":18.859375,"y":2.1171875}},{"entity_number":534,"name":"land-mine","position":{"x":21.421875,"y":2.7734375}},{"entity_number":535,"name":"land-mine","position":{"x":21.328125,"y":1.9609375}},{"entity_number":536,"name":"land-mine","position":{"x":-22.73828125,"y":4.78515625}},{"entity_number":537,"name":"stone-wall","position":{"x":-23,"y":4}},{"entity_number":538,"name":"land-mine","position":{"x":-21.11328125,"y":4.69140625}},{"entity_number":539,"name":"stone-wall","position":{"x":-22,"y":5}},{"entity_number":540,"name":"stone-wall","position":{"x":-21,"y":4}},{"entity_number":541,"name":"stone-wall","position":{"x":-20,"y":5}},{"entity_number":542,"name":"land-mine","position":{"x":-19.046875,"y":5.1796875}},{"entity_number":543,"name":"stone-wall","position":{"x":-19,"y":4}},{"entity_number":544,"name":"stone-wall","position":{"x":-18,"y":4}},{"entity_number":545,"name":"stone-wall","position":{"x":-18,"y":5}},{"entity_number":546,"name":"stone-wall","position":{"x":-17,"y":4}},{"entity_number":547,"name":"stone-wall","position":{"x":-17,"y":5}},{"entity_number":548,"name":"gun-turret","position":{"x":-15.5,"y":4.5}},{"entity_number":549,"name":"wooden-chest","position":{"x":-1,"y":5},"bar":1},{"entity_number":550,"name":"inserter","position":{"x":-1,"y":4}},{"entity_number":551,"name":"wooden-chest","position":{"x":0,"y":5},"bar":1},{"entity_number":552,"name":"inserter","position":{"x":0,"y":4}},{"entity_number":553,"name":"gun-turret","position":{"x":14.5,"y":4.5}},{"entity_number":554,"name":"stone-wall","position":{"x":16,"y":5}},{"entity_number":555,"name":"stone-wall","position":{"x":16,"y":4}},{"entity_number":556,"name":"stone-wall","position":{"x":17,"y":5}},{"entity_number":557,"name":"stone-wall","position":{"x":17,"y":4}},{"entity_number":558,"name":"stone-wall","position":{"x":18,"y":5}},{"entity_number":559,"name":"land-mine","position":{"x":19.10546875,"y":4.69921875}},{"entity_number":560,"name":"stone-wall","position":{"x":19,"y":4}},{"entity_number":561,"name":"land-mine","position":{"x":20.28515625,"y":5.87890625}},{"entity_number":562,"name":"land-mine","position":{"x":20.71875,"y":5.03125}},{"entity_number":563,"name":"stone-wall","position":{"x":20,"y":5}},{"entity_number":564,"name":"land-mine","position":{"x":21.8203125,"y":5.77734375}},{"entity_number":565,"name":"stone-wall","position":{"x":21,"y":4}},{"entity_number":566,"name":"stone-wall","position":{"x":22,"y":5}},{"entity_number":567,"name":"stone-wall","position":{"x":-24,"y":7}},{"entity_number":568,"name":"land-mine","position":{"x":-22.2265625,"y":5.8984375}},{"entity_number":569,"name":"land-mine","position":{"x":-23.0859375,"y":6.96875}},{"entity_number":570,"name":"stone-wall","position":{"x":-23,"y":6}},{"entity_number":571,"name":"land-mine","position":{"x":-21.16015625,"y":7.19921875}},{"entity_number":572,"name":"stone-wall","position":{"x":-22,"y":7}},{"entity_number":573,"name":"stone-wall","position":{"x":-21,"y":6}},{"entity_number":574,"name":"land-mine","position":{"x":-19.7421875,"y":6.203125}},{"entity_number":575,"name":"stone-wall","position":{"x":-20,"y":7}},{"entity_number":576,"name":"land-mine","position":{"x":-18.71875,"y":6.921875}},{"entity_number":577,"name":"stone-wall","position":{"x":-19,"y":6}},{"entity_number":578,"name":"stone-wall","position":{"x":-18,"y":6}},{"entity_number":579,"name":"stone-wall","position":{"x":-18,"y":7}},{"entity_number":580,"name":"stone-wall","position":{"x":-17,"y":7}},{"entity_number":581,"name":"stone-wall","position":{"x":-17,"y":6}},{"entity_number":582,"name":"inserter","position":{"x":-16,"y":6},"direction":4},{"entity_number":583,"name":"infinity-chest","position":{"x":-16,"y":7},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":584,"name":"medium-electric-pole","position":{"x":-15,"y":6}},{"entity_number":585,"name":"medium-electric-pole","position":{"x":14,"y":6}},{"entity_number":586,"name":"inserter","position":{"x":15,"y":6},"direction":4},{"entity_number":587,"name":"infinity-chest","position":{"x":15,"y":7},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":588,"name":"stone-wall","position":{"x":16,"y":7}},{"entity_number":589,"name":"stone-wall","position":{"x":16,"y":6}},{"entity_number":590,"name":"stone-wall","position":{"x":17,"y":7}},{"entity_number":591,"name":"stone-wall","position":{"x":17,"y":6}},{"entity_number":592,"name":"land-mine","position":{"x":18.10546875,"y":6.0703125}},{"entity_number":593,"name":"stone-wall","position":{"x":18,"y":7}},{"entity_number":594,"name":"land-mine","position":{"x":19.12890625,"y":6.69921875}},{"entity_number":595,"name":"stone-wall","position":{"x":19,"y":6}},{"entity_number":596,"name":"land-mine","position":{"x":20.0546875,"y":7.72265625}},{"entity_number":597,"name":"land-mine","position":{"x":20.6953125,"y":6.69921875}},{"entity_number":598,"name":"stone-wall","position":{"x":20,"y":7}},{"entity_number":599,"name":"land-mine","position":{"x":21.76953125,"y":7.80078125}},{"entity_number":600,"name":"stone-wall","position":{"x":21,"y":6}},{"entity_number":601,"name":"land-mine","position":{"x":22.74609375,"y":7.23828125}},{"entity_number":602,"name":"stone-wall","position":{"x":22,"y":7}},{"entity_number":603,"name":"stone-wall","position":{"x":23,"y":6}},{"entity_number":604,"name":"land-mine","position":{"x":-23.2265625,"y":9.10546875}},{"entity_number":605,"name":"land-mine","position":{"x":-23.7578125,"y":8.01171875}},{"entity_number":606,"name":"stone-wall","position":{"x":-24,"y":9}},{"entity_number":607,"name":"land-mine","position":{"x":-22.203125,"y":7.9453125}},{"entity_number":608,"name":"stone-wall","position":{"x":-23,"y":8}},{"entity_number":609,"name":"land-mine","position":{"x":-21.16015625,"y":8.82421875}},{"entity_number":610,"name":"stone-wall","position":{"x":-22,"y":9}},{"entity_number":611,"name":"stone-wall","position":{"x":-21,"y":8}},{"entity_number":612,"name":"land-mine","position":{"x":-20.01953125,"y":7.8984375}},{"entity_number":613,"name":"stone-wall","position":{"x":-20,"y":9}},{"entity_number":614,"name":"land-mine","position":{"x":-19.09375,"y":9.03515625}},{"entity_number":615,"name":"stone-wall","position":{"x":-19,"y":8}},{"entity_number":616,"name":"stone-wall","position":{"x":-18,"y":8}},{"entity_number":617,"name":"stone-wall","position":{"x":-18,"y":9}},{"entity_number":618,"name":"stone-wall","position":{"x":-17,"y":9}},{"entity_number":619,"name":"stone-wall","position":{"x":-17,"y":8}},{"entity_number":620,"name":"stone-wall","position":{"x":16,"y":8}},{"entity_number":621,"name":"stone-wall","position":{"x":16,"y":9}},{"entity_number":622,"name":"stone-wall","position":{"x":17,"y":9}},{"entity_number":623,"name":"stone-wall","position":{"x":17,"y":8}},{"entity_number":624,"name":"land-mine","position":{"x":18.76953125,"y":9.2109375}},{"entity_number":625,"name":"land-mine","position":{"x":17.92578125,"y":8.1171875}},{"entity_number":626,"name":"stone-wall","position":{"x":18,"y":9}},{"entity_number":627,"name":"stone-wall","position":{"x":19,"y":8}},{"entity_number":628,"name":"land-mine","position":{"x":19.9765625,"y":9.8515625}},{"entity_number":629,"name":"stone-wall","position":{"x":20,"y":9}},{"entity_number":630,"name":"land-mine","position":{"x":21.28515625,"y":8.75}},{"entity_number":631,"name":"stone-wall","position":{"x":21,"y":8}},{"entity_number":632,"name":"land-mine","position":{"x":22.71875,"y":9.08203125}},{"entity_number":633,"name":"stone-wall","position":{"x":22,"y":9}},{"entity_number":634,"name":"stone-wall","position":{"x":23,"y":8}},{"entity_number":635,"name":"land-mine","position":{"x":-23.15625,"y":10.82421875}},{"entity_number":636,"name":"stone-wall","position":{"x":-24,"y":11}},{"entity_number":637,"name":"land-mine","position":{"x":-22.109375,"y":11.8671875}},{"entity_number":638,"name":"stone-wall","position":{"x":-23,"y":10}},{"entity_number":639,"name":"land-mine","position":{"x":-21.73828125,"y":9.91796875}},{"entity_number":640,"name":"land-mine","position":{"x":-21.16015625,"y":11.171875}},{"entity_number":641,"name":"stone-wall","position":{"x":-22,"y":11}},{"entity_number":642,"name":"land-mine","position":{"x":-20.30078125,"y":11.75}},{"entity_number":643,"name":"land-mine","position":{"x":-20.18359375,"y":10.03515625}},{"entity_number":644,"name":"stone-wall","position":{"x":-21,"y":10}},{"entity_number":645,"name":"land-mine","position":{"x":-19.25390625,"y":10.9375}},{"entity_number":646,"name":"stone-wall","position":{"x":-20,"y":11}},{"entity_number":647,"name":"stone-wall","position":{"x":-19,"y":10}},{"entity_number":648,"name":"stone-wall","position":{"x":-18,"y":10}},{"entity_number":649,"name":"stone-wall","position":{"x":-18,"y":11}},{"entity_number":650,"name":"stone-wall","position":{"x":-17,"y":11}},{"entity_number":651,"name":"stone-wall","position":{"x":-17,"y":10}},{"entity_number":652,"name":"solar-panel","position":{"x":-15,"y":11}},{"entity_number":653,"name":"big-electric-pole","position":{"x":-12.5,"y":11.5}},{"entity_number":654,"name":"big-electric-pole","position":{"x":11.5,"y":11.5}},{"entity_number":655,"name":"solar-panel","position":{"x":14,"y":11}},{"entity_number":656,"name":"stone-wall","position":{"x":16,"y":11}},{"entity_number":657,"name":"stone-wall","position":{"x":16,"y":10}},{"entity_number":658,"name":"stone-wall","position":{"x":17,"y":11}},{"entity_number":659,"name":"stone-wall","position":{"x":17,"y":10}},{"entity_number":660,"name":"land-mine","position":{"x":18.76953125,"y":10.7734375}},{"entity_number":661,"name":"land-mine","position":{"x":17.92578125,"y":9.97265625}},{"entity_number":662,"name":"stone-wall","position":{"x":18,"y":11}},{"entity_number":663,"name":"stone-wall","position":{"x":19,"y":10}},{"entity_number":664,"name":"land-mine","position":{"x":19.9765625,"y":11.875}},{"entity_number":665,"name":"stone-wall","position":{"x":20,"y":11}},{"entity_number":666,"name":"land-mine","position":{"x":21.71875,"y":10.2109375}},{"entity_number":667,"name":"land-mine","position":{"x":21.28515625,"y":11.234375}},{"entity_number":668,"name":"stone-wall","position":{"x":21,"y":10}},{"entity_number":669,"name":"land-mine","position":{"x":22.84765625,"y":10.7734375}},{"entity_number":670,"name":"land-mine","position":{"x":22.20703125,"y":11.69921875}},{"entity_number":671,"name":"stone-wall","position":{"x":22,"y":11}},{"entity_number":672,"name":"stone-wall","position":{"x":23,"y":10}},{"entity_number":673,"name":"land-mine","position":{"x":-23.25,"y":12.7734375}},{"entity_number":674,"name":"stone-wall","position":{"x":-24,"y":13}},{"entity_number":675,"name":"stone-wall","position":{"x":-23,"y":12}},{"entity_number":676,"name":"land-mine","position":{"x":-21.18359375,"y":12.8203125}},{"entity_number":677,"name":"land-mine","position":{"x":-21.90234375,"y":13.86328125}},{"entity_number":678,"name":"stone-wall","position":{"x":-22,"y":13}},{"entity_number":679,"name":"land-mine","position":{"x":-20.16015625,"y":13.81640625}},{"entity_number":680,"name":"stone-wall","position":{"x":-21,"y":12}},{"entity_number":681,"name":"stone-wall","position":{"x":-20,"y":13}},{"entity_number":682,"name":"land-mine","position":{"x":-19,"y":13.19140625}},{"entity_number":683,"name":"stone-wall","position":{"x":-19,"y":12}},{"entity_number":684,"name":"stone-wall","position":{"x":-18,"y":12}},{"entity_number":685,"name":"stone-wall","position":{"x":-18,"y":13}},{"entity_number":686,"name":"stone-wall","position":{"x":-17,"y":13}},{"entity_number":687,"name":"stone-wall","position":{"x":-17,"y":12}},{"entity_number":688,"name":"radar","position":{"x":-15,"y":14}},{"entity_number":689,"name":"solar-panel","position":{"x":-12,"y":14}},{"entity_number":690,"name":"solar-panel","position":{"x":11,"y":14}},{"entity_number":691,"name":"solar-panel","position":{"x":14,"y":14}},{"entity_number":692,"name":"stone-wall","position":{"x":16,"y":12}},{"entity_number":693,"name":"stone-wall","position":{"x":16,"y":13}},{"entity_number":694,"name":"stone-wall","position":{"x":17,"y":13}},{"entity_number":695,"name":"stone-wall","position":{"x":17,"y":12}},{"entity_number":696,"name":"land-mine","position":{"x":17.8984375,"y":12.25}},{"entity_number":697,"name":"stone-wall","position":{"x":18,"y":13}},{"entity_number":698,"name":"land-mine","position":{"x":18.9765625,"y":12.8515625}},{"entity_number":699,"name":"stone-wall","position":{"x":19,"y":12}},{"entity_number":700,"name":"stone-wall","position":{"x":20,"y":13}},{"entity_number":701,"name":"land-mine","position":{"x":21.12890625,"y":13.28515625}},{"entity_number":702,"name":"stone-wall","position":{"x":21,"y":12}},{"entity_number":703,"name":"stone-wall","position":{"x":23,"y":12}},{"entity_number":704,"name":"stone-wall","position":{"x":-24,"y":15}},{"entity_number":705,"name":"land-mine","position":{"x":-22.73828125,"y":15.046875}},{"entity_number":706,"name":"stone-wall","position":{"x":-23,"y":14}},{"entity_number":707,"name":"land-mine","position":{"x":-21.296875,"y":14.79296875}},{"entity_number":708,"name":"stone-wall","position":{"x":-22,"y":15}},{"entity_number":709,"name":"stone-wall","position":{"x":-21,"y":14}},{"entity_number":710,"name":"stone-wall","position":{"x":-20,"y":15}},{"entity_number":711,"name":"land-mine","position":{"x":-19,"y":14.86328125}},{"entity_number":712,"name":"stone-wall","position":{"x":-19,"y":14}},{"entity_number":713,"name":"stone-wall","position":{"x":-18,"y":14}},{"entity_number":714,"name":"stone-wall","position":{"x":-18,"y":15}},{"entity_number":715,"name":"stone-wall","position":{"x":-17,"y":15}},{"entity_number":716,"name":"stone-wall","position":{"x":-17,"y":14}},{"entity_number":717,"name":"infinity-chest","position":{"x":-8,"y":15},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":718,"name":"medium-electric-pole","position":{"x":-7,"y":14}},{"entity_number":719,"name":"inserter","position":{"x":-7,"y":15},"direction":6},{"entity_number":720,"name":"gun-turret","position":{"x":-5.5,"y":14.5}},{"entity_number":721,"name":"gun-turret","position":{"x":4.5,"y":14.5}},{"entity_number":722,"name":"medium-electric-pole","position":{"x":6,"y":14}},{"entity_number":723,"name":"inserter","position":{"x":6,"y":15},"direction":2},{"entity_number":724,"name":"infinity-chest","position":{"x":7,"y":15},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":725,"name":"stone-wall","position":{"x":16,"y":15}},{"entity_number":726,"name":"stone-wall","position":{"x":16,"y":14}},{"entity_number":727,"name":"stone-wall","position":{"x":17,"y":15}},{"entity_number":728,"name":"stone-wall","position":{"x":17,"y":14}},{"entity_number":729,"name":"land-mine","position":{"x":17.8984375,"y":14.2265625}},{"entity_number":730,"name":"stone-wall","position":{"x":18,"y":15}},{"entity_number":731,"name":"land-mine","position":{"x":19.0546875,"y":14.92578125}},{"entity_number":732,"name":"stone-wall","position":{"x":19,"y":14}},{"entity_number":733,"name":"land-mine","position":{"x":20.0546875,"y":13.92578125}},{"entity_number":734,"name":"stone-wall","position":{"x":20,"y":15}},{"entity_number":735,"name":"land-mine","position":{"x":21.0546875,"y":15.18359375}},{"entity_number":736,"name":"stone-wall","position":{"x":21,"y":14}},{"entity_number":737,"name":"stone-wall","position":{"x":-24,"y":17}},{"entity_number":738,"name":"land-mine","position":{"x":-23.1015625,"y":16.76171875}},{"entity_number":739,"name":"stone-wall","position":{"x":-23,"y":16}},{"entity_number":740,"name":"land-mine","position":{"x":-22,"y":16.19921875}},{"entity_number":741,"name":"land-mine","position":{"x":-21.69140625,"y":17.76171875}},{"entity_number":742,"name":"stone-wall","position":{"x":-22,"y":17}},{"entity_number":743,"name":"land-mine","position":{"x":-20.8203125,"y":17.09765625}},{"entity_number":744,"name":"land-mine","position":{"x":-20.3046875,"y":16.171875}},{"entity_number":745,"name":"stone-wall","position":{"x":-21,"y":16}},{"entity_number":746,"name":"land-mine","position":{"x":-19.3046875,"y":17.25}},{"entity_number":747,"name":"stone-wall","position":{"x":-20,"y":17}},{"entity_number":748,"name":"stone-wall","position":{"x":-19,"y":16}},{"entity_number":749,"name":"stone-wall","position":{"x":-18,"y":17}},{"entity_number":750,"name":"stone-wall","position":{"x":-18,"y":16}},{"entity_number":751,"name":"stone-wall","position":{"x":-17,"y":17}},{"entity_number":752,"name":"stone-wall","position":{"x":-17,"y":16}},{"entity_number":753,"name":"stone-wall","position":{"x":-16,"y":17}},{"entity_number":754,"name":"stone-wall","position":{"x":-16,"y":16}},{"entity_number":755,"name":"stone-wall","position":{"x":-15,"y":17}},{"entity_number":756,"name":"stone-wall","position":{"x":-15,"y":16}},{"entity_number":757,"name":"stone-wall","position":{"x":-14,"y":17}},{"entity_number":758,"name":"stone-wall","position":{"x":-14,"y":16}},{"entity_number":759,"name":"stone-wall","position":{"x":-13,"y":17}},{"entity_number":760,"name":"stone-wall","position":{"x":-13,"y":16}},{"entity_number":761,"name":"stone-wall","position":{"x":-12,"y":17}},{"entity_number":762,"name":"stone-wall","position":{"x":-12,"y":16}},{"entity_number":763,"name":"stone-wall","position":{"x":-11,"y":17}},{"entity_number":764,"name":"stone-wall","position":{"x":-11,"y":16}},{"entity_number":765,"name":"stone-wall","position":{"x":-10,"y":17}},{"entity_number":766,"name":"stone-wall","position":{"x":-10,"y":16}},{"entity_number":767,"name":"stone-wall","position":{"x":-9,"y":16}},{"entity_number":768,"name":"stone-wall","position":{"x":-9,"y":17}},{"entity_number":769,"name":"stone-wall","position":{"x":-8,"y":17}},{"entity_number":770,"name":"stone-wall","position":{"x":-8,"y":16}},{"entity_number":771,"name":"stone-wall","position":{"x":-7,"y":16}},{"entity_number":772,"name":"stone-wall","position":{"x":-7,"y":17}},{"entity_number":773,"name":"stone-wall","position":{"x":-6,"y":16}},{"entity_number":774,"name":"stone-wall","position":{"x":-6,"y":17}},{"entity_number":775,"name":"stone-wall","position":{"x":-5,"y":16}},{"entity_number":776,"name":"stone-wall","position":{"x":-5,"y":17}},{"entity_number":777,"name":"gate","position":{"x":-4,"y":16},"direction":2},{"entity_number":778,"name":"gate","position":{"x":-4,"y":17},"direction":2},{"entity_number":779,"name":"gate","position":{"x":-3,"y":17},"direction":2},{"entity_number":780,"name":"gate","position":{"x":-3,"y":16},"direction":2},{"entity_number":781,"name":"gate","position":{"x":-2,"y":16},"direction":2},{"entity_number":782,"name":"gate","position":{"x":-2,"y":17},"direction":2},{"entity_number":783,"name":"gate","position":{"x":-1,"y":16},"direction":2},{"entity_number":784,"name":"gate","position":{"x":-1,"y":17},"direction":2},{"entity_number":785,"name":"gate","position":{"x":0,"y":16},"direction":2},{"entity_number":786,"name":"gate","position":{"x":0,"y":17},"direction":2},{"entity_number":787,"name":"gate","position":{"x":1,"y":16},"direction":2},{"entity_number":788,"name":"gate","position":{"x":1,"y":17},"direction":2},{"entity_number":789,"name":"gate","position":{"x":2,"y":16},"direction":2},{"entity_number":790,"name":"gate","position":{"x":2,"y":17},"direction":2},{"entity_number":791,"name":"gate","position":{"x":3,"y":17},"direction":2},{"entity_number":792,"name":"gate","position":{"x":3,"y":16},"direction":2},{"entity_number":793,"name":"stone-wall","position":{"x":4,"y":17}},{"entity_number":794,"name":"stone-wall","position":{"x":4,"y":16}},{"entity_number":795,"name":"stone-wall","position":{"x":5,"y":17}},{"entity_number":796,"name":"stone-wall","position":{"x":5,"y":16}},{"entity_number":797,"name":"stone-wall","position":{"x":6,"y":17}},{"entity_number":798,"name":"stone-wall","position":{"x":6,"y":16}},{"entity_number":799,"name":"stone-wall","position":{"x":7,"y":17}},{"entity_number":800,"name":"stone-wall","position":{"x":7,"y":16}},{"entity_number":801,"name":"stone-wall","position":{"x":8,"y":17}},{"entity_number":802,"name":"stone-wall","position":{"x":8,"y":16}},{"entity_number":803,"name":"stone-wall","position":{"x":9,"y":17}},{"entity_number":804,"name":"stone-wall","position":{"x":9,"y":16}},{"entity_number":805,"name":"stone-wall","position":{"x":10,"y":17}},{"entity_number":806,"name":"stone-wall","position":{"x":10,"y":16}},{"entity_number":807,"name":"stone-wall","position":{"x":11,"y":17}},{"entity_number":808,"name":"stone-wall","position":{"x":11,"y":16}},{"entity_number":809,"name":"stone-wall","position":{"x":12,"y":17}},{"entity_number":810,"name":"stone-wall","position":{"x":12,"y":16}},{"entity_number":811,"name":"stone-wall","position":{"x":13,"y":17}},{"entity_number":812,"name":"stone-wall","position":{"x":13,"y":16}},{"entity_number":813,"name":"stone-wall","position":{"x":14,"y":17}},{"entity_number":814,"name":"stone-wall","position":{"x":14,"y":16}},{"entity_number":815,"name":"stone-wall","position":{"x":15,"y":16}},{"entity_number":816,"name":"stone-wall","position":{"x":15,"y":17}},{"entity_number":817,"name":"stone-wall","position":{"x":16,"y":17}},{"entity_number":818,"name":"stone-wall","position":{"x":16,"y":16}},{"entity_number":819,"name":"stone-wall","position":{"x":17,"y":17}},{"entity_number":820,"name":"stone-wall","position":{"x":17,"y":16}},{"entity_number":821,"name":"land-mine","position":{"x":17.94921875,"y":16.01953125}},{"entity_number":822,"name":"stone-wall","position":{"x":18,"y":17}},{"entity_number":823,"name":"land-mine","position":{"x":19.12890625,"y":17.18359375}},{"entity_number":824,"name":"land-mine","position":{"x":19.82421875,"y":16.27734375}},{"entity_number":825,"name":"stone-wall","position":{"x":19,"y":16}},{"entity_number":826,"name":"land-mine","position":{"x":20.74609375,"y":17.08203125}},{"entity_number":827,"name":"stone-wall","position":{"x":20,"y":17}},{"entity_number":828,"name":"stone-wall","position":{"x":21,"y":16}},{"entity_number":829,"name":"land-mine","position":{"x":-23.71484375,"y":18.27734375}},{"entity_number":830,"name":"stone-wall","position":{"x":-24,"y":19}},{"entity_number":831,"name":"land-mine","position":{"x":-22.9453125,"y":19.19921875}},{"entity_number":832,"name":"stone-wall","position":{"x":-23,"y":18}},{"entity_number":833,"name":"land-mine","position":{"x":-21.79296875,"y":19.83984375}},{"entity_number":834,"name":"stone-wall","position":{"x":-22,"y":19}},{"entity_number":835,"name":"land-mine","position":{"x":-20.71484375,"y":19.30078125}},{"entity_number":836,"name":"stone-wall","position":{"x":-21,"y":18}},{"entity_number":837,"name":"land-mine","position":{"x":-19.69140625,"y":18.27734375}},{"entity_number":838,"name":"stone-wall","position":{"x":-20,"y":19}},{"entity_number":839,"name":"land-mine","position":{"x":-18.1796875,"y":18.1484375}},{"entity_number":840,"name":"land-mine","position":{"x":-18.87109375,"y":19.30078125}},{"entity_number":841,"name":"stone-wall","position":{"x":-19,"y":18}},{"entity_number":842,"name":"stone-wall","position":{"x":-18,"y":19}},{"entity_number":843,"name":"land-mine","position":{"x":-17.1015625,"y":19.12109375}},{"entity_number":844,"name":"stone-wall","position":{"x":-17,"y":18}},{"entity_number":845,"name":"stone-wall","position":{"x":-16,"y":19}},{"entity_number":846,"name":"land-mine","position":{"x":-14.79296875,"y":19.04296875}},{"entity_number":847,"name":"stone-wall","position":{"x":-15,"y":18}},{"entity_number":848,"name":"land-mine","position":{"x":-13.94921875,"y":18.1484375}},{"entity_number":849,"name":"stone-wall","position":{"x":-14,"y":19}},{"entity_number":850,"name":"land-mine","position":{"x":-12.921875,"y":18.8671875}},{"entity_number":851,"name":"stone-wall","position":{"x":-13,"y":18}},{"entity_number":852,"name":"land-mine","position":{"x":-12.02734375,"y":18.12109375}},{"entity_number":853,"name":"stone-wall","position":{"x":-12,"y":19}},{"entity_number":854,"name":"land-mine","position":{"x":-11.05078125,"y":18.73828125}},{"entity_number":855,"name":"stone-wall","position":{"x":-11,"y":18}},{"entity_number":856,"name":"land-mine","position":{"x":-9.94921875,"y":19.86328125}},{"entity_number":857,"name":"land-mine","position":{"x":-9.89453125,"y":17.94140625}},{"entity_number":858,"name":"stone-wall","position":{"x":-10,"y":19}},{"entity_number":859,"name":"land-mine","position":{"x":-8.9765625,"y":18.7109375}},{"entity_number":860,"name":"stone-wall","position":{"x":-9,"y":18}},{"entity_number":861,"name":"stone-wall","position":{"x":-8,"y":19}},{"entity_number":862,"name":"land-mine","position":{"x":-6.94921875,"y":19.09765625}},{"entity_number":863,"name":"stone-wall","position":{"x":-7,"y":18}},{"entity_number":864,"name":"stone-wall","position":{"x":-6,"y":19}},{"entity_number":865,"name":"stone-wall","position":{"x":-5,"y":18}},{"entity_number":866,"name":"land-mine","position":{"x":-3.4921875,"y":19.875}},{"entity_number":867,"name":"land-mine","position":{"x":4.80859375,"y":19.27734375}},{"entity_number":868,"name":"stone-wall","position":{"x":4,"y":19}},{"entity_number":869,"name":"land-mine","position":{"x":5.734375,"y":18.171875}},{"entity_number":870,"name":"stone-wall","position":{"x":5,"y":18}},{"entity_number":871,"name":"land-mine","position":{"x":6.8359375,"y":19.12109375}},{"entity_number":872,"name":"stone-wall","position":{"x":6,"y":19}},{"entity_number":873,"name":"stone-wall","position":{"x":7,"y":18}},{"entity_number":874,"name":"land-mine","position":{"x":8.1171875,"y":17.91796875}},{"entity_number":875,"name":"land-mine","position":{"x":8.88671875,"y":19.09765625}},{"entity_number":876,"name":"stone-wall","position":{"x":8,"y":19}},{"entity_number":877,"name":"land-mine","position":{"x":9.78515625,"y":18.171875}},{"entity_number":878,"name":"stone-wall","position":{"x":9,"y":18}},{"entity_number":879,"name":"stone-wall","position":{"x":10,"y":19}},{"entity_number":880,"name":"land-mine","position":{"x":10.9609375,"y":18.76171875}},{"entity_number":881,"name":"land-mine","position":{"x":11.88671875,"y":18.22265625}},{"entity_number":882,"name":"stone-wall","position":{"x":11,"y":18}},{"entity_number":883,"name":"land-mine","position":{"x":12.21875,"y":19.76171875}},{"entity_number":884,"name":"stone-wall","position":{"x":12,"y":19}},{"entity_number":885,"name":"land-mine","position":{"x":13.74609375,"y":19.7109375}},{"entity_number":886,"name":"land-mine","position":{"x":13.88671875,"y":18.30078125}},{"entity_number":887,"name":"stone-wall","position":{"x":13,"y":18}},{"entity_number":888,"name":"stone-wall","position":{"x":14,"y":19}},{"entity_number":889,"name":"land-mine","position":{"x":15.2578125,"y":19.30078125}},{"entity_number":890,"name":"stone-wall","position":{"x":15,"y":18}},{"entity_number":891,"name":"land-mine","position":{"x":16.00390625,"y":18.30078125}},{"entity_number":892,"name":"stone-wall","position":{"x":16,"y":19}},{"entity_number":893,"name":"land-mine","position":{"x":17.71875,"y":18.09765625}},{"entity_number":894,"name":"stone-wall","position":{"x":17,"y":18}},{"entity_number":895,"name":"stone-wall","position":{"x":18,"y":19}},{"entity_number":896,"name":"land-mine","position":{"x":19.0546875,"y":19.30078125}},{"entity_number":897,"name":"stone-wall","position":{"x":19,"y":18}},{"entity_number":898,"name":"land-mine","position":{"x":19.94921875,"y":18.27734375}},{"entity_number":899,"name":"stone-wall","position":{"x":20,"y":19}},{"entity_number":900,"name":"stone-wall","position":{"x":21,"y":18}},{"entity_number":901,"name":"stone-wall","position":{"x":-23,"y":20}},{"entity_number":902,"name":"stone-wall","position":{"x":-22,"y":21}},{"entity_number":903,"name":"land-mine","position":{"x":-20.87109375,"y":21.25}},{"entity_number":904,"name":"stone-wall","position":{"x":-21,"y":20}},{"entity_number":905,"name":"land-mine","position":{"x":-19.87109375,"y":21.73828125}},{"entity_number":906,"name":"land-mine","position":{"x":-19.79296875,"y":20.25}},{"entity_number":907,"name":"stone-wall","position":{"x":-20,"y":21}},{"entity_number":908,"name":"land-mine","position":{"x":-18.921875,"y":20.8125}},{"entity_number":909,"name":"stone-wall","position":{"x":-19,"y":20}},{"entity_number":910,"name":"land-mine","position":{"x":-18.07421875,"y":21.76171875}},{"entity_number":911,"name":"land-mine","position":{"x":-17.71875,"y":19.94140625}},{"entity_number":912,"name":"stone-wall","position":{"x":-18,"y":21}},{"entity_number":913,"name":"land-mine","position":{"x":-16.15234375,"y":21.7109375}},{"entity_number":914,"name":"land-mine","position":{"x":-17,"y":21.04296875}},{"entity_number":915,"name":"land-mine","position":{"x":-16.23046875,"y":20.09765625}},{"entity_number":916,"name":"stone-wall","position":{"x":-17,"y":20}},{"entity_number":917,"name":"stone-wall","position":{"x":-16,"y":21}},{"entity_number":918,"name":"land-mine","position":{"x":-14.15234375,"y":21.86328125}},{"entity_number":919,"name":"land-mine","position":{"x":-15.05078125,"y":21.01953125}},{"entity_number":920,"name":"stone-wall","position":{"x":-15,"y":20}},{"entity_number":921,"name":"land-mine","position":{"x":-13.69140625,"y":20.04296875}},{"entity_number":922,"name":"stone-wall","position":{"x":-14,"y":21}},{"entity_number":923,"name":"land-mine","position":{"x":-12.94921875,"y":20.86328125}},{"entity_number":924,"name":"stone-wall","position":{"x":-13,"y":20}},{"entity_number":925,"name":"land-mine","position":{"x":-12,"y":19.96875}},{"entity_number":926,"name":"stone-wall","position":{"x":-12,"y":21}},{"entity_number":927,"name":"land-mine","position":{"x":-11,"y":20.9921875}},{"entity_number":928,"name":"stone-wall","position":{"x":-11,"y":20}},{"entity_number":929,"name":"stone-wall","position":{"x":-10,"y":21}},{"entity_number":930,"name":"land-mine","position":{"x":-8.87109375,"y":21.25}},{"entity_number":931,"name":"stone-wall","position":{"x":-9,"y":20}},{"entity_number":932,"name":"land-mine","position":{"x":-7.71875,"y":19.91796875}},{"entity_number":933,"name":"stone-wall","position":{"x":-8,"y":21}},{"entity_number":934,"name":"land-mine","position":{"x":-6.2578125,"y":20.25}},{"entity_number":935,"name":"land-mine","position":{"x":-6.94921875,"y":21.2734375}},{"entity_number":936,"name":"stone-wall","position":{"x":-7,"y":20}},{"entity_number":937,"name":"stone-wall","position":{"x":-6,"y":21}},{"entity_number":938,"name":"stone-wall","position":{"x":-5,"y":20}},{"entity_number":939,"name":"land-mine","position":{"x":-2.6796875,"y":19.90625}},{"entity_number":940,"name":"land-mine","position":{"x":-3.4609375,"y":21.8125}},{"entity_number":941,"name":"land-mine","position":{"x":-2.4921875,"y":21.8125}},{"entity_number":942,"name":"land-mine","position":{"x":-1.8671875,"y":19.9375}},{"entity_number":943,"name":"land-mine","position":{"x":-0.9296875,"y":20}},{"entity_number":944,"name":"land-mine","position":{"x":-1.2734375,"y":21.84375}},{"entity_number":945,"name":"land-mine","position":{"x":0.0390625,"y":20.03125}},{"entity_number":946,"name":"land-mine","position":{"x":0.8828125,"y":20.125}},{"entity_number":947,"name":"land-mine","position":{"x":1.7578125,"y":20.09375}},{"entity_number":948,"name":"land-mine","position":{"x":2.6015625,"y":20.03125}},{"entity_number":949,"name":"land-mine","position":{"x":4.859375,"y":21.0703125}},{"entity_number":950,"name":"stone-wall","position":{"x":4,"y":21}},{"entity_number":951,"name":"land-mine","position":{"x":5.7578125,"y":21.7890625}},{"entity_number":952,"name":"stone-wall","position":{"x":5,"y":20}},{"entity_number":953,"name":"land-mine","position":{"x":6.296875,"y":20.25}},{"entity_number":954,"name":"stone-wall","position":{"x":6,"y":21}},{"entity_number":955,"name":"land-mine","position":{"x":7.73046875,"y":19.94140625}},{"entity_number":956,"name":"stone-wall","position":{"x":7,"y":20}},{"entity_number":957,"name":"land-mine","position":{"x":8.8359375,"y":20.73828125}},{"entity_number":958,"name":"stone-wall","position":{"x":8,"y":21}},{"entity_number":959,"name":"land-mine","position":{"x":9.73046875,"y":21.7890625}},{"entity_number":960,"name":"stone-wall","position":{"x":9,"y":20}},{"entity_number":961,"name":"land-mine","position":{"x":10.26953125,"y":20.01953125}},{"entity_number":962,"name":"stone-wall","position":{"x":10,"y":21}},{"entity_number":963,"name":"land-mine","position":{"x":11.21875,"y":21.25}},{"entity_number":964,"name":"stone-wall","position":{"x":11,"y":20}},{"entity_number":965,"name":"land-mine","position":{"x":12.0390625,"y":21.8125}},{"entity_number":966,"name":"land-mine","position":{"x":12.859375,"y":21.171875}},{"entity_number":967,"name":"stone-wall","position":{"x":12,"y":21}},{"entity_number":968,"name":"stone-wall","position":{"x":13,"y":20}},{"entity_number":969,"name":"land-mine","position":{"x":14.70703125,"y":20.94140625}},{"entity_number":970,"name":"stone-wall","position":{"x":14,"y":21}},{"entity_number":971,"name":"land-mine","position":{"x":15.80859375,"y":20.171875}},{"entity_number":972,"name":"stone-wall","position":{"x":15,"y":20}},{"entity_number":973,"name":"stone-wall","position":{"x":16,"y":21}},{"entity_number":974,"name":"land-mine","position":{"x":16.9765625,"y":20.6953125}},{"entity_number":975,"name":"land-mine","position":{"x":17.84765625,"y":20.01953125}},{"entity_number":976,"name":"stone-wall","position":{"x":17,"y":20}},{"entity_number":977,"name":"stone-wall","position":{"x":18,"y":21}},{"entity_number":978,"name":"stone-wall","position":{"x":19,"y":20}},{"entity_number":979,"name":"stone-wall","position":{"x":-21,"y":22}},{"entity_number":980,"name":"stone-wall","position":{"x":-19,"y":22}},{"entity_number":981,"name":"stone-wall","position":{"x":-17,"y":22}},{"entity_number":982,"name":"stone-wall","position":{"x":-16,"y":23}},{"entity_number":983,"name":"land-mine","position":{"x":-14.8984375,"y":22.7890625}},{"entity_number":984,"name":"stone-wall","position":{"x":-15,"y":22}},{"entity_number":985,"name":"stone-wall","position":{"x":-14,"y":23}},{"entity_number":986,"name":"land-mine","position":{"x":-12.921875,"y":22.8125}},{"entity_number":987,"name":"stone-wall","position":{"x":-13,"y":22}},{"entity_number":988,"name":"land-mine","position":{"x":-11.921875,"y":22.25}},{"entity_number":989,"name":"stone-wall","position":{"x":-12,"y":23}},{"entity_number":990,"name":"land-mine","position":{"x":-11.05078125,"y":23.01953125}},{"entity_number":991,"name":"stone-wall","position":{"x":-11,"y":22}},{"entity_number":992,"name":"land-mine","position":{"x":-9.796875,"y":22.25}},{"entity_number":993,"name":"stone-wall","position":{"x":-10,"y":23}},{"entity_number":994,"name":"land-mine","position":{"x":-8.74609375,"y":23.01953125}},{"entity_number":995,"name":"stone-wall","position":{"x":-9,"y":22}},{"entity_number":996,"name":"land-mine","position":{"x":-7.8203125,"y":22.12109375}},{"entity_number":997,"name":"stone-wall","position":{"x":-8,"y":23}},{"entity_number":998,"name":"land-mine","position":{"x":-6.796875,"y":22.86328125}},{"entity_number":999,"name":"stone-wall","position":{"x":-7,"y":22}},{"entity_number":1000,"name":"land-mine","position":{"x":-6.0546875,"y":21.96875}},{"entity_number":1001,"name":"stone-wall","position":{"x":-6,"y":23}},{"entity_number":1002,"name":"stone-wall","position":{"x":-5,"y":22}},{"entity_number":1003,"name":"land-mine","position":{"x":-0.3359375,"y":21.90625}},{"entity_number":1004,"name":"land-mine","position":{"x":0.6328125,"y":22}},{"entity_number":1005,"name":"land-mine","position":{"x":1.5390625,"y":22}},{"entity_number":1006,"name":"land-mine","position":{"x":2.5390625,"y":22}},{"entity_number":1007,"name":"stone-wall","position":{"x":4,"y":23}},{"entity_number":1008,"name":"land-mine","position":{"x":5.0390625,"y":22.7109375}},{"entity_number":1009,"name":"stone-wall","position":{"x":5,"y":22}},{"entity_number":1010,"name":"stone-wall","position":{"x":6,"y":23}},{"entity_number":1011,"name":"land-mine","position":{"x":7.88671875,"y":21.94140625}},{"entity_number":1012,"name":"stone-wall","position":{"x":7,"y":22}},{"entity_number":1013,"name":"stone-wall","position":{"x":9,"y":22}},{"entity_number":1014,"name":"stone-wall","position":{"x":11,"y":22}},{"entity_number":1015,"name":"stone-wall","position":{"x":13,"y":22}}],"tiles":[{"position":{"x":-24,"y":-13},"name":"refined-concrete"},{"position":{"x":-24,"y":-11},"name":"refined-concrete"},{"position":{"x":-24,"y":-10},"name":"refined-concrete"},{"position":{"x":-24,"y":-9},"name":"refined-concrete"},{"position":{"x":-24,"y":-8},"name":"refined-concrete"},{"position":{"x":-24,"y":-7},"name":"refined-concrete"},{"position":{"x":-24,"y":7},"name":"refined-concrete"},{"position":{"x":-24,"y":8},"name":"refined-concrete"},{"position":{"x":-24,"y":9},"name":"refined-concrete"},{"position":{"x":-24,"y":12},"name":"refined-concrete"},{"position":{"x":-24,"y":13},"name":"refined-concrete"},{"position":{"x":-24,"y":14},"name":"refined-concrete"},{"position":{"x":-24,"y":18},"name":"refined-concrete"},{"position":{"x":-23,"y":-17},"name":"refined-concrete"},{"position":{"x":-23,"y":-16},"name":"refined-concrete"},{"position":{"x":-23,"y":-15},"name":"refined-concrete"},{"position":{"x":-23,"y":-14},"name":"refined-concrete"},{"position":{"x":-23,"y":-13},"name":"refined-concrete"},{"position":{"x":-23,"y":-12},"name":"refined-concrete"},{"position":{"x":-23,"y":-11},"name":"refined-concrete"},{"position":{"x":-23,"y":-10},"name":"refined-concrete"},{"position":{"x":-23,"y":-9},"name":"refined-concrete"},{"position":{"x":-23,"y":-8},"name":"refined-concrete"},{"position":{"x":-23,"y":-7},"name":"refined-concrete"},{"position":{"x":-23,"y":-6},"name":"refined-concrete"},{"position":{"x":-23,"y":-5},"name":"refined-concrete"},{"position":{"x":-23,"y":-3},"name":"refined-concrete"},{"position":{"x":-23,"y":-2},"name":"refined-concrete"},{"position":{"x":-23,"y":-1},"name":"refined-concrete"},{"position":{"x":-23,"y":0},"name":"refined-concrete"},{"position":{"x":-23,"y":1},"name":"refined-concrete"},{"position":{"x":-23,"y":2},"name":"refined-concrete"},{"position":{"x":-23,"y":5},"name":"refined-concrete"},{"position":{"x":-23,"y":6},"name":"refined-concrete"},{"position":{"x":-23,"y":7},"name":"refined-concrete"},{"position":{"x":-23,"y":8},"name":"refined-concrete"},{"position":{"x":-23,"y":9},"name":"refined-concrete"},{"position":{"x":-23,"y":10},"name":"refined-concrete"},{"position":{"x":-23,"y":11},"name":"refined-concrete"},{"position":{"x":-23,"y":12},"name":"refined-concrete"},{"position":{"x":-23,"y":13},"name":"refined-concrete"},{"position":{"x":-23,"y":14},"name":"refined-concrete"},{"position":{"x":-23,"y":15},"name":"refined-concrete"},{"position":{"x":-23,"y":16},"name":"refined-concrete"},{"position":{"x":-23,"y":17},"name":"refined-concrete"},{"position":{"x":-23,"y":18},"name":"refined-concrete"},{"position":{"x":-23,"y":19},"name":"refined-concrete"},{"position":{"x":-23,"y":20},"name":"refined-concrete"},{"position":{"x":-22,"y":-19},"name":"refined-concrete"},{"position":{"x":-22,"y":-18},"name":"refined-concrete"},{"position":{"x":-22,"y":-17},"name":"refined-concrete"},{"position":{"x":-22,"y":-16},"name":"refined-concrete"},{"position":{"x":-22,"y":-15},"name":"refined-concrete"},{"position":{"x":-22,"y":-14},"name":"refined-concrete"},{"position":{"x":-22,"y":-13},"name":"refined-concrete"},{"position":{"x":-22,"y":-12},"name":"refined-concrete"},{"position":{"x":-22,"y":-11},"name":"refined-concrete"},{"position":{"x":-22,"y":-10},"name":"refined-concrete"},{"position":{"x":-22,"y":-9},"name":"refined-concrete"},{"position":{"x":-22,"y":-8},"name":"refined-concrete"},{"position":{"x":-22,"y":-7},"name":"refined-concrete"},{"position":{"x":-22,"y":-6},"name":"refined-concrete"},{"position":{"x":-22,"y":-5},"name":"refined-concrete"},{"position":{"x":-22,"y":-4},"name":"refined-concrete"},{"position":{"x":-22,"y":-3},"name":"refined-concrete"},{"position":{"x":-22,"y":-2},"name":"refined-concrete"},{"position":{"x":-22,"y":-1},"name":"refined-concrete"},{"position":{"x":-22,"y":0},"name":"refined-concrete"},{"position":{"x":-22,"y":1},"name":"refined-concrete"},{"position":{"x":-22,"y":2},"name":"refined-concrete"},{"position":{"x":-22,"y":3},"name":"refined-concrete"},{"position":{"x":-22,"y":4},"name":"refined-concrete"},{"position":{"x":-22,"y":5},"name":"refined-concrete"},{"position":{"x":-22,"y":6},"name":"refined-concrete"},{"position":{"x":-22,"y":7},"name":"refined-concrete"},{"position":{"x":-22,"y":8},"name":"refined-concrete"},{"position":{"x":-22,"y":9},"name":"refined-concrete"},{"position":{"x":-22,"y":10},"name":"refined-concrete"},{"position":{"x":-22,"y":11},"name":"refined-concrete"},{"position":{"x":-22,"y":12},"name":"refined-concrete"},{"position":{"x":-22,"y":13},"name":"refined-concrete"},{"position":{"x":-22,"y":14},"name":"refined-concrete"},{"position":{"x":-22,"y":15},"name":"refined-concrete"},{"position":{"x":-22,"y":16},"name":"refined-concrete"},{"position":{"x":-22,"y":17},"name":"refined-concrete"},{"position":{"x":-22,"y":18},"name":"refined-concrete"},{"position":{"x":-22,"y":19},"name":"refined-concrete"},{"position":{"x":-22,"y":20},"name":"refined-concrete"},{"position":{"x":-21,"y":-20},"name":"refined-concrete"},{"position":{"x":-21,"y":-19},"name":"refined-concrete"},{"position":{"x":-21,"y":-18},"name":"refined-concrete"},{"position":{"x":-21,"y":-17},"name":"refined-concrete"},{"position":{"x":-21,"y":-16},"name":"refined-concrete"},{"position":{"x":-21,"y":-15},"name":"refined-concrete"},{"position":{"x":-21,"y":-14},"name":"refined-concrete"},{"position":{"x":-21,"y":-13},"name":"refined-concrete"},{"position":{"x":-21,"y":-12},"name":"refined-concrete"},{"position":{"x":-21,"y":-11},"name":"refined-concrete"},{"position":{"x":-21,"y":-10},"name":"refined-concrete"},{"position":{"x":-21,"y":-9},"name":"refined-concrete"},{"position":{"x":-21,"y":-8},"name":"refined-concrete"},{"position":{"x":-21,"y":-7},"name":"refined-concrete"},{"position":{"x":-21,"y":-6},"name":"refined-concrete"},{"position":{"x":-21,"y":-5},"name":"refined-concrete"},{"position":{"x":-21,"y":-4},"name":"refined-concrete"},{"position":{"x":-21,"y":-3},"name":"refined-concrete"},{"position":{"x":-21,"y":-2},"name":"refined-concrete"},{"position":{"x":-21,"y":-1},"name":"refined-concrete"},{"position":{"x":-21,"y":0},"name":"refined-concrete"},{"position":{"x":-21,"y":1},"name":"refined-concrete"},{"position":{"x":-21,"y":2},"name":"refined-concrete"},{"position":{"x":-21,"y":3},"name":"refined-concrete"},{"position":{"x":-21,"y":4},"name":"refined-concrete"},{"position":{"x":-21,"y":5},"name":"refined-concrete"},{"position":{"x":-21,"y":6},"name":"refined-concrete"},{"position":{"x":-21,"y":7},"name":"refined-concrete"},{"position":{"x":-21,"y":8},"name":"refined-concrete"},{"position":{"x":-21,"y":9},"name":"refined-concrete"},{"position":{"x":-21,"y":10},"name":"refined-concrete"},{"position":{"x":-21,"y":11},"name":"refined-concrete"},{"position":{"x":-21,"y":12},"name":"refined-concrete"},{"position":{"x":-21,"y":13},"name":"refined-concrete"},{"position":{"x":-21,"y":14},"name":"refined-concrete"},{"position":{"x":-21,"y":15},"name":"refined-concrete"},{"position":{"x":-21,"y":16},"name":"refined-concrete"},{"position":{"x":-21,"y":17},"name":"refined-concrete"},{"position":{"x":-21,"y":18},"name":"refined-concrete"},{"position":{"x":-21,"y":19},"name":"refined-concrete"},{"position":{"x":-21,"y":20},"name":"refined-concrete"},{"position":{"x":-21,"y":21},"name":"refined-concrete"},{"position":{"x":-20,"y":-21},"name":"refined-concrete"},{"position":{"x":-20,"y":-20},"name":"refined-concrete"},{"position":{"x":-20,"y":-19},"name":"refined-concrete"},{"position":{"x":-20,"y":-18},"name":"refined-concrete"},{"position":{"x":-20,"y":-17},"name":"refined-concrete"},{"position":{"x":-20,"y":-16},"name":"refined-concrete"},{"position":{"x":-20,"y":-15},"name":"refined-concrete"},{"position":{"x":-20,"y":-14},"name":"refined-concrete"},{"position":{"x":-20,"y":-13},"name":"refined-concrete"},{"position":{"x":-20,"y":-12},"name":"refined-concrete"},{"position":{"x":-20,"y":-11},"name":"refined-concrete"},{"position":{"x":-20,"y":-10},"name":"refined-concrete"},{"position":{"x":-20,"y":-9},"name":"refined-concrete"},{"position":{"x":-20,"y":-8},"name":"refined-concrete"},{"position":{"x":-20,"y":-7},"name":"refined-concrete"},{"position":{"x":-20,"y":-6},"name":"refined-concrete"},{"position":{"x":-20,"y":-5},"name":"refined-concrete"},{"position":{"x":-20,"y":-4},"name":"refined-concrete"},{"position":{"x":-20,"y":-3},"name":"refined-concrete"},{"position":{"x":-20,"y":-2},"name":"refined-concrete"},{"position":{"x":-20,"y":-1},"name":"refined-concrete"},{"position":{"x":-20,"y":0},"name":"refined-concrete"},{"position":{"x":-20,"y":1},"name":"refined-concrete"},{"position":{"x":-20,"y":2},"name":"refined-concrete"},{"position":{"x":-20,"y":3},"name":"refined-concrete"},{"position":{"x":-20,"y":4},"name":"refined-concrete"},{"position":{"x":-20,"y":5},"name":"refined-concrete"},{"position":{"x":-20,"y":6},"name":"refined-concrete"},{"position":{"x":-20,"y":7},"name":"refined-concrete"},{"position":{"x":-20,"y":8},"name":"refined-concrete"},{"position":{"x":-20,"y":9},"name":"refined-concrete"},{"position":{"x":-20,"y":10},"name":"refined-concrete"},{"position":{"x":-20,"y":11},"name":"refined-concrete"},{"position":{"x":-20,"y":12},"name":"refined-concrete"},{"position":{"x":-20,"y":13},"name":"refined-concrete"},{"position":{"x":-20,"y":14},"name":"refined-concrete"},{"position":{"x":-20,"y":15},"name":"refined-concrete"},{"position":{"x":-20,"y":16},"name":"refined-concrete"},{"position":{"x":-20,"y":17},"name":"refined-concrete"},{"position":{"x":-20,"y":18},"name":"refined-concrete"},{"position":{"x":-20,"y":19},"name":"refined-concrete"},{"position":{"x":-20,"y":20},"name":"refined-concrete"},{"position":{"x":-20,"y":21},"name":"refined-concrete"},{"position":{"x":-20,"y":22},"name":"refined-concrete"},{"position":{"x":-19,"y":-22},"name":"refined-concrete"},{"position":{"x":-19,"y":-21},"name":"refined-concrete"},{"position":{"x":-19,"y":-20},"name":"refined-concrete"},{"position":{"x":-19,"y":-19},"name":"refined-concrete"},{"position":{"x":-19,"y":-18},"name":"refined-concrete"},{"position":{"x":-19,"y":-17},"name":"refined-concrete"},{"position":{"x":-19,"y":-16},"name":"refined-concrete"},{"position":{"x":-19,"y":-15},"name":"refined-concrete"},{"position":{"x":-19,"y":-14},"name":"refined-concrete"},{"position":{"x":-19,"y":-13},"name":"refined-concrete"},{"position":{"x":-19,"y":-12},"name":"refined-concrete"},{"position":{"x":-19,"y":-11},"name":"refined-concrete"},{"position":{"x":-19,"y":-10},"name":"refined-concrete"},{"position":{"x":-19,"y":-9},"name":"refined-concrete"},{"position":{"x":-19,"y":-8},"name":"refined-concrete"},{"position":{"x":-19,"y":-7},"name":"refined-concrete"},{"position":{"x":-19,"y":-6},"name":"refined-concrete"},{"position":{"x":-19,"y":-5},"name":"refined-concrete"},{"position":{"x":-19,"y":-4},"name":"refined-concrete"},{"position":{"x":-19,"y":-3},"name":"refined-concrete"},{"position":{"x":-19,"y":-2},"name":"refined-concrete"},{"position":{"x":-19,"y":-1},"name":"refined-concrete"},{"position":{"x":-19,"y":0},"name":"refined-concrete"},{"position":{"x":-19,"y":1},"name":"refined-concrete"},{"position":{"x":-19,"y":2},"name":"refined-concrete"},{"position":{"x":-19,"y":3},"name":"refined-concrete"},{"position":{"x":-19,"y":4},"name":"refined-concrete"},{"position":{"x":-19,"y":5},"name":"refined-concrete"},{"position":{"x":-19,"y":6},"name":"refined-concrete"},{"position":{"x":-19,"y":7},"name":"refined-concrete"},{"position":{"x":-19,"y":8},"name":"refined-concrete"},{"position":{"x":-19,"y":9},"name":"refined-concrete"},{"position":{"x":-19,"y":10},"name":"refined-concrete"},{"position":{"x":-19,"y":11},"name":"refined-concrete"},{"position":{"x":-19,"y":12},"name":"refined-concrete"},{"position":{"x":-19,"y":13},"name":"refined-concrete"},{"position":{"x":-19,"y":14},"name":"refined-concrete"},{"position":{"x":-19,"y":15},"name":"refined-concrete"},{"position":{"x":-19,"y":16},"name":"refined-concrete"},{"position":{"x":-19,"y":17},"name":"refined-concrete"},{"position":{"x":-19,"y":18},"name":"refined-concrete"},{"position":{"x":-19,"y":19},"name":"refined-concrete"},{"position":{"x":-19,"y":20},"name":"refined-concrete"},{"position":{"x":-19,"y":21},"name":"refined-concrete"},{"position":{"x":-19,"y":22},"name":"refined-concrete"},{"position":{"x":-18,"y":-22},"name":"refined-concrete"},{"position":{"x":-18,"y":-21},"name":"refined-concrete"},{"position":{"x":-18,"y":-20},"name":"refined-concrete"},{"position":{"x":-18,"y":-19},"name":"refined-concrete"},{"position":{"x":-18,"y":-18},"name":"refined-concrete"},{"position":{"x":-18,"y":-17},"name":"refined-concrete"},{"position":{"x":-18,"y":-16},"name":"refined-concrete"},{"position":{"x":-18,"y":-15},"name":"refined-concrete"},{"position":{"x":-18,"y":-14},"name":"refined-concrete"},{"position":{"x":-18,"y":-13},"name":"refined-concrete"},{"position":{"x":-18,"y":-12},"name":"refined-concrete"},{"position":{"x":-18,"y":-11},"name":"refined-concrete"},{"position":{"x":-18,"y":-10},"name":"refined-concrete"},{"position":{"x":-18,"y":-9},"name":"refined-concrete"},{"position":{"x":-18,"y":-8},"name":"refined-concrete"},{"position":{"x":-18,"y":-7},"name":"refined-concrete"},{"position":{"x":-18,"y":-6},"name":"refined-concrete"},{"position":{"x":-18,"y":-5},"name":"refined-concrete"},{"position":{"x":-18,"y":-4},"name":"refined-concrete"},{"position":{"x":-18,"y":-3},"name":"refined-concrete"},{"position":{"x":-18,"y":-2},"name":"refined-concrete"},{"position":{"x":-18,"y":-1},"name":"refined-concrete"},{"position":{"x":-18,"y":0},"name":"refined-concrete"},{"position":{"x":-18,"y":1},"name":"refined-concrete"},{"position":{"x":-18,"y":2},"name":"refined-concrete"},{"position":{"x":-18,"y":3},"name":"refined-concrete"},{"position":{"x":-18,"y":4},"name":"refined-concrete"},{"position":{"x":-18,"y":5},"name":"refined-concrete"},{"position":{"x":-18,"y":6},"name":"refined-concrete"},{"position":{"x":-18,"y":7},"name":"refined-concrete"},{"position":{"x":-18,"y":8},"name":"refined-concrete"},{"position":{"x":-18,"y":9},"name":"refined-concrete"},{"position":{"x":-18,"y":10},"name":"refined-concrete"},{"position":{"x":-18,"y":11},"name":"refined-concrete"},{"position":{"x":-18,"y":12},"name":"refined-concrete"},{"position":{"x":-18,"y":13},"name":"refined-concrete"},{"position":{"x":-18,"y":14},"name":"refined-concrete"},{"position":{"x":-18,"y":15},"name":"refined-concrete"},{"position":{"x":-18,"y":16},"name":"refined-concrete"},{"position":{"x":-18,"y":17},"name":"refined-concrete"},{"position":{"x":-18,"y":18},"name":"refined-concrete"},{"position":{"x":-18,"y":19},"name":"refined-concrete"},{"position":{"x":-18,"y":20},"name":"refined-concrete"},{"position":{"x":-18,"y":21},"name":"refined-concrete"},{"position":{"x":-18,"y":22},"name":"refined-concrete"},{"position":{"x":-17,"y":-23},"name":"refined-concrete"},{"position":{"x":-17,"y":-22},"name":"refined-concrete"},{"position":{"x":-17,"y":-21},"name":"refined-concrete"},{"position":{"x":-17,"y":-20},"name":"refined-concrete"},{"position":{"x":-17,"y":-19},"name":"refined-concrete"},{"position":{"x":-17,"y":-18},"name":"refined-concrete"},{"position":{"x":-17,"y":-17},"name":"refined-concrete"},{"position":{"x":-17,"y":-16},"name":"refined-concrete"},{"position":{"x":-17,"y":-15},"name":"refined-concrete"},{"position":{"x":-17,"y":-14},"name":"refined-concrete"},{"position":{"x":-17,"y":-13},"name":"refined-concrete"},{"position":{"x":-17,"y":-12},"name":"refined-concrete"},{"position":{"x":-17,"y":-11},"name":"refined-concrete"},{"position":{"x":-17,"y":-10},"name":"refined-concrete"},{"position":{"x":-17,"y":-9},"name":"refined-concrete"},{"position":{"x":-17,"y":-8},"name":"refined-concrete"},{"position":{"x":-17,"y":-7},"name":"refined-concrete"},{"position":{"x":-17,"y":-6},"name":"refined-concrete"},{"position":{"x":-17,"y":-5},"name":"refined-concrete"},{"position":{"x":-17,"y":-4},"name":"refined-concrete"},{"position":{"x":-17,"y":-3},"name":"refined-concrete"},{"position":{"x":-17,"y":-2},"name":"refined-concrete"},{"position":{"x":-17,"y":-1},"name":"refined-concrete"},{"position":{"x":-17,"y":0},"name":"refined-concrete"},{"position":{"x":-17,"y":1},"name":"refined-concrete"},{"position":{"x":-17,"y":2},"name":"refined-concrete"},{"position":{"x":-17,"y":3},"name":"refined-concrete"},{"position":{"x":-17,"y":4},"name":"refined-concrete"},{"position":{"x":-17,"y":5},"name":"refined-concrete"},{"position":{"x":-17,"y":6},"name":"refined-concrete"},{"position":{"x":-17,"y":7},"name":"refined-concrete"},{"position":{"x":-17,"y":8},"name":"refined-concrete"},{"position":{"x":-17,"y":9},"name":"refined-concrete"},{"position":{"x":-17,"y":10},"name":"refined-concrete"},{"position":{"x":-17,"y":11},"name":"refined-concrete"},{"position":{"x":-17,"y":12},"name":"refined-concrete"},{"position":{"x":-17,"y":13},"name":"refined-concrete"},{"position":{"x":-17,"y":14},"name":"refined-concrete"},{"position":{"x":-17,"y":15},"name":"refined-concrete"},{"position":{"x":-17,"y":16},"name":"refined-concrete"},{"position":{"x":-17,"y":17},"name":"refined-concrete"},{"position":{"x":-17,"y":18},"name":"refined-concrete"},{"position":{"x":-17,"y":19},"name":"refined-concrete"},{"position":{"x":-17,"y":20},"name":"refined-concrete"},{"position":{"x":-17,"y":21},"name":"refined-concrete"},{"position":{"x":-17,"y":22},"name":"refined-concrete"},{"position":{"x":-16,"y":-23},"name":"refined-concrete"},{"position":{"x":-16,"y":-22},"name":"refined-concrete"},{"position":{"x":-16,"y":-21},"name":"refined-concrete"},{"position":{"x":-16,"y":-20},"name":"refined-concrete"},{"position":{"x":-16,"y":-19},"name":"refined-concrete"},{"position":{"x":-16,"y":-18},"name":"refined-concrete"},{"position":{"x":-16,"y":-17},"name":"refined-concrete"},{"position":{"x":-16,"y":-16},"name":"refined-concrete"},{"position":{"x":-16,"y":-15},"name":"refined-concrete"},{"position":{"x":-16,"y":-14},"name":"refined-concrete"},{"position":{"x":-16,"y":-13},"name":"refined-concrete"},{"position":{"x":-16,"y":-12},"name":"refined-concrete"},{"position":{"x":-16,"y":-11},"name":"refined-concrete"},{"position":{"x":-16,"y":-10},"name":"refined-concrete"},{"position":{"x":-16,"y":-9},"name":"refined-concrete"},{"position":{"x":-16,"y":-8},"name":"refined-concrete"},{"position":{"x":-16,"y":-7},"name":"refined-concrete"},{"position":{"x":-16,"y":-6},"name":"refined-concrete"},{"position":{"x":-16,"y":-5},"name":"refined-concrete"},{"position":{"x":-16,"y":-4},"name":"refined-concrete"},{"position":{"x":-16,"y":-3},"name":"refined-concrete"},{"position":{"x":-16,"y":-2},"name":"refined-concrete"},{"position":{"x":-16,"y":-1},"name":"refined-concrete"},{"position":{"x":-16,"y":0},"name":"refined-concrete"},{"position":{"x":-16,"y":1},"name":"refined-concrete"},{"position":{"x":-16,"y":2},"name":"refined-concrete"},{"position":{"x":-16,"y":3},"name":"refined-concrete"},{"position":{"x":-16,"y":4},"name":"refined-concrete"},{"position":{"x":-16,"y":5},"name":"refined-concrete"},{"position":{"x":-16,"y":6},"name":"refined-concrete"},{"position":{"x":-16,"y":7},"name":"refined-concrete"},{"position":{"x":-16,"y":8},"name":"refined-concrete"},{"position":{"x":-16,"y":9},"name":"refined-concrete"},{"position":{"x":-16,"y":10},"name":"refined-concrete"},{"position":{"x":-16,"y":11},"name":"refined-concrete"},{"position":{"x":-16,"y":12},"name":"refined-concrete"},{"position":{"x":-16,"y":13},"name":"refined-concrete"},{"position":{"x":-16,"y":14},"name":"refined-concrete"},{"position":{"x":-16,"y":15},"name":"refined-concrete"},{"position":{"x":-16,"y":16},"name":"refined-concrete"},{"position":{"x":-16,"y":17},"name":"refined-concrete"},{"position":{"x":-16,"y":18},"name":"refined-concrete"},{"position":{"x":-16,"y":19},"name":"refined-concrete"},{"position":{"x":-16,"y":20},"name":"refined-concrete"},{"position":{"x":-16,"y":21},"name":"refined-concrete"},{"position":{"x":-16,"y":22},"name":"refined-concrete"},{"position":{"x":-16,"y":23},"name":"refined-concrete"},{"position":{"x":-15,"y":-23},"name":"refined-concrete"},{"position":{"x":-15,"y":-22},"name":"refined-concrete"},{"position":{"x":-15,"y":-21},"name":"refined-concrete"},{"position":{"x":-15,"y":-20},"name":"refined-concrete"},{"position":{"x":-15,"y":-19},"name":"refined-concrete"},{"position":{"x":-15,"y":-18},"name":"refined-concrete"},{"position":{"x":-15,"y":-17},"name":"refined-concrete"},{"position":{"x":-15,"y":-16},"name":"refined-concrete"},{"position":{"x":-15,"y":-15},"name":"refined-concrete"},{"position":{"x":-15,"y":-14},"name":"refined-concrete"},{"position":{"x":-15,"y":-13},"name":"refined-concrete"},{"position":{"x":-15,"y":-12},"name":"refined-concrete"},{"position":{"x":-15,"y":-11},"name":"refined-concrete"},{"position":{"x":-15,"y":-10},"name":"refined-concrete"},{"position":{"x":-15,"y":-9},"name":"refined-concrete"},{"position":{"x":-15,"y":-8},"name":"refined-concrete"},{"position":{"x":-15,"y":-7},"name":"refined-concrete"},{"position":{"x":-15,"y":-6},"name":"refined-concrete"},{"position":{"x":-15,"y":-5},"name":"refined-concrete"},{"position":{"x":-15,"y":-4},"name":"refined-concrete"},{"position":{"x":-15,"y":-3},"name":"refined-concrete"},{"position":{"x":-15,"y":-2},"name":"refined-concrete"},{"position":{"x":-15,"y":-1},"name":"refined-concrete"},{"position":{"x":-15,"y":0},"name":"refined-concrete"},{"position":{"x":-15,"y":1},"name":"refined-concrete"},{"position":{"x":-15,"y":2},"name":"refined-concrete"},{"position":{"x":-15,"y":3},"name":"refined-concrete"},{"position":{"x":-15,"y":4},"name":"refined-concrete"},{"position":{"x":-15,"y":5},"name":"refined-concrete"},{"position":{"x":-15,"y":6},"name":"refined-concrete"},{"position":{"x":-15,"y":7},"name":"refined-concrete"},{"position":{"x":-15,"y":8},"name":"refined-concrete"},{"position":{"x":-15,"y":9},"name":"refined-concrete"},{"position":{"x":-15,"y":10},"name":"refined-concrete"},{"position":{"x":-15,"y":11},"name":"refined-concrete"},{"position":{"x":-15,"y":12},"name":"refined-concrete"},{"position":{"x":-15,"y":13},"name":"refined-concrete"},{"position":{"x":-15,"y":14},"name":"refined-concrete"},{"position":{"x":-15,"y":15},"name":"refined-concrete"},{"position":{"x":-15,"y":16},"name":"refined-concrete"},{"position":{"x":-15,"y":17},"name":"refined-concrete"},{"position":{"x":-15,"y":18},"name":"refined-concrete"},{"position":{"x":-15,"y":19},"name":"refined-concrete"},{"position":{"x":-15,"y":20},"name":"refined-concrete"},{"position":{"x":-15,"y":21},"name":"refined-concrete"},{"position":{"x":-15,"y":22},"name":"refined-concrete"},{"position":{"x":-15,"y":23},"name":"refined-concrete"},{"position":{"x":-14,"y":-23},"name":"refined-concrete"},{"position":{"x":-14,"y":-22},"name":"refined-concrete"},{"position":{"x":-14,"y":-21},"name":"refined-concrete"},{"position":{"x":-14,"y":-20},"name":"refined-concrete"},{"position":{"x":-14,"y":-19},"name":"refined-concrete"},{"position":{"x":-14,"y":-18},"name":"refined-concrete"},{"position":{"x":-14,"y":-17},"name":"refined-concrete"},{"position":{"x":-14,"y":-16},"name":"refined-concrete"},{"position":{"x":-14,"y":-15},"name":"refined-concrete"},{"position":{"x":-14,"y":-14},"name":"refined-concrete"},{"position":{"x":-14,"y":-13},"name":"refined-concrete"},{"position":{"x":-14,"y":-12},"name":"refined-concrete"},{"position":{"x":-14,"y":-11},"name":"refined-concrete"},{"position":{"x":-14,"y":-10},"name":"refined-concrete"},{"position":{"x":-14,"y":-9},"name":"refined-concrete"},{"position":{"x":-14,"y":-8},"name":"refined-concrete"},{"position":{"x":-14,"y":-7},"name":"refined-concrete"},{"position":{"x":-14,"y":-6},"name":"refined-concrete"},{"position":{"x":-14,"y":-5},"name":"refined-concrete"},{"position":{"x":-14,"y":-4},"name":"refined-concrete"},{"position":{"x":-14,"y":-3},"name":"refined-concrete"},{"position":{"x":-14,"y":-2},"name":"refined-concrete"},{"position":{"x":-14,"y":-1},"name":"refined-concrete"},{"position":{"x":-14,"y":0},"name":"refined-concrete"},{"position":{"x":-14,"y":1},"name":"refined-concrete"},{"position":{"x":-14,"y":2},"name":"refined-concrete"},{"position":{"x":-14,"y":3},"name":"refined-concrete"},{"position":{"x":-14,"y":4},"name":"refined-concrete"},{"position":{"x":-14,"y":5},"name":"refined-concrete"},{"position":{"x":-14,"y":6},"name":"refined-concrete"},{"position":{"x":-14,"y":7},"name":"refined-concrete"},{"position":{"x":-14,"y":8},"name":"refined-concrete"},{"position":{"x":-14,"y":9},"name":"refined-concrete"},{"position":{"x":-14,"y":10},"name":"refined-concrete"},{"position":{"x":-14,"y":11},"name":"refined-concrete"},{"position":{"x":-14,"y":12},"name":"refined-concrete"},{"position":{"x":-14,"y":13},"name":"refined-concrete"},{"position":{"x":-14,"y":14},"name":"refined-concrete"},{"position":{"x":-14,"y":15},"name":"refined-concrete"},{"position":{"x":-14,"y":16},"name":"refined-concrete"},{"position":{"x":-14,"y":17},"name":"refined-concrete"},{"position":{"x":-14,"y":18},"name":"refined-concrete"},{"position":{"x":-14,"y":19},"name":"refined-concrete"},{"position":{"x":-14,"y":20},"name":"refined-concrete"},{"position":{"x":-14,"y":21},"name":"refined-concrete"},{"position":{"x":-14,"y":22},"name":"refined-concrete"},{"position":{"x":-14,"y":23},"name":"refined-concrete"},{"position":{"x":-13,"y":-23},"name":"refined-concrete"},{"position":{"x":-13,"y":-22},"name":"refined-concrete"},{"position":{"x":-13,"y":-21},"name":"refined-concrete"},{"position":{"x":-13,"y":-20},"name":"refined-concrete"},{"position":{"x":-13,"y":-19},"name":"refined-concrete"},{"position":{"x":-13,"y":-18},"name":"refined-concrete"},{"position":{"x":-13,"y":-17},"name":"refined-concrete"},{"position":{"x":-13,"y":-16},"name":"refined-concrete"},{"position":{"x":-13,"y":-15},"name":"refined-concrete"},{"position":{"x":-13,"y":-14},"name":"refined-concrete"},{"position":{"x":-13,"y":-13},"name":"refined-concrete"},{"position":{"x":-13,"y":-12},"name":"refined-concrete"},{"position":{"x":-13,"y":-11},"name":"refined-concrete"},{"position":{"x":-13,"y":-10},"name":"refined-concrete"},{"position":{"x":-13,"y":-9},"name":"refined-concrete"},{"position":{"x":-13,"y":-8},"name":"refined-concrete"},{"position":{"x":-13,"y":-7},"name":"refined-concrete"},{"position":{"x":-13,"y":-6},"name":"refined-concrete"},{"position":{"x":-13,"y":-5},"name":"refined-concrete"},{"position":{"x":-13,"y":-4},"name":"refined-concrete"},{"position":{"x":-13,"y":-3},"name":"refined-concrete"},{"position":{"x":-13,"y":-2},"name":"refined-concrete"},{"position":{"x":-13,"y":-1},"name":"refined-concrete"},{"position":{"x":-13,"y":0},"name":"refined-concrete"},{"position":{"x":-13,"y":1},"name":"refined-concrete"},{"position":{"x":-13,"y":2},"name":"refined-concrete"},{"position":{"x":-13,"y":3},"name":"refined-concrete"},{"position":{"x":-13,"y":4},"name":"refined-concrete"},{"position":{"x":-13,"y":5},"name":"refined-concrete"},{"position":{"x":-13,"y":6},"name":"refined-concrete"},{"position":{"x":-13,"y":7},"name":"refined-concrete"},{"position":{"x":-13,"y":8},"name":"refined-concrete"},{"position":{"x":-13,"y":9},"name":"refined-concrete"},{"position":{"x":-13,"y":10},"name":"refined-concrete"},{"position":{"x":-13,"y":11},"name":"refined-concrete"},{"position":{"x":-13,"y":12},"name":"refined-concrete"},{"position":{"x":-13,"y":13},"name":"refined-concrete"},{"position":{"x":-13,"y":14},"name":"refined-concrete"},{"position":{"x":-13,"y":15},"name":"refined-concrete"},{"position":{"x":-13,"y":16},"name":"refined-concrete"},{"position":{"x":-13,"y":17},"name":"refined-concrete"},{"position":{"x":-13,"y":18},"name":"refined-concrete"},{"position":{"x":-13,"y":19},"name":"refined-concrete"},{"position":{"x":-13,"y":20},"name":"refined-concrete"},{"position":{"x":-13,"y":21},"name":"refined-concrete"},{"position":{"x":-13,"y":22},"name":"refined-concrete"},{"position":{"x":-13,"y":23},"name":"refined-concrete"},{"position":{"x":-12,"y":-22},"name":"refined-concrete"},{"position":{"x":-12,"y":-21},"name":"refined-concrete"},{"position":{"x":-12,"y":-20},"name":"refined-concrete"},{"position":{"x":-12,"y":-19},"name":"refined-concrete"},{"position":{"x":-12,"y":-18},"name":"refined-concrete"},{"position":{"x":-12,"y":-17},"name":"refined-concrete"},{"position":{"x":-12,"y":-16},"name":"refined-concrete"},{"position":{"x":-12,"y":-15},"name":"refined-concrete"},{"position":{"x":-12,"y":-14},"name":"refined-concrete"},{"position":{"x":-12,"y":-13},"name":"refined-concrete"},{"position":{"x":-12,"y":-12},"name":"refined-concrete"},{"position":{"x":-12,"y":-11},"name":"refined-concrete"},{"position":{"x":-12,"y":-10},"name":"refined-concrete"},{"position":{"x":-12,"y":-9},"name":"refined-concrete"},{"position":{"x":-12,"y":-8},"name":"refined-concrete"},{"position":{"x":-12,"y":-7},"name":"refined-concrete"},{"position":{"x":-12,"y":-6},"name":"refined-concrete"},{"position":{"x":-12,"y":-5},"name":"refined-concrete"},{"position":{"x":-12,"y":-4},"name":"refined-concrete"},{"position":{"x":-12,"y":-3},"name":"refined-concrete"},{"position":{"x":-12,"y":-2},"name":"refined-concrete"},{"position":{"x":-12,"y":-1},"name":"refined-concrete"},{"position":{"x":-12,"y":0},"name":"refined-concrete"},{"position":{"x":-12,"y":1},"name":"refined-concrete"},{"position":{"x":-12,"y":2},"name":"refined-concrete"},{"position":{"x":-12,"y":3},"name":"refined-concrete"},{"position":{"x":-12,"y":4},"name":"refined-concrete"},{"position":{"x":-12,"y":5},"name":"refined-concrete"},{"position":{"x":-12,"y":6},"name":"refined-concrete"},{"position":{"x":-12,"y":7},"name":"refined-concrete"},{"position":{"x":-12,"y":8},"name":"refined-concrete"},{"position":{"x":-12,"y":9},"name":"refined-concrete"},{"position":{"x":-12,"y":10},"name":"refined-concrete"},{"position":{"x":-12,"y":11},"name":"refined-concrete"},{"position":{"x":-12,"y":12},"name":"refined-concrete"},{"position":{"x":-12,"y":13},"name":"refined-concrete"},{"position":{"x":-12,"y":14},"name":"refined-concrete"},{"position":{"x":-12,"y":15},"name":"refined-concrete"},{"position":{"x":-12,"y":16},"name":"refined-concrete"},{"position":{"x":-12,"y":17},"name":"refined-concrete"},{"position":{"x":-12,"y":18},"name":"refined-concrete"},{"position":{"x":-12,"y":19},"name":"refined-concrete"},{"position":{"x":-12,"y":20},"name":"refined-concrete"},{"position":{"x":-12,"y":21},"name":"refined-concrete"},{"position":{"x":-12,"y":22},"name":"refined-concrete"},{"position":{"x":-12,"y":23},"name":"refined-concrete"},{"position":{"x":-11,"y":-22},"name":"refined-concrete"},{"position":{"x":-11,"y":-21},"name":"refined-concrete"},{"position":{"x":-11,"y":-20},"name":"refined-concrete"},{"position":{"x":-11,"y":-19},"name":"refined-concrete"},{"position":{"x":-11,"y":-18},"name":"refined-concrete"},{"position":{"x":-11,"y":-17},"name":"refined-concrete"},{"position":{"x":-11,"y":-16},"name":"refined-concrete"},{"position":{"x":-11,"y":-15},"name":"refined-concrete"},{"position":{"x":-11,"y":-14},"name":"refined-concrete"},{"position":{"x":-11,"y":-13},"name":"refined-concrete"},{"position":{"x":-11,"y":-12},"name":"refined-concrete"},{"position":{"x":-11,"y":-11},"name":"refined-concrete"},{"position":{"x":-11,"y":-10},"name":"refined-concrete"},{"position":{"x":-11,"y":-9},"name":"refined-concrete"},{"position":{"x":-11,"y":-8},"name":"refined-concrete"},{"position":{"x":-11,"y":-7},"name":"refined-concrete"},{"position":{"x":-11,"y":-6},"name":"refined-concrete"},{"position":{"x":-11,"y":-5},"name":"refined-concrete"},{"position":{"x":-11,"y":-4},"name":"refined-concrete"},{"position":{"x":-11,"y":-3},"name":"refined-concrete"},{"position":{"x":-11,"y":-2},"name":"refined-concrete"},{"position":{"x":-11,"y":-1},"name":"refined-concrete"},{"position":{"x":-11,"y":0},"name":"refined-concrete"},{"position":{"x":-11,"y":1},"name":"refined-concrete"},{"position":{"x":-11,"y":2},"name":"refined-concrete"},{"position":{"x":-11,"y":3},"name":"refined-concrete"},{"position":{"x":-11,"y":4},"name":"refined-concrete"},{"position":{"x":-11,"y":5},"name":"refined-concrete"},{"position":{"x":-11,"y":6},"name":"refined-concrete"},{"position":{"x":-11,"y":7},"name":"refined-concrete"},{"position":{"x":-11,"y":8},"name":"refined-concrete"},{"position":{"x":-11,"y":9},"name":"refined-concrete"},{"position":{"x":-11,"y":10},"name":"refined-concrete"},{"position":{"x":-11,"y":11},"name":"refined-concrete"},{"position":{"x":-11,"y":12},"name":"refined-concrete"},{"position":{"x":-11,"y":13},"name":"refined-concrete"},{"position":{"x":-11,"y":14},"name":"refined-concrete"},{"position":{"x":-11,"y":15},"name":"refined-concrete"},{"position":{"x":-11,"y":16},"name":"refined-concrete"},{"position":{"x":-11,"y":17},"name":"refined-concrete"},{"position":{"x":-11,"y":18},"name":"refined-concrete"},{"position":{"x":-11,"y":19},"name":"refined-concrete"},{"position":{"x":-11,"y":20},"name":"refined-concrete"},{"position":{"x":-11,"y":21},"name":"refined-concrete"},{"position":{"x":-11,"y":22},"name":"refined-concrete"},{"position":{"x":-11,"y":23},"name":"refined-concrete"},{"position":{"x":-10,"y":-21},"name":"refined-concrete"},{"position":{"x":-10,"y":-20},"name":"refined-concrete"},{"position":{"x":-10,"y":-19},"name":"refined-concrete"},{"position":{"x":-10,"y":-18},"name":"refined-concrete"},{"position":{"x":-10,"y":-17},"name":"refined-concrete"},{"position":{"x":-10,"y":-16},"name":"refined-concrete"},{"position":{"x":-10,"y":-15},"name":"refined-concrete"},{"position":{"x":-10,"y":-14},"name":"refined-concrete"},{"position":{"x":-10,"y":-13},"name":"refined-concrete"},{"position":{"x":-10,"y":-12},"name":"refined-concrete"},{"position":{"x":-10,"y":-11},"name":"refined-concrete"},{"position":{"x":-10,"y":-10},"name":"refined-concrete"},{"position":{"x":-10,"y":-9},"name":"refined-concrete"},{"position":{"x":-10,"y":-8},"name":"refined-concrete"},{"position":{"x":-10,"y":-7},"name":"refined-concrete"},{"position":{"x":-10,"y":-6},"name":"refined-concrete"},{"position":{"x":-10,"y":-5},"name":"refined-concrete"},{"position":{"x":-10,"y":-4},"name":"refined-concrete"},{"position":{"x":-10,"y":-3},"name":"refined-concrete"},{"position":{"x":-10,"y":-2},"name":"refined-concrete"},{"position":{"x":-10,"y":-1},"name":"refined-concrete"},{"position":{"x":-10,"y":0},"name":"refined-concrete"},{"position":{"x":-10,"y":1},"name":"refined-concrete"},{"position":{"x":-10,"y":2},"name":"refined-concrete"},{"position":{"x":-10,"y":3},"name":"refined-concrete"},{"position":{"x":-10,"y":4},"name":"refined-concrete"},{"position":{"x":-10,"y":5},"name":"refined-concrete"},{"position":{"x":-10,"y":6},"name":"refined-concrete"},{"position":{"x":-10,"y":7},"name":"refined-concrete"},{"position":{"x":-10,"y":8},"name":"refined-concrete"},{"position":{"x":-10,"y":9},"name":"refined-concrete"},{"position":{"x":-10,"y":10},"name":"refined-concrete"},{"position":{"x":-10,"y":11},"name":"refined-concrete"},{"position":{"x":-10,"y":12},"name":"refined-concrete"},{"position":{"x":-10,"y":13},"name":"refined-concrete"},{"position":{"x":-10,"y":14},"name":"refined-concrete"},{"position":{"x":-10,"y":15},"name":"refined-concrete"},{"position":{"x":-10,"y":16},"name":"refined-concrete"},{"position":{"x":-10,"y":17},"name":"refined-concrete"},{"position":{"x":-10,"y":18},"name":"refined-concrete"},{"position":{"x":-10,"y":19},"name":"refined-concrete"},{"position":{"x":-10,"y":20},"name":"refined-concrete"},{"position":{"x":-10,"y":21},"name":"refined-concrete"},{"position":{"x":-10,"y":22},"name":"refined-concrete"},{"position":{"x":-10,"y":23},"name":"refined-concrete"},{"position":{"x":-9,"y":-21},"name":"refined-concrete"},{"position":{"x":-9,"y":-20},"name":"refined-concrete"},{"position":{"x":-9,"y":-19},"name":"refined-concrete"},{"position":{"x":-9,"y":-18},"name":"refined-concrete"},{"position":{"x":-9,"y":-17},"name":"refined-concrete"},{"position":{"x":-9,"y":-16},"name":"refined-concrete"},{"position":{"x":-9,"y":-15},"name":"refined-concrete"},{"position":{"x":-9,"y":-14},"name":"refined-concrete"},{"position":{"x":-9,"y":-13},"name":"refined-concrete"},{"position":{"x":-9,"y":-12},"name":"refined-concrete"},{"position":{"x":-9,"y":-11},"name":"refined-concrete"},{"position":{"x":-9,"y":-10},"name":"refined-concrete"},{"position":{"x":-9,"y":-9},"name":"refined-concrete"},{"position":{"x":-9,"y":-8},"name":"refined-concrete"},{"position":{"x":-9,"y":-7},"name":"refined-concrete"},{"position":{"x":-9,"y":-6},"name":"refined-concrete"},{"position":{"x":-9,"y":-5},"name":"refined-concrete"},{"position":{"x":-9,"y":-4},"name":"refined-concrete"},{"position":{"x":-9,"y":-3},"name":"refined-concrete"},{"position":{"x":-9,"y":-2},"name":"refined-concrete"},{"position":{"x":-9,"y":-1},"name":"refined-concrete"},{"position":{"x":-9,"y":0},"name":"refined-concrete"},{"position":{"x":-9,"y":1},"name":"refined-concrete"},{"position":{"x":-9,"y":2},"name":"refined-concrete"},{"position":{"x":-9,"y":3},"name":"refined-concrete"},{"position":{"x":-9,"y":4},"name":"refined-concrete"},{"position":{"x":-9,"y":5},"name":"refined-concrete"},{"position":{"x":-9,"y":6},"name":"refined-concrete"},{"position":{"x":-9,"y":7},"name":"refined-concrete"},{"position":{"x":-9,"y":8},"name":"refined-concrete"},{"position":{"x":-9,"y":9},"name":"refined-concrete"},{"position":{"x":-9,"y":10},"name":"refined-concrete"},{"position":{"x":-9,"y":11},"name":"refined-concrete"},{"position":{"x":-9,"y":12},"name":"refined-concrete"},{"position":{"x":-9,"y":13},"name":"refined-concrete"},{"position":{"x":-9,"y":14},"name":"refined-concrete"},{"position":{"x":-9,"y":15},"name":"refined-concrete"},{"position":{"x":-9,"y":16},"name":"refined-concrete"},{"position":{"x":-9,"y":17},"name":"refined-concrete"},{"position":{"x":-9,"y":18},"name":"refined-concrete"},{"position":{"x":-9,"y":19},"name":"refined-concrete"},{"position":{"x":-9,"y":20},"name":"refined-concrete"},{"position":{"x":-9,"y":21},"name":"refined-concrete"},{"position":{"x":-9,"y":22},"name":"refined-concrete"},{"position":{"x":-9,"y":23},"name":"refined-concrete"},{"position":{"x":-8,"y":-22},"name":"refined-concrete"},{"position":{"x":-8,"y":-21},"name":"refined-concrete"},{"position":{"x":-8,"y":-20},"name":"refined-concrete"},{"position":{"x":-8,"y":-19},"name":"refined-concrete"},{"position":{"x":-8,"y":-18},"name":"refined-concrete"},{"position":{"x":-8,"y":-17},"name":"refined-concrete"},{"position":{"x":-8,"y":-16},"name":"refined-concrete"},{"position":{"x":-8,"y":-15},"name":"refined-concrete"},{"position":{"x":-8,"y":-14},"name":"refined-concrete"},{"position":{"x":-8,"y":-13},"name":"refined-concrete"},{"position":{"x":-8,"y":-12},"name":"refined-concrete"},{"position":{"x":-8,"y":-11},"name":"refined-concrete"},{"position":{"x":-8,"y":-10},"name":"refined-concrete"},{"position":{"x":-8,"y":-9},"name":"refined-concrete"},{"position":{"x":-8,"y":-8},"name":"refined-concrete"},{"position":{"x":-8,"y":-7},"name":"refined-concrete"},{"position":{"x":-8,"y":-6},"name":"refined-concrete"},{"position":{"x":-8,"y":-5},"name":"refined-concrete"},{"position":{"x":-8,"y":-4},"name":"refined-concrete"},{"position":{"x":-8,"y":-3},"name":"refined-concrete"},{"position":{"x":-8,"y":-2},"name":"refined-concrete"},{"position":{"x":-8,"y":-1},"name":"refined-concrete"},{"position":{"x":-8,"y":0},"name":"refined-concrete"},{"position":{"x":-8,"y":1},"name":"refined-concrete"},{"position":{"x":-8,"y":2},"name":"refined-concrete"},{"position":{"x":-8,"y":3},"name":"refined-concrete"},{"position":{"x":-8,"y":4},"name":"refined-concrete"},{"position":{"x":-8,"y":5},"name":"refined-concrete"},{"position":{"x":-8,"y":6},"name":"refined-concrete"},{"position":{"x":-8,"y":7},"name":"refined-concrete"},{"position":{"x":-8,"y":8},"name":"refined-concrete"},{"position":{"x":-8,"y":9},"name":"refined-concrete"},{"position":{"x":-8,"y":10},"name":"refined-concrete"},{"position":{"x":-8,"y":11},"name":"refined-concrete"},{"position":{"x":-8,"y":12},"name":"refined-concrete"},{"position":{"x":-8,"y":13},"name":"refined-concrete"},{"position":{"x":-8,"y":14},"name":"refined-concrete"},{"position":{"x":-8,"y":15},"name":"refined-concrete"},{"position":{"x":-8,"y":16},"name":"refined-concrete"},{"position":{"x":-8,"y":17},"name":"refined-concrete"},{"position":{"x":-8,"y":18},"name":"refined-concrete"},{"position":{"x":-8,"y":19},"name":"refined-concrete"},{"position":{"x":-8,"y":20},"name":"refined-concrete"},{"position":{"x":-8,"y":21},"name":"refined-concrete"},{"position":{"x":-8,"y":22},"name":"refined-concrete"},{"position":{"x":-8,"y":23},"name":"refined-concrete"},{"position":{"x":-7,"y":-22},"name":"refined-concrete"},{"position":{"x":-7,"y":-21},"name":"refined-concrete"},{"position":{"x":-7,"y":-20},"name":"refined-concrete"},{"position":{"x":-7,"y":-19},"name":"refined-concrete"},{"position":{"x":-7,"y":-18},"name":"refined-concrete"},{"position":{"x":-7,"y":-17},"name":"refined-concrete"},{"position":{"x":-7,"y":-16},"name":"refined-concrete"},{"position":{"x":-7,"y":-15},"name":"refined-concrete"},{"position":{"x":-7,"y":-14},"name":"refined-concrete"},{"position":{"x":-7,"y":-13},"name":"refined-concrete"},{"position":{"x":-7,"y":-12},"name":"refined-concrete"},{"position":{"x":-7,"y":-11},"name":"refined-concrete"},{"position":{"x":-7,"y":-10},"name":"refined-concrete"},{"position":{"x":-7,"y":-9},"name":"refined-concrete"},{"position":{"x":-7,"y":-8},"name":"refined-concrete"},{"position":{"x":-7,"y":-7},"name":"refined-concrete"},{"position":{"x":-7,"y":-6},"name":"refined-concrete"},{"position":{"x":-7,"y":-5},"name":"refined-concrete"},{"position":{"x":-7,"y":-4},"name":"refined-concrete"},{"position":{"x":-7,"y":-3},"name":"refined-concrete"},{"position":{"x":-7,"y":-2},"name":"refined-concrete"},{"position":{"x":-7,"y":-1},"name":"refined-concrete"},{"position":{"x":-7,"y":0},"name":"refined-concrete"},{"position":{"x":-7,"y":1},"name":"refined-concrete"},{"position":{"x":-7,"y":2},"name":"refined-concrete"},{"position":{"x":-7,"y":3},"name":"refined-concrete"},{"position":{"x":-7,"y":4},"name":"refined-concrete"},{"position":{"x":-7,"y":5},"name":"refined-concrete"},{"position":{"x":-7,"y":6},"name":"refined-concrete"},{"position":{"x":-7,"y":7},"name":"refined-concrete"},{"position":{"x":-7,"y":8},"name":"refined-concrete"},{"position":{"x":-7,"y":9},"name":"refined-concrete"},{"position":{"x":-7,"y":10},"name":"refined-concrete"},{"position":{"x":-7,"y":11},"name":"refined-concrete"},{"position":{"x":-7,"y":12},"name":"refined-concrete"},{"position":{"x":-7,"y":13},"name":"refined-concrete"},{"position":{"x":-7,"y":14},"name":"refined-concrete"},{"position":{"x":-7,"y":15},"name":"refined-concrete"},{"position":{"x":-7,"y":16},"name":"refined-concrete"},{"position":{"x":-7,"y":17},"name":"refined-concrete"},{"position":{"x":-7,"y":18},"name":"refined-concrete"},{"position":{"x":-7,"y":19},"name":"refined-concrete"},{"position":{"x":-7,"y":20},"name":"refined-concrete"},{"position":{"x":-7,"y":21},"name":"refined-concrete"},{"position":{"x":-7,"y":22},"name":"refined-concrete"},{"position":{"x":-7,"y":23},"name":"refined-concrete"},{"position":{"x":-6,"y":-22},"name":"refined-concrete"},{"position":{"x":-6,"y":-21},"name":"refined-concrete"},{"position":{"x":-6,"y":-20},"name":"refined-concrete"},{"position":{"x":-6,"y":-19},"name":"refined-concrete"},{"position":{"x":-6,"y":-18},"name":"refined-concrete"},{"position":{"x":-6,"y":-17},"name":"refined-concrete"},{"position":{"x":-6,"y":-16},"name":"refined-concrete"},{"position":{"x":-6,"y":-15},"name":"refined-concrete"},{"position":{"x":-6,"y":-14},"name":"refined-concrete"},{"position":{"x":-6,"y":-13},"name":"refined-concrete"},{"position":{"x":-6,"y":-12},"name":"refined-concrete"},{"position":{"x":-6,"y":-11},"name":"refined-concrete"},{"position":{"x":-6,"y":-10},"name":"refined-concrete"},{"position":{"x":-6,"y":-9},"name":"refined-concrete"},{"position":{"x":-6,"y":-8},"name":"refined-concrete"},{"position":{"x":-6,"y":-7},"name":"refined-concrete"},{"position":{"x":-6,"y":-6},"name":"refined-concrete"},{"position":{"x":-6,"y":-5},"name":"refined-concrete"},{"position":{"x":-6,"y":-4},"name":"refined-concrete"},{"position":{"x":-6,"y":-3},"name":"refined-concrete"},{"position":{"x":-6,"y":-2},"name":"refined-concrete"},{"position":{"x":-6,"y":-1},"name":"refined-concrete"},{"position":{"x":-6,"y":0},"name":"refined-concrete"},{"position":{"x":-6,"y":1},"name":"refined-concrete"},{"position":{"x":-6,"y":2},"name":"refined-concrete"},{"position":{"x":-6,"y":3},"name":"refined-concrete"},{"position":{"x":-6,"y":4},"name":"refined-concrete"},{"position":{"x":-6,"y":5},"name":"refined-concrete"},{"position":{"x":-6,"y":6},"name":"refined-concrete"},{"position":{"x":-6,"y":7},"name":"refined-concrete"},{"position":{"x":-6,"y":8},"name":"refined-concrete"},{"position":{"x":-6,"y":9},"name":"refined-concrete"},{"position":{"x":-6,"y":10},"name":"refined-concrete"},{"position":{"x":-6,"y":11},"name":"refined-concrete"},{"position":{"x":-6,"y":12},"name":"refined-concrete"},{"position":{"x":-6,"y":13},"name":"refined-concrete"},{"position":{"x":-6,"y":14},"name":"refined-concrete"},{"position":{"x":-6,"y":15},"name":"refined-concrete"},{"position":{"x":-6,"y":16},"name":"refined-concrete"},{"position":{"x":-6,"y":17},"name":"refined-concrete"},{"position":{"x":-6,"y":18},"name":"refined-concrete"},{"position":{"x":-6,"y":19},"name":"refined-concrete"},{"position":{"x":-6,"y":20},"name":"refined-concrete"},{"position":{"x":-6,"y":21},"name":"refined-concrete"},{"position":{"x":-6,"y":22},"name":"refined-concrete"},{"position":{"x":-6,"y":23},"name":"refined-concrete"},{"position":{"x":-5,"y":-22},"name":"refined-concrete"},{"position":{"x":-5,"y":-21},"name":"refined-concrete"},{"position":{"x":-5,"y":-20},"name":"refined-concrete"},{"position":{"x":-5,"y":-19},"name":"refined-concrete"},{"position":{"x":-5,"y":-18},"name":"refined-concrete"},{"position":{"x":-5,"y":-17},"name":"refined-concrete"},{"position":{"x":-5,"y":-16},"name":"refined-concrete"},{"position":{"x":-5,"y":-15},"name":"refined-concrete"},{"position":{"x":-5,"y":-14},"name":"refined-concrete"},{"position":{"x":-5,"y":-13},"name":"refined-concrete"},{"position":{"x":-5,"y":-12},"name":"refined-concrete"},{"position":{"x":-5,"y":-11},"name":"refined-concrete"},{"position":{"x":-5,"y":-10},"name":"refined-concrete"},{"position":{"x":-5,"y":-9},"name":"refined-concrete"},{"position":{"x":-5,"y":-8},"name":"refined-concrete"},{"position":{"x":-5,"y":-7},"name":"refined-concrete"},{"position":{"x":-5,"y":-6},"name":"refined-concrete"},{"position":{"x":-5,"y":-5},"name":"refined-concrete"},{"position":{"x":-5,"y":-4},"name":"refined-concrete"},{"position":{"x":-5,"y":-3},"name":"refined-concrete"},{"position":{"x":-5,"y":-2},"name":"refined-concrete"},{"position":{"x":-5,"y":-1},"name":"refined-concrete"},{"position":{"x":-5,"y":0},"name":"refined-concrete"},{"position":{"x":-5,"y":1},"name":"refined-concrete"},{"position":{"x":-5,"y":2},"name":"refined-concrete"},{"position":{"x":-5,"y":3},"name":"refined-concrete"},{"position":{"x":-5,"y":4},"name":"refined-concrete"},{"position":{"x":-5,"y":5},"name":"refined-concrete"},{"position":{"x":-5,"y":6},"name":"refined-concrete"},{"position":{"x":-5,"y":7},"name":"refined-concrete"},{"position":{"x":-5,"y":8},"name":"refined-concrete"},{"position":{"x":-5,"y":9},"name":"refined-concrete"},{"position":{"x":-5,"y":10},"name":"refined-concrete"},{"position":{"x":-5,"y":11},"name":"refined-concrete"},{"position":{"x":-5,"y":12},"name":"refined-concrete"},{"position":{"x":-5,"y":13},"name":"refined-concrete"},{"position":{"x":-5,"y":14},"name":"refined-concrete"},{"position":{"x":-5,"y":15},"name":"refined-concrete"},{"position":{"x":-5,"y":16},"name":"refined-concrete"},{"position":{"x":-5,"y":17},"name":"refined-concrete"},{"position":{"x":-5,"y":18},"name":"refined-concrete"},{"position":{"x":-5,"y":19},"name":"refined-concrete"},{"position":{"x":-5,"y":20},"name":"refined-concrete"},{"position":{"x":-5,"y":21},"name":"refined-concrete"},{"position":{"x":-5,"y":22},"name":"refined-concrete"},{"position":{"x":-5,"y":23},"name":"refined-concrete"},{"position":{"x":-4,"y":-22},"name":"refined-concrete"},{"position":{"x":-4,"y":-21},"name":"refined-concrete"},{"position":{"x":-4,"y":-20},"name":"refined-concrete"},{"position":{"x":-4,"y":-19},"name":"refined-concrete"},{"position":{"x":-4,"y":-18},"name":"refined-concrete"},{"position":{"x":-4,"y":-17},"name":"refined-concrete"},{"position":{"x":-4,"y":-16},"name":"refined-concrete"},{"position":{"x":-4,"y":-15},"name":"refined-concrete"},{"position":{"x":-4,"y":-14},"name":"refined-concrete"},{"position":{"x":-4,"y":-13},"name":"refined-concrete"},{"position":{"x":-4,"y":-12},"name":"refined-concrete"},{"position":{"x":-4,"y":-11},"name":"refined-concrete"},{"position":{"x":-4,"y":-10},"name":"refined-concrete"},{"position":{"x":-4,"y":-9},"name":"refined-concrete"},{"position":{"x":-4,"y":-8},"name":"refined-concrete"},{"position":{"x":-4,"y":-7},"name":"refined-concrete"},{"position":{"x":-4,"y":-6},"name":"refined-concrete"},{"position":{"x":-4,"y":-5},"name":"refined-concrete"},{"position":{"x":-4,"y":-4},"name":"refined-concrete"},{"position":{"x":-4,"y":-3},"name":"refined-concrete"},{"position":{"x":-4,"y":-2},"name":"refined-concrete"},{"position":{"x":-4,"y":-1},"name":"refined-concrete"},{"position":{"x":-4,"y":0},"name":"refined-concrete"},{"position":{"x":-4,"y":1},"name":"refined-concrete"},{"position":{"x":-4,"y":2},"name":"refined-concrete"},{"position":{"x":-4,"y":3},"name":"refined-concrete"},{"position":{"x":-4,"y":4},"name":"refined-concrete"},{"position":{"x":-4,"y":5},"name":"refined-concrete"},{"position":{"x":-4,"y":6},"name":"refined-concrete"},{"position":{"x":-4,"y":7},"name":"refined-concrete"},{"position":{"x":-4,"y":8},"name":"refined-concrete"},{"position":{"x":-4,"y":9},"name":"refined-concrete"},{"position":{"x":-4,"y":10},"name":"refined-concrete"},{"position":{"x":-4,"y":11},"name":"refined-concrete"},{"position":{"x":-4,"y":12},"name":"refined-concrete"},{"position":{"x":-4,"y":13},"name":"refined-concrete"},{"position":{"x":-4,"y":14},"name":"refined-concrete"},{"position":{"x":-4,"y":15},"name":"refined-concrete"},{"position":{"x":-4,"y":16},"name":"refined-concrete"},{"position":{"x":-4,"y":17},"name":"refined-concrete"},{"position":{"x":-4,"y":18},"name":"refined-concrete"},{"position":{"x":-4,"y":19},"name":"refined-concrete"},{"position":{"x":-4,"y":20},"name":"refined-concrete"},{"position":{"x":-4,"y":21},"name":"refined-concrete"},{"position":{"x":-4,"y":22},"name":"refined-concrete"},{"position":{"x":-4,"y":23},"name":"refined-concrete"},{"position":{"x":-3,"y":-22},"name":"refined-concrete"},{"position":{"x":-3,"y":-21},"name":"refined-concrete"},{"position":{"x":-3,"y":-20},"name":"refined-concrete"},{"position":{"x":-3,"y":-19},"name":"refined-concrete"},{"position":{"x":-3,"y":-18},"name":"refined-concrete"},{"position":{"x":-3,"y":-17},"name":"refined-concrete"},{"position":{"x":-3,"y":-16},"name":"refined-concrete"},{"position":{"x":-3,"y":-15},"name":"refined-concrete"},{"position":{"x":-3,"y":-14},"name":"refined-concrete"},{"position":{"x":-3,"y":-13},"name":"refined-concrete"},{"position":{"x":-3,"y":-12},"name":"refined-concrete"},{"position":{"x":-3,"y":-11},"name":"refined-concrete"},{"position":{"x":-3,"y":-10},"name":"refined-concrete"},{"position":{"x":-3,"y":-9},"name":"refined-concrete"},{"position":{"x":-3,"y":-8},"name":"refined-concrete"},{"position":{"x":-3,"y":-7},"name":"refined-concrete"},{"position":{"x":-3,"y":-6},"name":"refined-concrete"},{"position":{"x":-3,"y":-5},"name":"refined-concrete"},{"position":{"x":-3,"y":-4},"name":"refined-concrete"},{"position":{"x":-3,"y":-3},"name":"refined-concrete"},{"position":{"x":-3,"y":-2},"name":"refined-concrete"},{"position":{"x":-3,"y":-1},"name":"refined-concrete"},{"position":{"x":-3,"y":0},"name":"refined-concrete"},{"position":{"x":-3,"y":1},"name":"refined-concrete"},{"position":{"x":-3,"y":2},"name":"refined-concrete"},{"position":{"x":-3,"y":3},"name":"refined-concrete"},{"position":{"x":-3,"y":4},"name":"refined-concrete"},{"position":{"x":-3,"y":5},"name":"refined-concrete"},{"position":{"x":-3,"y":6},"name":"refined-concrete"},{"position":{"x":-3,"y":7},"name":"refined-concrete"},{"position":{"x":-3,"y":8},"name":"refined-concrete"},{"position":{"x":-3,"y":9},"name":"refined-concrete"},{"position":{"x":-3,"y":10},"name":"refined-concrete"},{"position":{"x":-3,"y":11},"name":"refined-concrete"},{"position":{"x":-3,"y":12},"name":"refined-concrete"},{"position":{"x":-3,"y":13},"name":"refined-concrete"},{"position":{"x":-3,"y":14},"name":"refined-concrete"},{"position":{"x":-3,"y":15},"name":"refined-concrete"},{"position":{"x":-3,"y":16},"name":"refined-concrete"},{"position":{"x":-3,"y":17},"name":"refined-concrete"},{"position":{"x":-3,"y":18},"name":"refined-concrete"},{"position":{"x":-3,"y":19},"name":"refined-concrete"},{"position":{"x":-3,"y":20},"name":"refined-concrete"},{"position":{"x":-3,"y":21},"name":"refined-concrete"},{"position":{"x":-3,"y":22},"name":"refined-concrete"},{"position":{"x":-3,"y":23},"name":"refined-concrete"},{"position":{"x":-2,"y":-22},"name":"refined-concrete"},{"position":{"x":-2,"y":-21},"name":"refined-concrete"},{"position":{"x":-2,"y":-20},"name":"refined-concrete"},{"position":{"x":-2,"y":-19},"name":"refined-concrete"},{"position":{"x":-2,"y":-18},"name":"refined-concrete"},{"position":{"x":-2,"y":-17},"name":"refined-concrete"},{"position":{"x":-2,"y":-16},"name":"refined-concrete"},{"position":{"x":-2,"y":-15},"name":"refined-concrete"},{"position":{"x":-2,"y":-14},"name":"refined-concrete"},{"position":{"x":-2,"y":-13},"name":"refined-concrete"},{"position":{"x":-2,"y":-12},"name":"refined-concrete"},{"position":{"x":-2,"y":-11},"name":"refined-concrete"},{"position":{"x":-2,"y":-10},"name":"refined-concrete"},{"position":{"x":-2,"y":-9},"name":"refined-concrete"},{"position":{"x":-2,"y":-8},"name":"refined-concrete"},{"position":{"x":-2,"y":-7},"name":"refined-concrete"},{"position":{"x":-2,"y":-6},"name":"refined-concrete"},{"position":{"x":-2,"y":-5},"name":"refined-concrete"},{"position":{"x":-2,"y":-4},"name":"refined-concrete"},{"position":{"x":-2,"y":-3},"name":"refined-concrete"},{"position":{"x":-2,"y":-2},"name":"refined-concrete"},{"position":{"x":-2,"y":-1},"name":"refined-concrete"},{"position":{"x":-2,"y":0},"name":"refined-concrete"},{"position":{"x":-2,"y":1},"name":"refined-concrete"},{"position":{"x":-2,"y":2},"name":"refined-concrete"},{"position":{"x":-2,"y":3},"name":"refined-concrete"},{"position":{"x":-2,"y":4},"name":"refined-concrete"},{"position":{"x":-2,"y":5},"name":"refined-concrete"},{"position":{"x":-2,"y":6},"name":"refined-concrete"},{"position":{"x":-2,"y":7},"name":"refined-concrete"},{"position":{"x":-2,"y":8},"name":"refined-concrete"},{"position":{"x":-2,"y":9},"name":"refined-concrete"},{"position":{"x":-2,"y":10},"name":"refined-concrete"},{"position":{"x":-2,"y":11},"name":"refined-concrete"},{"position":{"x":-2,"y":12},"name":"refined-concrete"},{"position":{"x":-2,"y":13},"name":"refined-concrete"},{"position":{"x":-2,"y":14},"name":"refined-concrete"},{"position":{"x":-2,"y":15},"name":"refined-concrete"},{"position":{"x":-2,"y":16},"name":"refined-concrete"},{"position":{"x":-2,"y":17},"name":"refined-concrete"},{"position":{"x":-2,"y":18},"name":"refined-concrete"},{"position":{"x":-2,"y":19},"name":"refined-concrete"},{"position":{"x":-2,"y":20},"name":"refined-concrete"},{"position":{"x":-2,"y":21},"name":"refined-concrete"},{"position":{"x":-2,"y":22},"name":"refined-concrete"},{"position":{"x":-2,"y":23},"name":"refined-concrete"},{"position":{"x":-1,"y":-22},"name":"refined-concrete"},{"position":{"x":-1,"y":-21},"name":"refined-concrete"},{"position":{"x":-1,"y":-20},"name":"refined-concrete"},{"position":{"x":-1,"y":-19},"name":"refined-concrete"},{"position":{"x":-1,"y":-18},"name":"refined-concrete"},{"position":{"x":-1,"y":-17},"name":"refined-concrete"},{"position":{"x":-1,"y":-16},"name":"refined-concrete"},{"position":{"x":-1,"y":-15},"name":"refined-concrete"},{"position":{"x":-1,"y":-14},"name":"refined-concrete"},{"position":{"x":-1,"y":-13},"name":"refined-concrete"},{"position":{"x":-1,"y":-12},"name":"refined-concrete"},{"position":{"x":-1,"y":-11},"name":"refined-concrete"},{"position":{"x":-1,"y":-10},"name":"refined-concrete"},{"position":{"x":-1,"y":-9},"name":"refined-concrete"},{"position":{"x":-1,"y":-8},"name":"refined-concrete"},{"position":{"x":-1,"y":-7},"name":"refined-concrete"},{"position":{"x":-1,"y":-6},"name":"refined-concrete"},{"position":{"x":-1,"y":-5},"name":"refined-concrete"},{"position":{"x":-1,"y":-4},"name":"refined-concrete"},{"position":{"x":-1,"y":-3},"name":"refined-concrete"},{"position":{"x":-1,"y":-2},"name":"refined-concrete"},{"position":{"x":-1,"y":-1},"name":"refined-concrete"},{"position":{"x":-1,"y":0},"name":"refined-concrete"},{"position":{"x":-1,"y":1},"name":"refined-concrete"},{"position":{"x":-1,"y":2},"name":"refined-concrete"},{"position":{"x":-1,"y":3},"name":"refined-concrete"},{"position":{"x":-1,"y":4},"name":"refined-concrete"},{"position":{"x":-1,"y":5},"name":"refined-concrete"},{"position":{"x":-1,"y":6},"name":"refined-concrete"},{"position":{"x":-1,"y":7},"name":"refined-concrete"},{"position":{"x":-1,"y":8},"name":"refined-concrete"},{"position":{"x":-1,"y":9},"name":"refined-concrete"},{"position":{"x":-1,"y":10},"name":"refined-concrete"},{"position":{"x":-1,"y":11},"name":"refined-concrete"},{"position":{"x":-1,"y":12},"name":"refined-concrete"},{"position":{"x":-1,"y":13},"name":"refined-concrete"},{"position":{"x":-1,"y":14},"name":"refined-concrete"},{"position":{"x":-1,"y":15},"name":"refined-concrete"},{"position":{"x":-1,"y":16},"name":"refined-concrete"},{"position":{"x":-1,"y":17},"name":"refined-concrete"},{"position":{"x":-1,"y":18},"name":"refined-concrete"},{"position":{"x":-1,"y":19},"name":"refined-concrete"},{"position":{"x":-1,"y":20},"name":"refined-concrete"},{"position":{"x":-1,"y":21},"name":"refined-concrete"},{"position":{"x":-1,"y":22},"name":"refined-concrete"},{"position":{"x":-1,"y":23},"name":"refined-concrete"},{"position":{"x":0,"y":-22},"name":"refined-concrete"},{"position":{"x":0,"y":-21},"name":"refined-concrete"},{"position":{"x":0,"y":-20},"name":"refined-concrete"},{"position":{"x":0,"y":-19},"name":"refined-concrete"},{"position":{"x":0,"y":-18},"name":"refined-concrete"},{"position":{"x":0,"y":-17},"name":"refined-concrete"},{"position":{"x":0,"y":-16},"name":"refined-concrete"},{"position":{"x":0,"y":-15},"name":"refined-concrete"},{"position":{"x":0,"y":-14},"name":"refined-concrete"},{"position":{"x":0,"y":-13},"name":"refined-concrete"},{"position":{"x":0,"y":-12},"name":"refined-concrete"},{"position":{"x":0,"y":-11},"name":"refined-concrete"},{"position":{"x":0,"y":-10},"name":"refined-concrete"},{"position":{"x":0,"y":-9},"name":"refined-concrete"},{"position":{"x":0,"y":-8},"name":"refined-concrete"},{"position":{"x":0,"y":-7},"name":"refined-concrete"},{"position":{"x":0,"y":-6},"name":"refined-concrete"},{"position":{"x":0,"y":-5},"name":"refined-concrete"},{"position":{"x":0,"y":-4},"name":"refined-concrete"},{"position":{"x":0,"y":-3},"name":"refined-concrete"},{"position":{"x":0,"y":-2},"name":"refined-concrete"},{"position":{"x":0,"y":-1},"name":"refined-concrete"},{"position":{"x":0,"y":0},"name":"refined-concrete"},{"position":{"x":0,"y":1},"name":"refined-concrete"},{"position":{"x":0,"y":2},"name":"refined-concrete"},{"position":{"x":0,"y":3},"name":"refined-concrete"},{"position":{"x":0,"y":4},"name":"refined-concrete"},{"position":{"x":0,"y":5},"name":"refined-concrete"},{"position":{"x":0,"y":6},"name":"refined-concrete"},{"position":{"x":0,"y":7},"name":"refined-concrete"},{"position":{"x":0,"y":8},"name":"refined-concrete"},{"position":{"x":0,"y":9},"name":"refined-concrete"},{"position":{"x":0,"y":10},"name":"refined-concrete"},{"position":{"x":0,"y":11},"name":"refined-concrete"},{"position":{"x":0,"y":12},"name":"refined-concrete"},{"position":{"x":0,"y":13},"name":"refined-concrete"},{"position":{"x":0,"y":14},"name":"refined-concrete"},{"position":{"x":0,"y":15},"name":"refined-concrete"},{"position":{"x":0,"y":16},"name":"refined-concrete"},{"position":{"x":0,"y":17},"name":"refined-concrete"},{"position":{"x":0,"y":18},"name":"refined-concrete"},{"position":{"x":0,"y":19},"name":"refined-concrete"},{"position":{"x":0,"y":20},"name":"refined-concrete"},{"position":{"x":0,"y":21},"name":"refined-concrete"},{"position":{"x":0,"y":22},"name":"refined-concrete"},{"position":{"x":0,"y":23},"name":"refined-concrete"},{"position":{"x":1,"y":-22},"name":"refined-concrete"},{"position":{"x":1,"y":-21},"name":"refined-concrete"},{"position":{"x":1,"y":-20},"name":"refined-concrete"},{"position":{"x":1,"y":-19},"name":"refined-concrete"},{"position":{"x":1,"y":-18},"name":"refined-concrete"},{"position":{"x":1,"y":-17},"name":"refined-concrete"},{"position":{"x":1,"y":-16},"name":"refined-concrete"},{"position":{"x":1,"y":-15},"name":"refined-concrete"},{"position":{"x":1,"y":-14},"name":"refined-concrete"},{"position":{"x":1,"y":-13},"name":"refined-concrete"},{"position":{"x":1,"y":-12},"name":"refined-concrete"},{"position":{"x":1,"y":-11},"name":"refined-concrete"},{"position":{"x":1,"y":-10},"name":"refined-concrete"},{"position":{"x":1,"y":-9},"name":"refined-concrete"},{"position":{"x":1,"y":-8},"name":"refined-concrete"},{"position":{"x":1,"y":-7},"name":"refined-concrete"},{"position":{"x":1,"y":-6},"name":"refined-concrete"},{"position":{"x":1,"y":-5},"name":"refined-concrete"},{"position":{"x":1,"y":-4},"name":"refined-concrete"},{"position":{"x":1,"y":-3},"name":"refined-concrete"},{"position":{"x":1,"y":-2},"name":"refined-concrete"},{"position":{"x":1,"y":-1},"name":"refined-concrete"},{"position":{"x":1,"y":0},"name":"refined-concrete"},{"position":{"x":1,"y":1},"name":"refined-concrete"},{"position":{"x":1,"y":2},"name":"refined-concrete"},{"position":{"x":1,"y":3},"name":"refined-concrete"},{"position":{"x":1,"y":4},"name":"refined-concrete"},{"position":{"x":1,"y":5},"name":"refined-concrete"},{"position":{"x":1,"y":6},"name":"refined-concrete"},{"position":{"x":1,"y":7},"name":"refined-concrete"},{"position":{"x":1,"y":8},"name":"refined-concrete"},{"position":{"x":1,"y":9},"name":"refined-concrete"},{"position":{"x":1,"y":10},"name":"refined-concrete"},{"position":{"x":1,"y":11},"name":"refined-concrete"},{"position":{"x":1,"y":12},"name":"refined-concrete"},{"position":{"x":1,"y":13},"name":"refined-concrete"},{"position":{"x":1,"y":14},"name":"refined-concrete"},{"position":{"x":1,"y":15},"name":"refined-concrete"},{"position":{"x":1,"y":16},"name":"refined-concrete"},{"position":{"x":1,"y":17},"name":"refined-concrete"},{"position":{"x":1,"y":18},"name":"refined-concrete"},{"position":{"x":1,"y":19},"name":"refined-concrete"},{"position":{"x":1,"y":20},"name":"refined-concrete"},{"position":{"x":1,"y":21},"name":"refined-concrete"},{"position":{"x":1,"y":22},"name":"refined-concrete"},{"position":{"x":1,"y":23},"name":"refined-concrete"},{"position":{"x":2,"y":-22},"name":"refined-concrete"},{"position":{"x":2,"y":-21},"name":"refined-concrete"},{"position":{"x":2,"y":-20},"name":"refined-concrete"},{"position":{"x":2,"y":-19},"name":"refined-concrete"},{"position":{"x":2,"y":-18},"name":"refined-concrete"},{"position":{"x":2,"y":-17},"name":"refined-concrete"},{"position":{"x":2,"y":-16},"name":"refined-concrete"},{"position":{"x":2,"y":-15},"name":"refined-concrete"},{"position":{"x":2,"y":-14},"name":"refined-concrete"},{"position":{"x":2,"y":-13},"name":"refined-concrete"},{"position":{"x":2,"y":-12},"name":"refined-concrete"},{"position":{"x":2,"y":-11},"name":"refined-concrete"},{"position":{"x":2,"y":-10},"name":"refined-concrete"},{"position":{"x":2,"y":-9},"name":"refined-concrete"},{"position":{"x":2,"y":-8},"name":"refined-concrete"},{"position":{"x":2,"y":-7},"name":"refined-concrete"},{"position":{"x":2,"y":-6},"name":"refined-concrete"},{"position":{"x":2,"y":-5},"name":"refined-concrete"},{"position":{"x":2,"y":-4},"name":"refined-concrete"},{"position":{"x":2,"y":-3},"name":"refined-concrete"},{"position":{"x":2,"y":-2},"name":"refined-concrete"},{"position":{"x":2,"y":-1},"name":"refined-concrete"},{"position":{"x":2,"y":0},"name":"refined-concrete"},{"position":{"x":2,"y":1},"name":"refined-concrete"},{"position":{"x":2,"y":2},"name":"refined-concrete"},{"position":{"x":2,"y":3},"name":"refined-concrete"},{"position":{"x":2,"y":4},"name":"refined-concrete"},{"position":{"x":2,"y":5},"name":"refined-concrete"},{"position":{"x":2,"y":6},"name":"refined-concrete"},{"position":{"x":2,"y":7},"name":"refined-concrete"},{"position":{"x":2,"y":8},"name":"refined-concrete"},{"position":{"x":2,"y":9},"name":"refined-concrete"},{"position":{"x":2,"y":10},"name":"refined-concrete"},{"position":{"x":2,"y":11},"name":"refined-concrete"},{"position":{"x":2,"y":12},"name":"refined-concrete"},{"position":{"x":2,"y":13},"name":"refined-concrete"},{"position":{"x":2,"y":14},"name":"refined-concrete"},{"position":{"x":2,"y":15},"name":"refined-concrete"},{"position":{"x":2,"y":16},"name":"refined-concrete"},{"position":{"x":2,"y":17},"name":"refined-concrete"},{"position":{"x":2,"y":18},"name":"refined-concrete"},{"position":{"x":2,"y":19},"name":"refined-concrete"},{"position":{"x":2,"y":20},"name":"refined-concrete"},{"position":{"x":2,"y":21},"name":"refined-concrete"},{"position":{"x":2,"y":22},"name":"refined-concrete"},{"position":{"x":3,"y":-22},"name":"refined-concrete"},{"position":{"x":3,"y":-21},"name":"refined-concrete"},{"position":{"x":3,"y":-20},"name":"refined-concrete"},{"position":{"x":3,"y":-19},"name":"refined-concrete"},{"position":{"x":3,"y":-18},"name":"refined-concrete"},{"position":{"x":3,"y":-17},"name":"refined-concrete"},{"position":{"x":3,"y":-16},"name":"refined-concrete"},{"position":{"x":3,"y":-15},"name":"refined-concrete"},{"position":{"x":3,"y":-14},"name":"refined-concrete"},{"position":{"x":3,"y":-13},"name":"refined-concrete"},{"position":{"x":3,"y":-12},"name":"refined-concrete"},{"position":{"x":3,"y":-11},"name":"refined-concrete"},{"position":{"x":3,"y":-10},"name":"refined-concrete"},{"position":{"x":3,"y":-9},"name":"refined-concrete"},{"position":{"x":3,"y":-8},"name":"refined-concrete"},{"position":{"x":3,"y":-7},"name":"refined-concrete"},{"position":{"x":3,"y":-6},"name":"refined-concrete"},{"position":{"x":3,"y":-5},"name":"refined-concrete"},{"position":{"x":3,"y":-4},"name":"refined-concrete"},{"position":{"x":3,"y":-3},"name":"refined-concrete"},{"position":{"x":3,"y":-2},"name":"refined-concrete"},{"position":{"x":3,"y":-1},"name":"refined-concrete"},{"position":{"x":3,"y":0},"name":"refined-concrete"},{"position":{"x":3,"y":1},"name":"refined-concrete"},{"position":{"x":3,"y":2},"name":"refined-concrete"},{"position":{"x":3,"y":3},"name":"refined-concrete"},{"position":{"x":3,"y":4},"name":"refined-concrete"},{"position":{"x":3,"y":5},"name":"refined-concrete"},{"position":{"x":3,"y":6},"name":"refined-concrete"},{"position":{"x":3,"y":7},"name":"refined-concrete"},{"position":{"x":3,"y":8},"name":"refined-concrete"},{"position":{"x":3,"y":9},"name":"refined-concrete"},{"position":{"x":3,"y":10},"name":"refined-concrete"},{"position":{"x":3,"y":11},"name":"refined-concrete"},{"position":{"x":3,"y":12},"name":"refined-concrete"},{"position":{"x":3,"y":13},"name":"refined-concrete"},{"position":{"x":3,"y":14},"name":"refined-concrete"},{"position":{"x":3,"y":15},"name":"refined-concrete"},{"position":{"x":3,"y":16},"name":"refined-concrete"},{"position":{"x":3,"y":17},"name":"refined-concrete"},{"position":{"x":3,"y":18},"name":"refined-concrete"},{"position":{"x":3,"y":19},"name":"refined-concrete"},{"position":{"x":3,"y":20},"name":"refined-concrete"},{"position":{"x":3,"y":21},"name":"refined-concrete"},{"position":{"x":3,"y":22},"name":"refined-concrete"},{"position":{"x":4,"y":-22},"name":"refined-concrete"},{"position":{"x":4,"y":-21},"name":"refined-concrete"},{"position":{"x":4,"y":-20},"name":"refined-concrete"},{"position":{"x":4,"y":-19},"name":"refined-concrete"},{"position":{"x":4,"y":-18},"name":"refined-concrete"},{"position":{"x":4,"y":-17},"name":"refined-concrete"},{"position":{"x":4,"y":-16},"name":"refined-concrete"},{"position":{"x":4,"y":-15},"name":"refined-concrete"},{"position":{"x":4,"y":-14},"name":"refined-concrete"},{"position":{"x":4,"y":-13},"name":"refined-concrete"},{"position":{"x":4,"y":-12},"name":"refined-concrete"},{"position":{"x":4,"y":-11},"name":"refined-concrete"},{"position":{"x":4,"y":-10},"name":"refined-concrete"},{"position":{"x":4,"y":-9},"name":"refined-concrete"},{"position":{"x":4,"y":-8},"name":"refined-concrete"},{"position":{"x":4,"y":-7},"name":"refined-concrete"},{"position":{"x":4,"y":-6},"name":"refined-concrete"},{"position":{"x":4,"y":-5},"name":"refined-concrete"},{"position":{"x":4,"y":-4},"name":"refined-concrete"},{"position":{"x":4,"y":-3},"name":"refined-concrete"},{"position":{"x":4,"y":-2},"name":"refined-concrete"},{"position":{"x":4,"y":-1},"name":"refined-concrete"},{"position":{"x":4,"y":0},"name":"refined-concrete"},{"position":{"x":4,"y":1},"name":"refined-concrete"},{"position":{"x":4,"y":2},"name":"refined-concrete"},{"position":{"x":4,"y":3},"name":"refined-concrete"},{"position":{"x":4,"y":4},"name":"refined-concrete"},{"position":{"x":4,"y":5},"name":"refined-concrete"},{"position":{"x":4,"y":6},"name":"refined-concrete"},{"position":{"x":4,"y":7},"name":"refined-concrete"},{"position":{"x":4,"y":8},"name":"refined-concrete"},{"position":{"x":4,"y":9},"name":"refined-concrete"},{"position":{"x":4,"y":10},"name":"refined-concrete"},{"position":{"x":4,"y":11},"name":"refined-concrete"},{"position":{"x":4,"y":12},"name":"refined-concrete"},{"position":{"x":4,"y":13},"name":"refined-concrete"},{"position":{"x":4,"y":14},"name":"refined-concrete"},{"position":{"x":4,"y":15},"name":"refined-concrete"},{"position":{"x":4,"y":16},"name":"refined-concrete"},{"position":{"x":4,"y":17},"name":"refined-concrete"},{"position":{"x":4,"y":18},"name":"refined-concrete"},{"position":{"x":4,"y":19},"name":"refined-concrete"},{"position":{"x":4,"y":20},"name":"refined-concrete"},{"position":{"x":4,"y":21},"name":"refined-concrete"},{"position":{"x":4,"y":22},"name":"refined-concrete"},{"position":{"x":5,"y":-22},"name":"refined-concrete"},{"position":{"x":5,"y":-21},"name":"refined-concrete"},{"position":{"x":5,"y":-20},"name":"refined-concrete"},{"position":{"x":5,"y":-19},"name":"refined-concrete"},{"position":{"x":5,"y":-18},"name":"refined-concrete"},{"position":{"x":5,"y":-17},"name":"refined-concrete"},{"position":{"x":5,"y":-16},"name":"refined-concrete"},{"position":{"x":5,"y":-15},"name":"refined-concrete"},{"position":{"x":5,"y":-14},"name":"refined-concrete"},{"position":{"x":5,"y":-13},"name":"refined-concrete"},{"position":{"x":5,"y":-12},"name":"refined-concrete"},{"position":{"x":5,"y":-11},"name":"refined-concrete"},{"position":{"x":5,"y":-10},"name":"refined-concrete"},{"position":{"x":5,"y":-9},"name":"refined-concrete"},{"position":{"x":5,"y":-8},"name":"refined-concrete"},{"position":{"x":5,"y":-7},"name":"refined-concrete"},{"position":{"x":5,"y":-6},"name":"refined-concrete"},{"position":{"x":5,"y":-5},"name":"refined-concrete"},{"position":{"x":5,"y":-4},"name":"refined-concrete"},{"position":{"x":5,"y":-3},"name":"refined-concrete"},{"position":{"x":5,"y":-2},"name":"refined-concrete"},{"position":{"x":5,"y":-1},"name":"refined-concrete"},{"position":{"x":5,"y":0},"name":"refined-concrete"},{"position":{"x":5,"y":1},"name":"refined-concrete"},{"position":{"x":5,"y":2},"name":"refined-concrete"},{"position":{"x":5,"y":3},"name":"refined-concrete"},{"position":{"x":5,"y":4},"name":"refined-concrete"},{"position":{"x":5,"y":5},"name":"refined-concrete"},{"position":{"x":5,"y":6},"name":"refined-concrete"},{"position":{"x":5,"y":7},"name":"refined-concrete"},{"position":{"x":5,"y":8},"name":"refined-concrete"},{"position":{"x":5,"y":9},"name":"refined-concrete"},{"position":{"x":5,"y":10},"name":"refined-concrete"},{"position":{"x":5,"y":11},"name":"refined-concrete"},{"position":{"x":5,"y":12},"name":"refined-concrete"},{"position":{"x":5,"y":13},"name":"refined-concrete"},{"position":{"x":5,"y":14},"name":"refined-concrete"},{"position":{"x":5,"y":15},"name":"refined-concrete"},{"position":{"x":5,"y":16},"name":"refined-concrete"},{"position":{"x":5,"y":17},"name":"refined-concrete"},{"position":{"x":5,"y":18},"name":"refined-concrete"},{"position":{"x":5,"y":19},"name":"refined-concrete"},{"position":{"x":5,"y":20},"name":"refined-concrete"},{"position":{"x":5,"y":21},"name":"refined-concrete"},{"position":{"x":5,"y":22},"name":"refined-concrete"},{"position":{"x":5,"y":23},"name":"refined-concrete"},{"position":{"x":6,"y":-23},"name":"refined-concrete"},{"position":{"x":6,"y":-22},"name":"refined-concrete"},{"position":{"x":6,"y":-21},"name":"refined-concrete"},{"position":{"x":6,"y":-20},"name":"refined-concrete"},{"position":{"x":6,"y":-19},"name":"refined-concrete"},{"position":{"x":6,"y":-18},"name":"refined-concrete"},{"position":{"x":6,"y":-17},"name":"refined-concrete"},{"position":{"x":6,"y":-16},"name":"refined-concrete"},{"position":{"x":6,"y":-15},"name":"refined-concrete"},{"position":{"x":6,"y":-14},"name":"refined-concrete"},{"position":{"x":6,"y":-13},"name":"refined-concrete"},{"position":{"x":6,"y":-12},"name":"refined-concrete"},{"position":{"x":6,"y":-11},"name":"refined-concrete"},{"position":{"x":6,"y":-10},"name":"refined-concrete"},{"position":{"x":6,"y":-9},"name":"refined-concrete"},{"position":{"x":6,"y":-8},"name":"refined-concrete"},{"position":{"x":6,"y":-7},"name":"refined-concrete"},{"position":{"x":6,"y":-6},"name":"refined-concrete"},{"position":{"x":6,"y":-5},"name":"refined-concrete"},{"position":{"x":6,"y":-4},"name":"refined-concrete"},{"position":{"x":6,"y":-3},"name":"refined-concrete"},{"position":{"x":6,"y":-2},"name":"refined-concrete"},{"position":{"x":6,"y":-1},"name":"refined-concrete"},{"position":{"x":6,"y":0},"name":"refined-concrete"},{"position":{"x":6,"y":1},"name":"refined-concrete"},{"position":{"x":6,"y":2},"name":"refined-concrete"},{"position":{"x":6,"y":3},"name":"refined-concrete"},{"position":{"x":6,"y":4},"name":"refined-concrete"},{"position":{"x":6,"y":5},"name":"refined-concrete"},{"position":{"x":6,"y":6},"name":"refined-concrete"},{"position":{"x":6,"y":7},"name":"refined-concrete"},{"position":{"x":6,"y":8},"name":"refined-concrete"},{"position":{"x":6,"y":9},"name":"refined-concrete"},{"position":{"x":6,"y":10},"name":"refined-concrete"},{"position":{"x":6,"y":11},"name":"refined-concrete"},{"position":{"x":6,"y":12},"name":"refined-concrete"},{"position":{"x":6,"y":13},"name":"refined-concrete"},{"position":{"x":6,"y":14},"name":"refined-concrete"},{"position":{"x":6,"y":15},"name":"refined-concrete"},{"position":{"x":6,"y":16},"name":"refined-concrete"},{"position":{"x":6,"y":17},"name":"refined-concrete"},{"position":{"x":6,"y":18},"name":"refined-concrete"},{"position":{"x":6,"y":19},"name":"refined-concrete"},{"position":{"x":6,"y":20},"name":"refined-concrete"},{"position":{"x":6,"y":21},"name":"refined-concrete"},{"position":{"x":6,"y":22},"name":"refined-concrete"},{"position":{"x":7,"y":-23},"name":"refined-concrete"},{"position":{"x":7,"y":-22},"name":"refined-concrete"},{"position":{"x":7,"y":-21},"name":"refined-concrete"},{"position":{"x":7,"y":-20},"name":"refined-concrete"},{"position":{"x":7,"y":-19},"name":"refined-concrete"},{"position":{"x":7,"y":-18},"name":"refined-concrete"},{"position":{"x":7,"y":-17},"name":"refined-concrete"},{"position":{"x":7,"y":-16},"name":"refined-concrete"},{"position":{"x":7,"y":-15},"name":"refined-concrete"},{"position":{"x":7,"y":-14},"name":"refined-concrete"},{"position":{"x":7,"y":-13},"name":"refined-concrete"},{"position":{"x":7,"y":-12},"name":"refined-concrete"},{"position":{"x":7,"y":-11},"name":"refined-concrete"},{"position":{"x":7,"y":-10},"name":"refined-concrete"},{"position":{"x":7,"y":-9},"name":"refined-concrete"},{"position":{"x":7,"y":-8},"name":"refined-concrete"},{"position":{"x":7,"y":-7},"name":"refined-concrete"},{"position":{"x":7,"y":-6},"name":"refined-concrete"},{"position":{"x":7,"y":-5},"name":"refined-concrete"},{"position":{"x":7,"y":-4},"name":"refined-concrete"},{"position":{"x":7,"y":-3},"name":"refined-concrete"},{"position":{"x":7,"y":-2},"name":"refined-concrete"},{"position":{"x":7,"y":-1},"name":"refined-concrete"},{"position":{"x":7,"y":0},"name":"refined-concrete"},{"position":{"x":7,"y":1},"name":"refined-concrete"},{"position":{"x":7,"y":2},"name":"refined-concrete"},{"position":{"x":7,"y":3},"name":"refined-concrete"},{"position":{"x":7,"y":4},"name":"refined-concrete"},{"position":{"x":7,"y":5},"name":"refined-concrete"},{"position":{"x":7,"y":6},"name":"refined-concrete"},{"position":{"x":7,"y":7},"name":"refined-concrete"},{"position":{"x":7,"y":8},"name":"refined-concrete"},{"position":{"x":7,"y":9},"name":"refined-concrete"},{"position":{"x":7,"y":10},"name":"refined-concrete"},{"position":{"x":7,"y":11},"name":"refined-concrete"},{"position":{"x":7,"y":12},"name":"refined-concrete"},{"position":{"x":7,"y":13},"name":"refined-concrete"},{"position":{"x":7,"y":14},"name":"refined-concrete"},{"position":{"x":7,"y":15},"name":"refined-concrete"},{"position":{"x":7,"y":16},"name":"refined-concrete"},{"position":{"x":7,"y":17},"name":"refined-concrete"},{"position":{"x":7,"y":18},"name":"refined-concrete"},{"position":{"x":7,"y":19},"name":"refined-concrete"},{"position":{"x":7,"y":20},"name":"refined-concrete"},{"position":{"x":7,"y":21},"name":"refined-concrete"},{"position":{"x":7,"y":22},"name":"refined-concrete"},{"position":{"x":8,"y":-23},"name":"refined-concrete"},{"position":{"x":8,"y":-22},"name":"refined-concrete"},{"position":{"x":8,"y":-21},"name":"refined-concrete"},{"position":{"x":8,"y":-20},"name":"refined-concrete"},{"position":{"x":8,"y":-19},"name":"refined-concrete"},{"position":{"x":8,"y":-18},"name":"refined-concrete"},{"position":{"x":8,"y":-17},"name":"refined-concrete"},{"position":{"x":8,"y":-16},"name":"refined-concrete"},{"position":{"x":8,"y":-15},"name":"refined-concrete"},{"position":{"x":8,"y":-14},"name":"refined-concrete"},{"position":{"x":8,"y":-13},"name":"refined-concrete"},{"position":{"x":8,"y":-12},"name":"refined-concrete"},{"position":{"x":8,"y":-11},"name":"refined-concrete"},{"position":{"x":8,"y":-10},"name":"refined-concrete"},{"position":{"x":8,"y":-9},"name":"refined-concrete"},{"position":{"x":8,"y":-8},"name":"refined-concrete"},{"position":{"x":8,"y":-7},"name":"refined-concrete"},{"position":{"x":8,"y":-6},"name":"refined-concrete"},{"position":{"x":8,"y":-5},"name":"refined-concrete"},{"position":{"x":8,"y":-4},"name":"refined-concrete"},{"position":{"x":8,"y":-3},"name":"refined-concrete"},{"position":{"x":8,"y":-2},"name":"refined-concrete"},{"position":{"x":8,"y":-1},"name":"refined-concrete"},{"position":{"x":8,"y":0},"name":"refined-concrete"},{"position":{"x":8,"y":1},"name":"refined-concrete"},{"position":{"x":8,"y":2},"name":"refined-concrete"},{"position":{"x":8,"y":3},"name":"refined-concrete"},{"position":{"x":8,"y":4},"name":"refined-concrete"},{"position":{"x":8,"y":5},"name":"refined-concrete"},{"position":{"x":8,"y":6},"name":"refined-concrete"},{"position":{"x":8,"y":7},"name":"refined-concrete"},{"position":{"x":8,"y":8},"name":"refined-concrete"},{"position":{"x":8,"y":9},"name":"refined-concrete"},{"position":{"x":8,"y":10},"name":"refined-concrete"},{"position":{"x":8,"y":11},"name":"refined-concrete"},{"position":{"x":8,"y":12},"name":"refined-concrete"},{"position":{"x":8,"y":13},"name":"refined-concrete"},{"position":{"x":8,"y":14},"name":"refined-concrete"},{"position":{"x":8,"y":15},"name":"refined-concrete"},{"position":{"x":8,"y":16},"name":"refined-concrete"},{"position":{"x":8,"y":17},"name":"refined-concrete"},{"position":{"x":8,"y":18},"name":"refined-concrete"},{"position":{"x":8,"y":19},"name":"refined-concrete"},{"position":{"x":8,"y":20},"name":"refined-concrete"},{"position":{"x":8,"y":21},"name":"refined-concrete"},{"position":{"x":8,"y":22},"name":"refined-concrete"},{"position":{"x":9,"y":-23},"name":"refined-concrete"},{"position":{"x":9,"y":-22},"name":"refined-concrete"},{"position":{"x":9,"y":-21},"name":"refined-concrete"},{"position":{"x":9,"y":-20},"name":"refined-concrete"},{"position":{"x":9,"y":-19},"name":"refined-concrete"},{"position":{"x":9,"y":-18},"name":"refined-concrete"},{"position":{"x":9,"y":-17},"name":"refined-concrete"},{"position":{"x":9,"y":-16},"name":"refined-concrete"},{"position":{"x":9,"y":-15},"name":"refined-concrete"},{"position":{"x":9,"y":-14},"name":"refined-concrete"},{"position":{"x":9,"y":-13},"name":"refined-concrete"},{"position":{"x":9,"y":-12},"name":"refined-concrete"},{"position":{"x":9,"y":-11},"name":"refined-concrete"},{"position":{"x":9,"y":-10},"name":"refined-concrete"},{"position":{"x":9,"y":-9},"name":"refined-concrete"},{"position":{"x":9,"y":-8},"name":"refined-concrete"},{"position":{"x":9,"y":-7},"name":"refined-concrete"},{"position":{"x":9,"y":-6},"name":"refined-concrete"},{"position":{"x":9,"y":-5},"name":"refined-concrete"},{"position":{"x":9,"y":-4},"name":"refined-concrete"},{"position":{"x":9,"y":-3},"name":"refined-concrete"},{"position":{"x":9,"y":-2},"name":"refined-concrete"},{"position":{"x":9,"y":-1},"name":"refined-concrete"},{"position":{"x":9,"y":0},"name":"refined-concrete"},{"position":{"x":9,"y":1},"name":"refined-concrete"},{"position":{"x":9,"y":2},"name":"refined-concrete"},{"position":{"x":9,"y":3},"name":"refined-concrete"},{"position":{"x":9,"y":4},"name":"refined-concrete"},{"position":{"x":9,"y":5},"name":"refined-concrete"},{"position":{"x":9,"y":6},"name":"refined-concrete"},{"position":{"x":9,"y":7},"name":"refined-concrete"},{"position":{"x":9,"y":8},"name":"refined-concrete"},{"position":{"x":9,"y":9},"name":"refined-concrete"},{"position":{"x":9,"y":10},"name":"refined-concrete"},{"position":{"x":9,"y":11},"name":"refined-concrete"},{"position":{"x":9,"y":12},"name":"refined-concrete"},{"position":{"x":9,"y":13},"name":"refined-concrete"},{"position":{"x":9,"y":14},"name":"refined-concrete"},{"position":{"x":9,"y":15},"name":"refined-concrete"},{"position":{"x":9,"y":16},"name":"refined-concrete"},{"position":{"x":9,"y":17},"name":"refined-concrete"},{"position":{"x":9,"y":18},"name":"refined-concrete"},{"position":{"x":9,"y":19},"name":"refined-concrete"},{"position":{"x":9,"y":20},"name":"refined-concrete"},{"position":{"x":9,"y":21},"name":"refined-concrete"},{"position":{"x":9,"y":22},"name":"refined-concrete"},{"position":{"x":10,"y":-23},"name":"refined-concrete"},{"position":{"x":10,"y":-22},"name":"refined-concrete"},{"position":{"x":10,"y":-21},"name":"refined-concrete"},{"position":{"x":10,"y":-20},"name":"refined-concrete"},{"position":{"x":10,"y":-19},"name":"refined-concrete"},{"position":{"x":10,"y":-18},"name":"refined-concrete"},{"position":{"x":10,"y":-17},"name":"refined-concrete"},{"position":{"x":10,"y":-16},"name":"refined-concrete"},{"position":{"x":10,"y":-15},"name":"refined-concrete"},{"position":{"x":10,"y":-14},"name":"refined-concrete"},{"position":{"x":10,"y":-13},"name":"refined-concrete"},{"position":{"x":10,"y":-12},"name":"refined-concrete"},{"position":{"x":10,"y":-11},"name":"refined-concrete"},{"position":{"x":10,"y":-10},"name":"refined-concrete"},{"position":{"x":10,"y":-9},"name":"refined-concrete"},{"position":{"x":10,"y":-8},"name":"refined-concrete"},{"position":{"x":10,"y":-7},"name":"refined-concrete"},{"position":{"x":10,"y":-6},"name":"refined-concrete"},{"position":{"x":10,"y":-5},"name":"refined-concrete"},{"position":{"x":10,"y":-4},"name":"refined-concrete"},{"position":{"x":10,"y":-3},"name":"refined-concrete"},{"position":{"x":10,"y":-2},"name":"refined-concrete"},{"position":{"x":10,"y":-1},"name":"refined-concrete"},{"position":{"x":10,"y":0},"name":"refined-concrete"},{"position":{"x":10,"y":1},"name":"refined-concrete"},{"position":{"x":10,"y":2},"name":"refined-concrete"},{"position":{"x":10,"y":3},"name":"refined-concrete"},{"position":{"x":10,"y":4},"name":"refined-concrete"},{"position":{"x":10,"y":5},"name":"refined-concrete"},{"position":{"x":10,"y":6},"name":"refined-concrete"},{"position":{"x":10,"y":7},"name":"refined-concrete"},{"position":{"x":10,"y":8},"name":"refined-concrete"},{"position":{"x":10,"y":9},"name":"refined-concrete"},{"position":{"x":10,"y":10},"name":"refined-concrete"},{"position":{"x":10,"y":11},"name":"refined-concrete"},{"position":{"x":10,"y":12},"name":"refined-concrete"},{"position":{"x":10,"y":13},"name":"refined-concrete"},{"position":{"x":10,"y":14},"name":"refined-concrete"},{"position":{"x":10,"y":15},"name":"refined-concrete"},{"position":{"x":10,"y":16},"name":"refined-concrete"},{"position":{"x":10,"y":17},"name":"refined-concrete"},{"position":{"x":10,"y":18},"name":"refined-concrete"},{"position":{"x":10,"y":19},"name":"refined-concrete"},{"position":{"x":10,"y":20},"name":"refined-concrete"},{"position":{"x":10,"y":21},"name":"refined-concrete"},{"position":{"x":10,"y":22},"name":"refined-concrete"},{"position":{"x":11,"y":-23},"name":"refined-concrete"},{"position":{"x":11,"y":-22},"name":"refined-concrete"},{"position":{"x":11,"y":-21},"name":"refined-concrete"},{"position":{"x":11,"y":-20},"name":"refined-concrete"},{"position":{"x":11,"y":-19},"name":"refined-concrete"},{"position":{"x":11,"y":-18},"name":"refined-concrete"},{"position":{"x":11,"y":-17},"name":"refined-concrete"},{"position":{"x":11,"y":-16},"name":"refined-concrete"},{"position":{"x":11,"y":-15},"name":"refined-concrete"},{"position":{"x":11,"y":-14},"name":"refined-concrete"},{"position":{"x":11,"y":-13},"name":"refined-concrete"},{"position":{"x":11,"y":-12},"name":"refined-concrete"},{"position":{"x":11,"y":-11},"name":"refined-concrete"},{"position":{"x":11,"y":-10},"name":"refined-concrete"},{"position":{"x":11,"y":-9},"name":"refined-concrete"},{"position":{"x":11,"y":-8},"name":"refined-concrete"},{"position":{"x":11,"y":-7},"name":"refined-concrete"},{"position":{"x":11,"y":-6},"name":"refined-concrete"},{"position":{"x":11,"y":-5},"name":"refined-concrete"},{"position":{"x":11,"y":-4},"name":"refined-concrete"},{"position":{"x":11,"y":-3},"name":"refined-concrete"},{"position":{"x":11,"y":-2},"name":"refined-concrete"},{"position":{"x":11,"y":-1},"name":"refined-concrete"},{"position":{"x":11,"y":0},"name":"refined-concrete"},{"position":{"x":11,"y":1},"name":"refined-concrete"},{"position":{"x":11,"y":2},"name":"refined-concrete"},{"position":{"x":11,"y":3},"name":"refined-concrete"},{"position":{"x":11,"y":4},"name":"refined-concrete"},{"position":{"x":11,"y":5},"name":"refined-concrete"},{"position":{"x":11,"y":6},"name":"refined-concrete"},{"position":{"x":11,"y":7},"name":"refined-concrete"},{"position":{"x":11,"y":8},"name":"refined-concrete"},{"position":{"x":11,"y":9},"name":"refined-concrete"},{"position":{"x":11,"y":10},"name":"refined-concrete"},{"position":{"x":11,"y":11},"name":"refined-concrete"},{"position":{"x":11,"y":12},"name":"refined-concrete"},{"position":{"x":11,"y":13},"name":"refined-concrete"},{"position":{"x":11,"y":14},"name":"refined-concrete"},{"position":{"x":11,"y":15},"name":"refined-concrete"},{"position":{"x":11,"y":16},"name":"refined-concrete"},{"position":{"x":11,"y":17},"name":"refined-concrete"},{"position":{"x":11,"y":18},"name":"refined-concrete"},{"position":{"x":11,"y":19},"name":"refined-concrete"},{"position":{"x":11,"y":20},"name":"refined-concrete"},{"position":{"x":11,"y":21},"name":"refined-concrete"},{"position":{"x":11,"y":22},"name":"refined-concrete"},{"position":{"x":12,"y":-23},"name":"refined-concrete"},{"position":{"x":12,"y":-22},"name":"refined-concrete"},{"position":{"x":12,"y":-21},"name":"refined-concrete"},{"position":{"x":12,"y":-20},"name":"refined-concrete"},{"position":{"x":12,"y":-19},"name":"refined-concrete"},{"position":{"x":12,"y":-18},"name":"refined-concrete"},{"position":{"x":12,"y":-17},"name":"refined-concrete"},{"position":{"x":12,"y":-16},"name":"refined-concrete"},{"position":{"x":12,"y":-15},"name":"refined-concrete"},{"position":{"x":12,"y":-14},"name":"refined-concrete"},{"position":{"x":12,"y":-13},"name":"refined-concrete"},{"position":{"x":12,"y":-12},"name":"refined-concrete"},{"position":{"x":12,"y":-11},"name":"refined-concrete"},{"position":{"x":12,"y":-10},"name":"refined-concrete"},{"position":{"x":12,"y":-9},"name":"refined-concrete"},{"position":{"x":12,"y":-8},"name":"refined-concrete"},{"position":{"x":12,"y":-7},"name":"refined-concrete"},{"position":{"x":12,"y":-6},"name":"refined-concrete"},{"position":{"x":12,"y":-5},"name":"refined-concrete"},{"position":{"x":12,"y":-4},"name":"refined-concrete"},{"position":{"x":12,"y":-3},"name":"refined-concrete"},{"position":{"x":12,"y":-2},"name":"refined-concrete"},{"position":{"x":12,"y":-1},"name":"refined-concrete"},{"position":{"x":12,"y":0},"name":"refined-concrete"},{"position":{"x":12,"y":1},"name":"refined-concrete"},{"position":{"x":12,"y":2},"name":"refined-concrete"},{"position":{"x":12,"y":3},"name":"refined-concrete"},{"position":{"x":12,"y":4},"name":"refined-concrete"},{"position":{"x":12,"y":5},"name":"refined-concrete"},{"position":{"x":12,"y":6},"name":"refined-concrete"},{"position":{"x":12,"y":7},"name":"refined-concrete"},{"position":{"x":12,"y":8},"name":"refined-concrete"},{"position":{"x":12,"y":9},"name":"refined-concrete"},{"position":{"x":12,"y":10},"name":"refined-concrete"},{"position":{"x":12,"y":11},"name":"refined-concrete"},{"position":{"x":12,"y":12},"name":"refined-concrete"},{"position":{"x":12,"y":13},"name":"refined-concrete"},{"position":{"x":12,"y":14},"name":"refined-concrete"},{"position":{"x":12,"y":15},"name":"refined-concrete"},{"position":{"x":12,"y":16},"name":"refined-concrete"},{"position":{"x":12,"y":17},"name":"refined-concrete"},{"position":{"x":12,"y":18},"name":"refined-concrete"},{"position":{"x":12,"y":19},"name":"refined-concrete"},{"position":{"x":12,"y":20},"name":"refined-concrete"},{"position":{"x":12,"y":21},"name":"refined-concrete"},{"position":{"x":12,"y":22},"name":"refined-concrete"},{"position":{"x":13,"y":-23},"name":"refined-concrete"},{"position":{"x":13,"y":-22},"name":"refined-concrete"},{"position":{"x":13,"y":-21},"name":"refined-concrete"},{"position":{"x":13,"y":-20},"name":"refined-concrete"},{"position":{"x":13,"y":-19},"name":"refined-concrete"},{"position":{"x":13,"y":-18},"name":"refined-concrete"},{"position":{"x":13,"y":-17},"name":"refined-concrete"},{"position":{"x":13,"y":-16},"name":"refined-concrete"},{"position":{"x":13,"y":-15},"name":"refined-concrete"},{"position":{"x":13,"y":-14},"name":"refined-concrete"},{"position":{"x":13,"y":-13},"name":"refined-concrete"},{"position":{"x":13,"y":-12},"name":"refined-concrete"},{"position":{"x":13,"y":-11},"name":"refined-concrete"},{"position":{"x":13,"y":-10},"name":"refined-concrete"},{"position":{"x":13,"y":-9},"name":"refined-concrete"},{"position":{"x":13,"y":-8},"name":"refined-concrete"},{"position":{"x":13,"y":-7},"name":"refined-concrete"},{"position":{"x":13,"y":-6},"name":"refined-concrete"},{"position":{"x":13,"y":-5},"name":"refined-concrete"},{"position":{"x":13,"y":-4},"name":"refined-concrete"},{"position":{"x":13,"y":-3},"name":"refined-concrete"},{"position":{"x":13,"y":-2},"name":"refined-concrete"},{"position":{"x":13,"y":-1},"name":"refined-concrete"},{"position":{"x":13,"y":0},"name":"refined-concrete"},{"position":{"x":13,"y":1},"name":"refined-concrete"},{"position":{"x":13,"y":2},"name":"refined-concrete"},{"position":{"x":13,"y":3},"name":"refined-concrete"},{"position":{"x":13,"y":4},"name":"refined-concrete"},{"position":{"x":13,"y":5},"name":"refined-concrete"},{"position":{"x":13,"y":6},"name":"refined-concrete"},{"position":{"x":13,"y":7},"name":"refined-concrete"},{"position":{"x":13,"y":8},"name":"refined-concrete"},{"position":{"x":13,"y":9},"name":"refined-concrete"},{"position":{"x":13,"y":10},"name":"refined-concrete"},{"position":{"x":13,"y":11},"name":"refined-concrete"},{"position":{"x":13,"y":12},"name":"refined-concrete"},{"position":{"x":13,"y":13},"name":"refined-concrete"},{"position":{"x":13,"y":14},"name":"refined-concrete"},{"position":{"x":13,"y":15},"name":"refined-concrete"},{"position":{"x":13,"y":16},"name":"refined-concrete"},{"position":{"x":13,"y":17},"name":"refined-concrete"},{"position":{"x":13,"y":18},"name":"refined-concrete"},{"position":{"x":13,"y":19},"name":"refined-concrete"},{"position":{"x":13,"y":20},"name":"refined-concrete"},{"position":{"x":13,"y":21},"name":"refined-concrete"},{"position":{"x":13,"y":22},"name":"refined-concrete"},{"position":{"x":14,"y":-23},"name":"refined-concrete"},{"position":{"x":14,"y":-22},"name":"refined-concrete"},{"position":{"x":14,"y":-21},"name":"refined-concrete"},{"position":{"x":14,"y":-20},"name":"refined-concrete"},{"position":{"x":14,"y":-19},"name":"refined-concrete"},{"position":{"x":14,"y":-18},"name":"refined-concrete"},{"position":{"x":14,"y":-17},"name":"refined-concrete"},{"position":{"x":14,"y":-16},"name":"refined-concrete"},{"position":{"x":14,"y":-15},"name":"refined-concrete"},{"position":{"x":14,"y":-14},"name":"refined-concrete"},{"position":{"x":14,"y":-13},"name":"refined-concrete"},{"position":{"x":14,"y":-12},"name":"refined-concrete"},{"position":{"x":14,"y":-11},"name":"refined-concrete"},{"position":{"x":14,"y":-10},"name":"refined-concrete"},{"position":{"x":14,"y":-9},"name":"refined-concrete"},{"position":{"x":14,"y":-8},"name":"refined-concrete"},{"position":{"x":14,"y":-7},"name":"refined-concrete"},{"position":{"x":14,"y":-6},"name":"refined-concrete"},{"position":{"x":14,"y":-5},"name":"refined-concrete"},{"position":{"x":14,"y":-4},"name":"refined-concrete"},{"position":{"x":14,"y":-3},"name":"refined-concrete"},{"position":{"x":14,"y":-2},"name":"refined-concrete"},{"position":{"x":14,"y":-1},"name":"refined-concrete"},{"position":{"x":14,"y":0},"name":"refined-concrete"},{"position":{"x":14,"y":1},"name":"refined-concrete"},{"position":{"x":14,"y":2},"name":"refined-concrete"},{"position":{"x":14,"y":3},"name":"refined-concrete"},{"position":{"x":14,"y":4},"name":"refined-concrete"},{"position":{"x":14,"y":5},"name":"refined-concrete"},{"position":{"x":14,"y":6},"name":"refined-concrete"},{"position":{"x":14,"y":7},"name":"refined-concrete"},{"position":{"x":14,"y":8},"name":"refined-concrete"},{"position":{"x":14,"y":9},"name":"refined-concrete"},{"position":{"x":14,"y":10},"name":"refined-concrete"},{"position":{"x":14,"y":11},"name":"refined-concrete"},{"position":{"x":14,"y":12},"name":"refined-concrete"},{"position":{"x":14,"y":13},"name":"refined-concrete"},{"position":{"x":14,"y":14},"name":"refined-concrete"},{"position":{"x":14,"y":15},"name":"refined-concrete"},{"position":{"x":14,"y":16},"name":"refined-concrete"},{"position":{"x":14,"y":17},"name":"refined-concrete"},{"position":{"x":14,"y":18},"name":"refined-concrete"},{"position":{"x":14,"y":19},"name":"refined-concrete"},{"position":{"x":14,"y":20},"name":"refined-concrete"},{"position":{"x":14,"y":21},"name":"refined-concrete"},{"position":{"x":15,"y":-23},"name":"refined-concrete"},{"position":{"x":15,"y":-22},"name":"refined-concrete"},{"position":{"x":15,"y":-21},"name":"refined-concrete"},{"position":{"x":15,"y":-20},"name":"refined-concrete"},{"position":{"x":15,"y":-19},"name":"refined-concrete"},{"position":{"x":15,"y":-18},"name":"refined-concrete"},{"position":{"x":15,"y":-17},"name":"refined-concrete"},{"position":{"x":15,"y":-16},"name":"refined-concrete"},{"position":{"x":15,"y":-15},"name":"refined-concrete"},{"position":{"x":15,"y":-14},"name":"refined-concrete"},{"position":{"x":15,"y":-13},"name":"refined-concrete"},{"position":{"x":15,"y":-12},"name":"refined-concrete"},{"position":{"x":15,"y":-11},"name":"refined-concrete"},{"position":{"x":15,"y":-10},"name":"refined-concrete"},{"position":{"x":15,"y":-9},"name":"refined-concrete"},{"position":{"x":15,"y":-8},"name":"refined-concrete"},{"position":{"x":15,"y":-7},"name":"refined-concrete"},{"position":{"x":15,"y":-6},"name":"refined-concrete"},{"position":{"x":15,"y":-5},"name":"refined-concrete"},{"position":{"x":15,"y":-4},"name":"refined-concrete"},{"position":{"x":15,"y":-3},"name":"refined-concrete"},{"position":{"x":15,"y":-2},"name":"refined-concrete"},{"position":{"x":15,"y":-1},"name":"refined-concrete"},{"position":{"x":15,"y":0},"name":"refined-concrete"},{"position":{"x":15,"y":1},"name":"refined-concrete"},{"position":{"x":15,"y":2},"name":"refined-concrete"},{"position":{"x":15,"y":3},"name":"refined-concrete"},{"position":{"x":15,"y":4},"name":"refined-concrete"},{"position":{"x":15,"y":5},"name":"refined-concrete"},{"position":{"x":15,"y":6},"name":"refined-concrete"},{"position":{"x":15,"y":7},"name":"refined-concrete"},{"position":{"x":15,"y":8},"name":"refined-concrete"},{"position":{"x":15,"y":9},"name":"refined-concrete"},{"position":{"x":15,"y":10},"name":"refined-concrete"},{"position":{"x":15,"y":11},"name":"refined-concrete"},{"position":{"x":15,"y":12},"name":"refined-concrete"},{"position":{"x":15,"y":13},"name":"refined-concrete"},{"position":{"x":15,"y":14},"name":"refined-concrete"},{"position":{"x":15,"y":15},"name":"refined-concrete"},{"position":{"x":15,"y":16},"name":"refined-concrete"},{"position":{"x":15,"y":17},"name":"refined-concrete"},{"position":{"x":15,"y":18},"name":"refined-concrete"},{"position":{"x":15,"y":19},"name":"refined-concrete"},{"position":{"x":15,"y":20},"name":"refined-concrete"},{"position":{"x":15,"y":21},"name":"refined-concrete"},{"position":{"x":16,"y":-23},"name":"refined-concrete"},{"position":{"x":16,"y":-22},"name":"refined-concrete"},{"position":{"x":16,"y":-21},"name":"refined-concrete"},{"position":{"x":16,"y":-20},"name":"refined-concrete"},{"position":{"x":16,"y":-19},"name":"refined-concrete"},{"position":{"x":16,"y":-18},"name":"refined-concrete"},{"position":{"x":16,"y":-17},"name":"refined-concrete"},{"position":{"x":16,"y":-16},"name":"refined-concrete"},{"position":{"x":16,"y":-15},"name":"refined-concrete"},{"position":{"x":16,"y":-14},"name":"refined-concrete"},{"position":{"x":16,"y":-13},"name":"refined-concrete"},{"position":{"x":16,"y":-12},"name":"refined-concrete"},{"position":{"x":16,"y":-11},"name":"refined-concrete"},{"position":{"x":16,"y":-10},"name":"refined-concrete"},{"position":{"x":16,"y":-9},"name":"refined-concrete"},{"position":{"x":16,"y":-8},"name":"refined-concrete"},{"position":{"x":16,"y":-7},"name":"refined-concrete"},{"position":{"x":16,"y":-6},"name":"refined-concrete"},{"position":{"x":16,"y":-5},"name":"refined-concrete"},{"position":{"x":16,"y":-4},"name":"refined-concrete"},{"position":{"x":16,"y":-3},"name":"refined-concrete"},{"position":{"x":16,"y":-2},"name":"refined-concrete"},{"position":{"x":16,"y":-1},"name":"refined-concrete"},{"position":{"x":16,"y":0},"name":"refined-concrete"},{"position":{"x":16,"y":1},"name":"refined-concrete"},{"position":{"x":16,"y":2},"name":"refined-concrete"},{"position":{"x":16,"y":3},"name":"refined-concrete"},{"position":{"x":16,"y":4},"name":"refined-concrete"},{"position":{"x":16,"y":5},"name":"refined-concrete"},{"position":{"x":16,"y":6},"name":"refined-concrete"},{"position":{"x":16,"y":7},"name":"refined-concrete"},{"position":{"x":16,"y":8},"name":"refined-concrete"},{"position":{"x":16,"y":9},"name":"refined-concrete"},{"position":{"x":16,"y":10},"name":"refined-concrete"},{"position":{"x":16,"y":11},"name":"refined-concrete"},{"position":{"x":16,"y":12},"name":"refined-concrete"},{"position":{"x":16,"y":13},"name":"refined-concrete"},{"position":{"x":16,"y":14},"name":"refined-concrete"},{"position":{"x":16,"y":15},"name":"refined-concrete"},{"position":{"x":16,"y":16},"name":"refined-concrete"},{"position":{"x":16,"y":17},"name":"refined-concrete"},{"position":{"x":16,"y":18},"name":"refined-concrete"},{"position":{"x":16,"y":19},"name":"refined-concrete"},{"position":{"x":16,"y":20},"name":"refined-concrete"},{"position":{"x":16,"y":21},"name":"refined-concrete"},{"position":{"x":17,"y":-23},"name":"refined-concrete"},{"position":{"x":17,"y":-22},"name":"refined-concrete"},{"position":{"x":17,"y":-21},"name":"refined-concrete"},{"position":{"x":17,"y":-20},"name":"refined-concrete"},{"position":{"x":17,"y":-19},"name":"refined-concrete"},{"position":{"x":17,"y":-18},"name":"refined-concrete"},{"position":{"x":17,"y":-17},"name":"refined-concrete"},{"position":{"x":17,"y":-16},"name":"refined-concrete"},{"position":{"x":17,"y":-15},"name":"refined-concrete"},{"position":{"x":17,"y":-14},"name":"refined-concrete"},{"position":{"x":17,"y":-13},"name":"refined-concrete"},{"position":{"x":17,"y":-12},"name":"refined-concrete"},{"position":{"x":17,"y":-11},"name":"refined-concrete"},{"position":{"x":17,"y":-10},"name":"refined-concrete"},{"position":{"x":17,"y":-9},"name":"refined-concrete"},{"position":{"x":17,"y":-8},"name":"refined-concrete"},{"position":{"x":17,"y":-7},"name":"refined-concrete"},{"position":{"x":17,"y":-6},"name":"refined-concrete"},{"position":{"x":17,"y":-5},"name":"refined-concrete"},{"position":{"x":17,"y":-4},"name":"refined-concrete"},{"position":{"x":17,"y":-3},"name":"refined-concrete"},{"position":{"x":17,"y":-2},"name":"refined-concrete"},{"position":{"x":17,"y":-1},"name":"refined-concrete"},{"position":{"x":17,"y":0},"name":"refined-concrete"},{"position":{"x":17,"y":1},"name":"refined-concrete"},{"position":{"x":17,"y":2},"name":"refined-concrete"},{"position":{"x":17,"y":3},"name":"refined-concrete"},{"position":{"x":17,"y":4},"name":"refined-concrete"},{"position":{"x":17,"y":5},"name":"refined-concrete"},{"position":{"x":17,"y":6},"name":"refined-concrete"},{"position":{"x":17,"y":7},"name":"refined-concrete"},{"position":{"x":17,"y":8},"name":"refined-concrete"},{"position":{"x":17,"y":9},"name":"refined-concrete"},{"position":{"x":17,"y":10},"name":"refined-concrete"},{"position":{"x":17,"y":11},"name":"refined-concrete"},{"position":{"x":17,"y":12},"name":"refined-concrete"},{"position":{"x":17,"y":13},"name":"refined-concrete"},{"position":{"x":17,"y":14},"name":"refined-concrete"},{"position":{"x":17,"y":15},"name":"refined-concrete"},{"position":{"x":17,"y":16},"name":"refined-concrete"},{"position":{"x":17,"y":17},"name":"refined-concrete"},{"position":{"x":17,"y":18},"name":"refined-concrete"},{"position":{"x":17,"y":19},"name":"refined-concrete"},{"position":{"x":17,"y":20},"name":"refined-concrete"},{"position":{"x":17,"y":21},"name":"refined-concrete"},{"position":{"x":18,"y":-22},"name":"refined-concrete"},{"position":{"x":18,"y":-21},"name":"refined-concrete"},{"position":{"x":18,"y":-20},"name":"refined-concrete"},{"position":{"x":18,"y":-19},"name":"refined-concrete"},{"position":{"x":18,"y":-18},"name":"refined-concrete"},{"position":{"x":18,"y":-17},"name":"refined-concrete"},{"position":{"x":18,"y":-16},"name":"refined-concrete"},{"position":{"x":18,"y":-15},"name":"refined-concrete"},{"position":{"x":18,"y":-14},"name":"refined-concrete"},{"position":{"x":18,"y":-13},"name":"refined-concrete"},{"position":{"x":18,"y":-12},"name":"refined-concrete"},{"position":{"x":18,"y":-11},"name":"refined-concrete"},{"position":{"x":18,"y":-10},"name":"refined-concrete"},{"position":{"x":18,"y":-9},"name":"refined-concrete"},{"position":{"x":18,"y":-8},"name":"refined-concrete"},{"position":{"x":18,"y":-7},"name":"refined-concrete"},{"position":{"x":18,"y":-6},"name":"refined-concrete"},{"position":{"x":18,"y":-5},"name":"refined-concrete"},{"position":{"x":18,"y":-4},"name":"refined-concrete"},{"position":{"x":18,"y":-3},"name":"refined-concrete"},{"position":{"x":18,"y":-2},"name":"refined-concrete"},{"position":{"x":18,"y":-1},"name":"refined-concrete"},{"position":{"x":18,"y":0},"name":"refined-concrete"},{"position":{"x":18,"y":1},"name":"refined-concrete"},{"position":{"x":18,"y":2},"name":"refined-concrete"},{"position":{"x":18,"y":3},"name":"refined-concrete"},{"position":{"x":18,"y":4},"name":"refined-concrete"},{"position":{"x":18,"y":5},"name":"refined-concrete"},{"position":{"x":18,"y":6},"name":"refined-concrete"},{"position":{"x":18,"y":7},"name":"refined-concrete"},{"position":{"x":18,"y":8},"name":"refined-concrete"},{"position":{"x":18,"y":9},"name":"refined-concrete"},{"position":{"x":18,"y":10},"name":"refined-concrete"},{"position":{"x":18,"y":11},"name":"refined-concrete"},{"position":{"x":18,"y":12},"name":"refined-concrete"},{"position":{"x":18,"y":13},"name":"refined-concrete"},{"position":{"x":18,"y":14},"name":"refined-concrete"},{"position":{"x":18,"y":15},"name":"refined-concrete"},{"position":{"x":18,"y":16},"name":"refined-concrete"},{"position":{"x":18,"y":17},"name":"refined-concrete"},{"position":{"x":18,"y":18},"name":"refined-concrete"},{"position":{"x":18,"y":19},"name":"refined-concrete"},{"position":{"x":18,"y":20},"name":"refined-concrete"},{"position":{"x":18,"y":21},"name":"refined-concrete"},{"position":{"x":19,"y":-22},"name":"refined-concrete"},{"position":{"x":19,"y":-21},"name":"refined-concrete"},{"position":{"x":19,"y":-20},"name":"refined-concrete"},{"position":{"x":19,"y":-19},"name":"refined-concrete"},{"position":{"x":19,"y":-18},"name":"refined-concrete"},{"position":{"x":19,"y":-17},"name":"refined-concrete"},{"position":{"x":19,"y":-16},"name":"refined-concrete"},{"position":{"x":19,"y":-15},"name":"refined-concrete"},{"position":{"x":19,"y":-14},"name":"refined-concrete"},{"position":{"x":19,"y":-13},"name":"refined-concrete"},{"position":{"x":19,"y":-12},"name":"refined-concrete"},{"position":{"x":19,"y":-11},"name":"refined-concrete"},{"position":{"x":19,"y":-10},"name":"refined-concrete"},{"position":{"x":19,"y":-9},"name":"refined-concrete"},{"position":{"x":19,"y":-8},"name":"refined-concrete"},{"position":{"x":19,"y":-7},"name":"refined-concrete"},{"position":{"x":19,"y":-6},"name":"refined-concrete"},{"position":{"x":19,"y":-5},"name":"refined-concrete"},{"position":{"x":19,"y":-4},"name":"refined-concrete"},{"position":{"x":19,"y":-3},"name":"refined-concrete"},{"position":{"x":19,"y":-2},"name":"refined-concrete"},{"position":{"x":19,"y":-1},"name":"refined-concrete"},{"position":{"x":19,"y":0},"name":"refined-concrete"},{"position":{"x":19,"y":1},"name":"refined-concrete"},{"position":{"x":19,"y":2},"name":"refined-concrete"},{"position":{"x":19,"y":3},"name":"refined-concrete"},{"position":{"x":19,"y":4},"name":"refined-concrete"},{"position":{"x":19,"y":5},"name":"refined-concrete"},{"position":{"x":19,"y":6},"name":"refined-concrete"},{"position":{"x":19,"y":7},"name":"refined-concrete"},{"position":{"x":19,"y":8},"name":"refined-concrete"},{"position":{"x":19,"y":9},"name":"refined-concrete"},{"position":{"x":19,"y":10},"name":"refined-concrete"},{"position":{"x":19,"y":11},"name":"refined-concrete"},{"position":{"x":19,"y":12},"name":"refined-concrete"},{"position":{"x":19,"y":13},"name":"refined-concrete"},{"position":{"x":19,"y":14},"name":"refined-concrete"},{"position":{"x":19,"y":15},"name":"refined-concrete"},{"position":{"x":19,"y":16},"name":"refined-concrete"},{"position":{"x":19,"y":17},"name":"refined-concrete"},{"position":{"x":19,"y":18},"name":"refined-concrete"},{"position":{"x":19,"y":19},"name":"refined-concrete"},{"position":{"x":19,"y":20},"name":"refined-concrete"},{"position":{"x":20,"y":-21},"name":"refined-concrete"},{"position":{"x":20,"y":-20},"name":"refined-concrete"},{"position":{"x":20,"y":-19},"name":"refined-concrete"},{"position":{"x":20,"y":-18},"name":"refined-concrete"},{"position":{"x":20,"y":-17},"name":"refined-concrete"},{"position":{"x":20,"y":-16},"name":"refined-concrete"},{"position":{"x":20,"y":-15},"name":"refined-concrete"},{"position":{"x":20,"y":-14},"name":"refined-concrete"},{"position":{"x":20,"y":-13},"name":"refined-concrete"},{"position":{"x":20,"y":-12},"name":"refined-concrete"},{"position":{"x":20,"y":-11},"name":"refined-concrete"},{"position":{"x":20,"y":-10},"name":"refined-concrete"},{"position":{"x":20,"y":-9},"name":"refined-concrete"},{"position":{"x":20,"y":-8},"name":"refined-concrete"},{"position":{"x":20,"y":-7},"name":"refined-concrete"},{"position":{"x":20,"y":-6},"name":"refined-concrete"},{"position":{"x":20,"y":-5},"name":"refined-concrete"},{"position":{"x":20,"y":-4},"name":"refined-concrete"},{"position":{"x":20,"y":-3},"name":"refined-concrete"},{"position":{"x":20,"y":-2},"name":"refined-concrete"},{"position":{"x":20,"y":-1},"name":"refined-concrete"},{"position":{"x":20,"y":0},"name":"refined-concrete"},{"position":{"x":20,"y":1},"name":"refined-concrete"},{"position":{"x":20,"y":2},"name":"refined-concrete"},{"position":{"x":20,"y":3},"name":"refined-concrete"},{"position":{"x":20,"y":4},"name":"refined-concrete"},{"position":{"x":20,"y":5},"name":"refined-concrete"},{"position":{"x":20,"y":6},"name":"refined-concrete"},{"position":{"x":20,"y":7},"name":"refined-concrete"},{"position":{"x":20,"y":8},"name":"refined-concrete"},{"position":{"x":20,"y":9},"name":"refined-concrete"},{"position":{"x":20,"y":10},"name":"refined-concrete"},{"position":{"x":20,"y":11},"name":"refined-concrete"},{"position":{"x":20,"y":12},"name":"refined-concrete"},{"position":{"x":20,"y":13},"name":"refined-concrete"},{"position":{"x":20,"y":14},"name":"refined-concrete"},{"position":{"x":20,"y":15},"name":"refined-concrete"},{"position":{"x":20,"y":16},"name":"refined-concrete"},{"position":{"x":20,"y":17},"name":"refined-concrete"},{"position":{"x":20,"y":18},"name":"refined-concrete"},{"position":{"x":20,"y":19},"name":"refined-concrete"},{"position":{"x":21,"y":-21},"name":"refined-concrete"},{"position":{"x":21,"y":-20},"name":"refined-concrete"},{"position":{"x":21,"y":-19},"name":"refined-concrete"},{"position":{"x":21,"y":-18},"name":"refined-concrete"},{"position":{"x":21,"y":-17},"name":"refined-concrete"},{"position":{"x":21,"y":-16},"name":"refined-concrete"},{"position":{"x":21,"y":-15},"name":"refined-concrete"},{"position":{"x":21,"y":-14},"name":"refined-concrete"},{"position":{"x":21,"y":-13},"name":"refined-concrete"},{"position":{"x":21,"y":-12},"name":"refined-concrete"},{"position":{"x":21,"y":-11},"name":"refined-concrete"},{"position":{"x":21,"y":-10},"name":"refined-concrete"},{"position":{"x":21,"y":-9},"name":"refined-concrete"},{"position":{"x":21,"y":-8},"name":"refined-concrete"},{"position":{"x":21,"y":-7},"name":"refined-concrete"},{"position":{"x":21,"y":-6},"name":"refined-concrete"},{"position":{"x":21,"y":-5},"name":"refined-concrete"},{"position":{"x":21,"y":-4},"name":"refined-concrete"},{"position":{"x":21,"y":-3},"name":"refined-concrete"},{"position":{"x":21,"y":-2},"name":"refined-concrete"},{"position":{"x":21,"y":-1},"name":"refined-concrete"},{"position":{"x":21,"y":0},"name":"refined-concrete"},{"position":{"x":21,"y":1},"name":"refined-concrete"},{"position":{"x":21,"y":2},"name":"refined-concrete"},{"position":{"x":21,"y":3},"name":"refined-concrete"},{"position":{"x":21,"y":4},"name":"refined-concrete"},{"position":{"x":21,"y":5},"name":"refined-concrete"},{"position":{"x":21,"y":6},"name":"refined-concrete"},{"position":{"x":21,"y":7},"name":"refined-concrete"},{"position":{"x":21,"y":8},"name":"refined-concrete"},{"position":{"x":21,"y":9},"name":"refined-concrete"},{"position":{"x":21,"y":10},"name":"refined-concrete"},{"position":{"x":21,"y":11},"name":"refined-concrete"},{"position":{"x":21,"y":12},"name":"refined-concrete"},{"position":{"x":21,"y":13},"name":"refined-concrete"},{"position":{"x":21,"y":14},"name":"refined-concrete"},{"position":{"x":21,"y":15},"name":"refined-concrete"},{"position":{"x":21,"y":16},"name":"refined-concrete"},{"position":{"x":21,"y":17},"name":"refined-concrete"},{"position":{"x":21,"y":18},"name":"refined-concrete"},{"position":{"x":22,"y":-19},"name":"refined-concrete"},{"position":{"x":22,"y":-18},"name":"refined-concrete"},{"position":{"x":22,"y":-17},"name":"refined-concrete"},{"position":{"x":22,"y":-16},"name":"refined-concrete"},{"position":{"x":22,"y":-15},"name":"refined-concrete"},{"position":{"x":22,"y":-14},"name":"refined-concrete"},{"position":{"x":22,"y":-13},"name":"refined-concrete"},{"position":{"x":22,"y":-12},"name":"refined-concrete"},{"position":{"x":22,"y":-11},"name":"refined-concrete"},{"position":{"x":22,"y":-10},"name":"refined-concrete"},{"position":{"x":22,"y":-9},"name":"refined-concrete"},{"position":{"x":22,"y":-8},"name":"refined-concrete"},{"position":{"x":22,"y":-7},"name":"refined-concrete"},{"position":{"x":22,"y":-6},"name":"refined-concrete"},{"position":{"x":22,"y":-5},"name":"refined-concrete"},{"position":{"x":22,"y":-4},"name":"refined-concrete"},{"position":{"x":22,"y":-3},"name":"refined-concrete"},{"position":{"x":22,"y":-2},"name":"refined-concrete"},{"position":{"x":22,"y":-1},"name":"refined-concrete"},{"position":{"x":22,"y":4},"name":"refined-concrete"},{"position":{"x":22,"y":5},"name":"refined-concrete"},{"position":{"x":22,"y":6},"name":"refined-concrete"},{"position":{"x":22,"y":7},"name":"refined-concrete"},{"position":{"x":22,"y":8},"name":"refined-concrete"},{"position":{"x":22,"y":9},"name":"refined-concrete"},{"position":{"x":22,"y":10},"name":"refined-concrete"},{"position":{"x":22,"y":11},"name":"refined-concrete"},{"position":{"x":22,"y":12},"name":"refined-concrete"},{"position":{"x":23,"y":-14},"name":"refined-concrete"},{"position":{"x":23,"y":-13},"name":"refined-concrete"},{"position":{"x":23,"y":-12},"name":"refined-concrete"},{"position":{"x":23,"y":-11},"name":"refined-concrete"},{"position":{"x":23,"y":-10},"name":"refined-concrete"},{"position":{"x":23,"y":-9},"name":"refined-concrete"},{"position":{"x":23,"y":-8},"name":"refined-concrete"},{"position":{"x":23,"y":-7},"name":"refined-concrete"},{"position":{"x":23,"y":7},"name":"refined-concrete"},{"position":{"x":23,"y":8},"name":"refined-concrete"},{"position":{"x":23,"y":9},"name":"refined-concrete"},{"position":{"x":23,"y":10},"name":"refined-concrete"},{"position":{"x":23,"y":11},"name":"refined-concrete"},{"position":{"x":23,"y":12},"name":"refined-concrete"},{"position":{"x":24,"y":-11},"name":"refined-concrete"},{"position":{"x":24,"y":-10},"name":"refined-concrete"}],"item":"blueprint","version":73018572801}}' diff --git a/maps/tank_conquest/blueprint_poi_fire_json.lua b/maps/tank_conquest/blueprint_poi_fire_json.lua deleted file mode 100644 index b3ce281a2..000000000 --- a/maps/tank_conquest/blueprint_poi_fire_json.lua +++ /dev/null @@ -1 +0,0 @@ -return '{"blueprint":{"icons":[{"signal":{"type":"item","name":"land-mine"},"index":1},{"signal":{"type":"item","name":"stone-wall"},"index":2}],"entities":[{"entity_number":1,"name":"land-mine","position":{"x":-7.765625,"y":-10.25}},{"entity_number":2,"name":"land-mine","position":{"x":-5.99609375,"y":-10.26171875}},{"entity_number":3,"name":"stone-wall","position":{"x":-6,"y":-11}},{"entity_number":4,"name":"land-mine","position":{"x":-4.859375,"y":-10.90234375}},{"entity_number":5,"name":"stone-wall","position":{"x":-4,"y":-11}},{"entity_number":6,"name":"land-mine","position":{"x":-2.9375,"y":-11.26953125}},{"entity_number":7,"name":"stone-wall","position":{"x":-3,"y":-12}},{"entity_number":8,"name":"land-mine","position":{"x":-1.29296875,"y":-11.0703125}},{"entity_number":9,"name":"stone-wall","position":{"x":-2,"y":-11}},{"entity_number":10,"name":"stone-wall","position":{"x":-1,"y":-12}},{"entity_number":11,"name":"land-mine","position":{"x":0.89453125,"y":-10.84375}},{"entity_number":12,"name":"stone-wall","position":{"x":0,"y":-11}},{"entity_number":13,"name":"stone-wall","position":{"x":2,"y":-11}},{"entity_number":14,"name":"land-mine","position":{"x":3.1015625,"y":-10.984375}},{"entity_number":15,"name":"stone-wall","position":{"x":4,"y":-11}},{"entity_number":16,"name":"land-mine","position":{"x":4.94140625,"y":-11.09765625}},{"entity_number":17,"name":"stone-wall","position":{"x":5,"y":-12}},{"entity_number":18,"name":"land-mine","position":{"x":6.23046875,"y":-10.13671875}},{"entity_number":19,"name":"stone-wall","position":{"x":6,"y":-11}},{"entity_number":20,"name":"land-mine","position":{"x":7.90234375,"y":-10.5078125}},{"entity_number":21,"name":"land-mine","position":{"x":-8.69921875,"y":-9.5703125}},{"entity_number":22,"name":"land-mine","position":{"x":-8.953125,"y":-8.6953125}},{"entity_number":23,"name":"land-mine","position":{"x":-7.7109375,"y":-8.28125}},{"entity_number":24,"name":"stone-wall","position":{"x":-8,"y":-9}},{"entity_number":25,"name":"land-mine","position":{"x":-6.7734375,"y":-9.13671875}},{"entity_number":26,"name":"stone-wall","position":{"x":-7,"y":-10}},{"entity_number":27,"name":"stone-wall","position":{"x":-6,"y":-9}},{"entity_number":28,"name":"land-mine","position":{"x":-4.91796875,"y":-9.13671875}},{"entity_number":29,"name":"stone-wall","position":{"x":-5,"y":-10}},{"entity_number":30,"name":"land-mine","position":{"x":-3.7265625,"y":-10.08203125}},{"entity_number":31,"name":"stone-wall","position":{"x":-4,"y":-9}},{"entity_number":32,"name":"land-mine","position":{"x":-2.69140625,"y":-9.13671875}},{"entity_number":33,"name":"land-mine","position":{"x":-2.21484375,"y":-10.02734375}},{"entity_number":34,"name":"stone-wall","position":{"x":-3,"y":-10}},{"entity_number":35,"name":"stone-wall","position":{"x":-2,"y":-9}},{"entity_number":36,"name":"land-mine","position":{"x":-0.8359375,"y":-9.13671875}},{"entity_number":37,"name":"stone-wall","position":{"x":-1,"y":-10}},{"entity_number":38,"name":"land-mine","position":{"x":-0.015625,"y":-10.08203125}},{"entity_number":39,"name":"stone-wall","position":{"x":0,"y":-9}},{"entity_number":40,"name":"land-mine","position":{"x":0.98828125,"y":-9.16796875}},{"entity_number":41,"name":"stone-wall","position":{"x":1,"y":-10}},{"entity_number":42,"name":"land-mine","position":{"x":2.2109375,"y":-10.08203125}},{"entity_number":43,"name":"stone-wall","position":{"x":2,"y":-9}},{"entity_number":44,"name":"land-mine","position":{"x":3.24609375,"y":-9.13671875}},{"entity_number":45,"name":"stone-wall","position":{"x":3,"y":-10}},{"entity_number":46,"name":"land-mine","position":{"x":3.94140625,"y":-10.09765625}},{"entity_number":47,"name":"stone-wall","position":{"x":4,"y":-9}},{"entity_number":48,"name":"land-mine","position":{"x":5.1015625,"y":-9.13671875}},{"entity_number":49,"name":"stone-wall","position":{"x":5,"y":-10}},{"entity_number":50,"name":"stone-wall","position":{"x":6,"y":-9}},{"entity_number":51,"name":"land-mine","position":{"x":7.01171875,"y":-8.71484375}},{"entity_number":52,"name":"stone-wall","position":{"x":7,"y":-10}},{"entity_number":53,"name":"stone-wall","position":{"x":8,"y":-9}},{"entity_number":54,"name":"land-mine","position":{"x":9.01171875,"y":-9.0546875}},{"entity_number":55,"name":"stone-wall","position":{"x":9,"y":-10}},{"entity_number":56,"name":"land-mine","position":{"x":10.20703125,"y":-8.12890625}},{"entity_number":57,"name":"stone-wall","position":{"x":10,"y":-9}},{"entity_number":58,"name":"land-mine","position":{"x":-11.04296875,"y":-6.88671875}},{"entity_number":59,"name":"land-mine","position":{"x":-9.96875,"y":-7.859375}},{"entity_number":60,"name":"stone-wall","position":{"x":-10,"y":-7}},{"entity_number":61,"name":"land-mine","position":{"x":-8.9375,"y":-7.0546875}},{"entity_number":62,"name":"stone-wall","position":{"x":-9,"y":-8}},{"entity_number":63,"name":"stone-wall","position":{"x":-8,"y":-7}},{"entity_number":64,"name":"stone-wall","position":{"x":-7,"y":-8}},{"entity_number":65,"name":"stone-wall","position":{"x":-7,"y":-7}},{"entity_number":66,"name":"stone-wall","position":{"x":-6,"y":-8}},{"entity_number":67,"name":"gun-turret","position":{"x":-5.5,"y":-6.5}},{"entity_number":68,"name":"stone-wall","position":{"x":-5,"y":-8}},{"entity_number":69,"name":"storage-tank","position":{"x":-3,"y":-6}},{"entity_number":70,"name":"stone-wall","position":{"x":-4,"y":-8}},{"entity_number":71,"name":"stone-wall","position":{"x":-3,"y":-8}},{"entity_number":72,"name":"stone-wall","position":{"x":-2,"y":-8}},{"entity_number":73,"name":"stone-wall","position":{"x":-1,"y":-8}},{"entity_number":74,"name":"stone-wall","position":{"x":0,"y":-8}},{"entity_number":75,"name":"flamethrower-turret","position":{"x":0.5,"y":-6}},{"entity_number":76,"name":"stone-wall","position":{"x":1,"y":-8}},{"entity_number":77,"name":"stone-wall","position":{"x":2,"y":-8}},{"entity_number":78,"name":"stone-wall","position":{"x":3,"y":-8}},{"entity_number":79,"name":"stone-wall","position":{"x":4,"y":-8}},{"entity_number":80,"name":"gun-turret","position":{"x":4.5,"y":-6.5}},{"entity_number":81,"name":"stone-wall","position":{"x":5,"y":-8}},{"entity_number":82,"name":"stone-wall","position":{"x":6,"y":-8}},{"entity_number":83,"name":"stone-wall","position":{"x":6,"y":-7}},{"entity_number":84,"name":"land-mine","position":{"x":7.0703125,"y":-7.03515625}},{"entity_number":85,"name":"stone-wall","position":{"x":7,"y":-8}},{"entity_number":86,"name":"land-mine","position":{"x":8.109375,"y":-6.18359375}},{"entity_number":87,"name":"land-mine","position":{"x":8.109375,"y":-8.0390625}},{"entity_number":88,"name":"stone-wall","position":{"x":8,"y":-7}},{"entity_number":89,"name":"land-mine","position":{"x":9.24609375,"y":-6.92578125}},{"entity_number":90,"name":"stone-wall","position":{"x":9,"y":-8}},{"entity_number":91,"name":"land-mine","position":{"x":10.20703125,"y":-6.2734375}},{"entity_number":92,"name":"stone-wall","position":{"x":10,"y":-7}},{"entity_number":93,"name":"land-mine","position":{"x":-11.921875,"y":-4.21875}},{"entity_number":94,"name":"land-mine","position":{"x":-11.02734375,"y":-4.92578125}},{"entity_number":95,"name":"stone-wall","position":{"x":-11,"y":-6}},{"entity_number":96,"name":"land-mine","position":{"x":-9.96875,"y":-5.859375}},{"entity_number":97,"name":"stone-wall","position":{"x":-10,"y":-5}},{"entity_number":98,"name":"land-mine","position":{"x":-8.953125,"y":-4.859375}},{"entity_number":99,"name":"stone-wall","position":{"x":-9,"y":-6}},{"entity_number":100,"name":"land-mine","position":{"x":-7.7109375,"y":-6.0546875}},{"entity_number":101,"name":"stone-wall","position":{"x":-8,"y":-5}},{"entity_number":102,"name":"stone-wall","position":{"x":-7,"y":-6}},{"entity_number":103,"name":"stone-wall","position":{"x":-7,"y":-5}},{"entity_number":104,"name":"inserter","position":{"x":-5,"y":-5},"direction":4},{"entity_number":105,"name":"pipe","position":{"x":-1,"y":-5}},{"entity_number":106,"name":"pipe","position":{"x":2,"y":-5}},{"entity_number":107,"name":"pipe","position":{"x":3,"y":-5}},{"entity_number":108,"name":"inserter","position":{"x":4,"y":-5},"direction":4},{"entity_number":109,"name":"stone-wall","position":{"x":6,"y":-6}},{"entity_number":110,"name":"stone-wall","position":{"x":6,"y":-5}},{"entity_number":111,"name":"land-mine","position":{"x":6.921875,"y":-5.06640625}},{"entity_number":112,"name":"stone-wall","position":{"x":7,"y":-6}},{"entity_number":113,"name":"stone-wall","position":{"x":8,"y":-5}},{"entity_number":114,"name":"land-mine","position":{"x":9.24609375,"y":-4.69921875}},{"entity_number":115,"name":"stone-wall","position":{"x":9,"y":-6}},{"entity_number":116,"name":"stone-wall","position":{"x":10,"y":-5}},{"entity_number":117,"name":"stone-wall","position":{"x":11,"y":-6}},{"entity_number":118,"name":"land-mine","position":{"x":-11.921875,"y":-2.21875}},{"entity_number":119,"name":"stone-wall","position":{"x":-12,"y":-3}},{"entity_number":120,"name":"land-mine","position":{"x":-11.04296875,"y":-2.88671875}},{"entity_number":121,"name":"stone-wall","position":{"x":-11,"y":-4}},{"entity_number":122,"name":"land-mine","position":{"x":-9.96875,"y":-3.859375}},{"entity_number":123,"name":"stone-wall","position":{"x":-10,"y":-3}},{"entity_number":124,"name":"land-mine","position":{"x":-8.953125,"y":-3.00390625}},{"entity_number":125,"name":"stone-wall","position":{"x":-9,"y":-4}},{"entity_number":126,"name":"land-mine","position":{"x":-7.98828125,"y":-4.08984375}},{"entity_number":127,"name":"stone-wall","position":{"x":-8,"y":-3}},{"entity_number":128,"name":"stone-wall","position":{"x":-7,"y":-4}},{"entity_number":129,"name":"stone-wall","position":{"x":-7,"y":-3}},{"entity_number":130,"name":"infinity-chest","position":{"x":-5,"y":-4},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":131,"name":"pipe","position":{"x":-4,"y":-4}},{"entity_number":132,"name":"pipe","position":{"x":-4,"y":-3}},{"entity_number":133,"name":"pipe","position":{"x":-3,"y":-4}},{"entity_number":134,"name":"pipe","position":{"x":-2,"y":-4}},{"entity_number":135,"name":"solar-panel","position":{"x":1,"y":-3}},{"entity_number":136,"name":"pipe","position":{"x":3,"y":-4}},{"entity_number":137,"name":"pipe","position":{"x":3,"y":-3}},{"entity_number":138,"name":"infinity-chest","position":{"x":4,"y":-4},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":139,"name":"stone-wall","position":{"x":6,"y":-4}},{"entity_number":140,"name":"stone-wall","position":{"x":6,"y":-3}},{"entity_number":141,"name":"land-mine","position":{"x":7.0703125,"y":-2.953125}},{"entity_number":142,"name":"stone-wall","position":{"x":7,"y":-4}},{"entity_number":143,"name":"land-mine","position":{"x":8.109375,"y":-3.95703125}},{"entity_number":144,"name":"stone-wall","position":{"x":8,"y":-3}},{"entity_number":145,"name":"land-mine","position":{"x":9.24609375,"y":-2.84375}},{"entity_number":146,"name":"stone-wall","position":{"x":9,"y":-4}},{"entity_number":147,"name":"land-mine","position":{"x":10.20703125,"y":-2.19140625}},{"entity_number":148,"name":"land-mine","position":{"x":10.2421875,"y":-3.90625}},{"entity_number":149,"name":"stone-wall","position":{"x":10,"y":-3}},{"entity_number":150,"name":"land-mine","position":{"x":11.16796875,"y":-2.890625}},{"entity_number":151,"name":"land-mine","position":{"x":-11.921875,"y":-0.21875}},{"entity_number":152,"name":"stone-wall","position":{"x":-12,"y":-1}},{"entity_number":153,"name":"land-mine","position":{"x":-11.04296875,"y":-0.88671875}},{"entity_number":154,"name":"stone-wall","position":{"x":-11,"y":-2}},{"entity_number":155,"name":"land-mine","position":{"x":-9.96875,"y":-1.859375}},{"entity_number":156,"name":"stone-wall","position":{"x":-10,"y":-1}},{"entity_number":157,"name":"land-mine","position":{"x":-8.87109375,"y":-1.0703125}},{"entity_number":158,"name":"stone-wall","position":{"x":-9,"y":-2}},{"entity_number":159,"name":"land-mine","position":{"x":-7.7109375,"y":-1.97265625}},{"entity_number":160,"name":"stone-wall","position":{"x":-8,"y":-1}},{"entity_number":161,"name":"stone-wall","position":{"x":-7,"y":-2}},{"entity_number":162,"name":"stone-wall","position":{"x":-7,"y":-1}},{"entity_number":163,"name":"flamethrower-turret","position":{"x":-5,"y":-0.5},"direction":6},{"entity_number":164,"name":"infinity-pipe","position":{"x":-4,"y":-2},"infinity_settings":{"name":"crude-oil","percentage":1,"temperature":25,"mode":"at-least"}},{"entity_number":165,"name":"infinity-chest","position":{"x":-2,"y":-2},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"explosive-cannon-shell","count":1,"mode":"at-least","index":1}]}},{"entity_number":166,"name":"inserter","position":{"x":-2,"y":-1}},{"entity_number":167,"name":"substation","position":{"x":-0.5,"y":-0.5}},{"entity_number":168,"name":"flamethrower-turret","position":{"x":4,"y":-0.5},"direction":2},{"entity_number":169,"name":"pipe","position":{"x":3,"y":-2}},{"entity_number":170,"name":"stone-wall","position":{"x":6,"y":-2}},{"entity_number":171,"name":"stone-wall","position":{"x":6,"y":-1}},{"entity_number":172,"name":"land-mine","position":{"x":7.0703125,"y":-0.7265625}},{"entity_number":173,"name":"stone-wall","position":{"x":7,"y":-2}},{"entity_number":174,"name":"land-mine","position":{"x":8.109375,"y":-2.1015625}},{"entity_number":175,"name":"land-mine","position":{"x":8.0703125,"y":-0.125}},{"entity_number":176,"name":"stone-wall","position":{"x":8,"y":-1}},{"entity_number":177,"name":"land-mine","position":{"x":9.24609375,"y":-0.98828125}},{"entity_number":178,"name":"stone-wall","position":{"x":9,"y":-2}},{"entity_number":179,"name":"stone-wall","position":{"x":10,"y":-1}},{"entity_number":180,"name":"land-mine","position":{"x":11.0859375,"y":-1.05078125}},{"entity_number":181,"name":"stone-wall","position":{"x":11,"y":-2}},{"entity_number":182,"name":"land-mine","position":{"x":-11.921875,"y":1.78125}},{"entity_number":183,"name":"stone-wall","position":{"x":-12,"y":1}},{"entity_number":184,"name":"land-mine","position":{"x":-10.890625,"y":0.97265625}},{"entity_number":185,"name":"stone-wall","position":{"x":-11,"y":0}},{"entity_number":186,"name":"land-mine","position":{"x":-9.96875,"y":0.140625}},{"entity_number":187,"name":"stone-wall","position":{"x":-10,"y":1}},{"entity_number":188,"name":"land-mine","position":{"x":-8.953125,"y":1.078125}},{"entity_number":189,"name":"stone-wall","position":{"x":-9,"y":0}},{"entity_number":190,"name":"land-mine","position":{"x":-7.87890625,"y":0.0859375}},{"entity_number":191,"name":"stone-wall","position":{"x":-8,"y":1}},{"entity_number":192,"name":"stone-wall","position":{"x":-7,"y":1}},{"entity_number":193,"name":"stone-wall","position":{"x":-7,"y":0}},{"entity_number":194,"name":"pipe","position":{"x":-4,"y":1}},{"entity_number":195,"name":"wooden-chest","position":{"x":-1,"y":1},"bar":1},{"entity_number":196,"name":"wooden-chest","position":{"x":-2,"y":0},"bar":1},{"entity_number":197,"name":"infinity-chest","position":{"x":1,"y":1},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"flamethrower-ammo","count":1,"mode":"at-least","index":1}]}},{"entity_number":198,"name":"inserter","position":{"x":0,"y":1},"direction":2},{"entity_number":199,"name":"pipe","position":{"x":3,"y":1}},{"entity_number":200,"name":"stone-wall","position":{"x":6,"y":0}},{"entity_number":201,"name":"stone-wall","position":{"x":6,"y":1}},{"entity_number":202,"name":"land-mine","position":{"x":7.0703125,"y":1.12890625}},{"entity_number":203,"name":"stone-wall","position":{"x":7,"y":0}},{"entity_number":204,"name":"stone-wall","position":{"x":8,"y":1}},{"entity_number":205,"name":"land-mine","position":{"x":9.24609375,"y":1.23828125}},{"entity_number":206,"name":"stone-wall","position":{"x":9,"y":0}},{"entity_number":207,"name":"land-mine","position":{"x":10.20703125,"y":1.890625}},{"entity_number":208,"name":"land-mine","position":{"x":10.20703125,"y":0.03515625}},{"entity_number":209,"name":"stone-wall","position":{"x":10,"y":1}},{"entity_number":210,"name":"land-mine","position":{"x":-11.04296875,"y":3.11328125}},{"entity_number":211,"name":"stone-wall","position":{"x":-11,"y":2}},{"entity_number":212,"name":"land-mine","position":{"x":-9.96875,"y":2.140625}},{"entity_number":213,"name":"land-mine","position":{"x":-9.125,"y":2.88671875}},{"entity_number":214,"name":"stone-wall","position":{"x":-10,"y":3}},{"entity_number":215,"name":"stone-wall","position":{"x":-9,"y":2}},{"entity_number":216,"name":"land-mine","position":{"x":-7.7109375,"y":2.109375}},{"entity_number":217,"name":"stone-wall","position":{"x":-8,"y":3}},{"entity_number":218,"name":"stone-wall","position":{"x":-7,"y":3}},{"entity_number":219,"name":"stone-wall","position":{"x":-7,"y":2}},{"entity_number":220,"name":"infinity-chest","position":{"x":-5,"y":3},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":221,"name":"pipe","position":{"x":-4,"y":3}},{"entity_number":222,"name":"pipe","position":{"x":-4,"y":2}},{"entity_number":223,"name":"pipe","position":{"x":0,"y":3}},{"entity_number":224,"name":"pipe","position":{"x":1,"y":3}},{"entity_number":225,"name":"pipe","position":{"x":2,"y":3}},{"entity_number":226,"name":"pipe","position":{"x":3,"y":2}},{"entity_number":227,"name":"pipe","position":{"x":3,"y":3}},{"entity_number":228,"name":"infinity-chest","position":{"x":4,"y":3},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":229,"name":"stone-wall","position":{"x":6,"y":2}},{"entity_number":230,"name":"stone-wall","position":{"x":6,"y":3}},{"entity_number":231,"name":"land-mine","position":{"x":7.0703125,"y":2.984375}},{"entity_number":232,"name":"stone-wall","position":{"x":7,"y":2}},{"entity_number":233,"name":"land-mine","position":{"x":8.109375,"y":3.8359375}},{"entity_number":234,"name":"land-mine","position":{"x":8.109375,"y":1.98046875}},{"entity_number":235,"name":"stone-wall","position":{"x":8,"y":3}},{"entity_number":236,"name":"land-mine","position":{"x":9.24609375,"y":2.72265625}},{"entity_number":237,"name":"stone-wall","position":{"x":9,"y":2}},{"entity_number":238,"name":"land-mine","position":{"x":10.0390625,"y":3.79296875}},{"entity_number":239,"name":"stone-wall","position":{"x":10,"y":3}},{"entity_number":240,"name":"land-mine","position":{"x":-10.11328125,"y":3.94921875}},{"entity_number":241,"name":"stone-wall","position":{"x":-11,"y":4}},{"entity_number":242,"name":"land-mine","position":{"x":-9.69140625,"y":5.859375}},{"entity_number":243,"name":"stone-wall","position":{"x":-10,"y":5}},{"entity_number":244,"name":"land-mine","position":{"x":-8.953125,"y":4.984375}},{"entity_number":245,"name":"stone-wall","position":{"x":-9,"y":4}},{"entity_number":246,"name":"land-mine","position":{"x":-7.7109375,"y":3.96484375}},{"entity_number":247,"name":"stone-wall","position":{"x":-8,"y":5}},{"entity_number":248,"name":"stone-wall","position":{"x":-7,"y":5}},{"entity_number":249,"name":"stone-wall","position":{"x":-7,"y":4}},{"entity_number":250,"name":"gun-turret","position":{"x":-5.5,"y":5.5}},{"entity_number":251,"name":"inserter","position":{"x":-5,"y":4}},{"entity_number":252,"name":"pipe","position":{"x":-4,"y":4}},{"entity_number":253,"name":"flamethrower-turret","position":{"x":-2.5,"y":5},"direction":4},{"entity_number":254,"name":"pipe","position":{"x":-1,"y":4}},{"entity_number":255,"name":"storage-tank","position":{"x":1,"y":5}},{"entity_number":256,"name":"gun-turret","position":{"x":4.5,"y":5.5}},{"entity_number":257,"name":"inserter","position":{"x":4,"y":4}},{"entity_number":258,"name":"stone-wall","position":{"x":6,"y":4}},{"entity_number":259,"name":"stone-wall","position":{"x":6,"y":5}},{"entity_number":260,"name":"land-mine","position":{"x":7.0703125,"y":5.2109375}},{"entity_number":261,"name":"stone-wall","position":{"x":7,"y":4}},{"entity_number":262,"name":"land-mine","position":{"x":8.109375,"y":5.69140625}},{"entity_number":263,"name":"stone-wall","position":{"x":8,"y":5}},{"entity_number":264,"name":"land-mine","position":{"x":9.24609375,"y":4.94921875}},{"entity_number":265,"name":"stone-wall","position":{"x":9,"y":4}},{"entity_number":266,"name":"stone-wall","position":{"x":10,"y":5}},{"entity_number":267,"name":"land-mine","position":{"x":11.16796875,"y":4.890625}},{"entity_number":268,"name":"stone-wall","position":{"x":11,"y":4}},{"entity_number":269,"name":"stone-wall","position":{"x":-9,"y":6}},{"entity_number":270,"name":"land-mine","position":{"x":-7.93359375,"y":5.921875}},{"entity_number":271,"name":"stone-wall","position":{"x":-8,"y":7}},{"entity_number":272,"name":"stone-wall","position":{"x":-7,"y":7}},{"entity_number":273,"name":"stone-wall","position":{"x":-7,"y":6}},{"entity_number":274,"name":"stone-wall","position":{"x":-6,"y":7}},{"entity_number":275,"name":"stone-wall","position":{"x":-5,"y":7}},{"entity_number":276,"name":"stone-wall","position":{"x":-4,"y":7}},{"entity_number":277,"name":"stone-wall","position":{"x":-3,"y":7}},{"entity_number":278,"name":"stone-wall","position":{"x":-2,"y":7}},{"entity_number":279,"name":"stone-wall","position":{"x":-1,"y":7}},{"entity_number":280,"name":"stone-wall","position":{"x":0,"y":7}},{"entity_number":281,"name":"stone-wall","position":{"x":1,"y":7}},{"entity_number":282,"name":"stone-wall","position":{"x":2,"y":7}},{"entity_number":283,"name":"stone-wall","position":{"x":3,"y":7}},{"entity_number":284,"name":"stone-wall","position":{"x":4,"y":7}},{"entity_number":285,"name":"stone-wall","position":{"x":5,"y":7}},{"entity_number":286,"name":"stone-wall","position":{"x":6,"y":6}},{"entity_number":287,"name":"stone-wall","position":{"x":6,"y":7}},{"entity_number":288,"name":"land-mine","position":{"x":7.0703125,"y":7.06640625}},{"entity_number":289,"name":"stone-wall","position":{"x":7,"y":6}},{"entity_number":290,"name":"stone-wall","position":{"x":8,"y":7}},{"entity_number":291,"name":"land-mine","position":{"x":9.24609375,"y":7.17578125}},{"entity_number":292,"name":"stone-wall","position":{"x":9,"y":6}},{"entity_number":293,"name":"land-mine","position":{"x":10.20703125,"y":7.828125}},{"entity_number":294,"name":"land-mine","position":{"x":10.20703125,"y":5.97265625}},{"entity_number":295,"name":"stone-wall","position":{"x":10,"y":7}},{"entity_number":296,"name":"stone-wall","position":{"x":11,"y":6}},{"entity_number":297,"name":"land-mine","position":{"x":-7.9296875,"y":8.00390625}},{"entity_number":298,"name":"land-mine","position":{"x":-7.19140625,"y":8.9375}},{"entity_number":299,"name":"stone-wall","position":{"x":-7,"y":8}},{"entity_number":300,"name":"land-mine","position":{"x":-6.07421875,"y":8.00390625}},{"entity_number":301,"name":"land-mine","position":{"x":-5.1484375,"y":9.03125}},{"entity_number":302,"name":"stone-wall","position":{"x":-6,"y":9}},{"entity_number":303,"name":"land-mine","position":{"x":-4.21875,"y":8.00390625}},{"entity_number":304,"name":"stone-wall","position":{"x":-5,"y":8}},{"entity_number":305,"name":"stone-wall","position":{"x":-4,"y":9}},{"entity_number":306,"name":"land-mine","position":{"x":-2.71484375,"y":8.99609375}},{"entity_number":307,"name":"stone-wall","position":{"x":-3,"y":8}},{"entity_number":308,"name":"land-mine","position":{"x":-1.9921875,"y":8.00390625}},{"entity_number":309,"name":"stone-wall","position":{"x":-2,"y":9}},{"entity_number":310,"name":"land-mine","position":{"x":-0.859375,"y":8.99609375}},{"entity_number":311,"name":"stone-wall","position":{"x":-1,"y":8}},{"entity_number":312,"name":"land-mine","position":{"x":-0.01953125,"y":7.98828125}},{"entity_number":313,"name":"stone-wall","position":{"x":0,"y":9}},{"entity_number":314,"name":"land-mine","position":{"x":1.109375,"y":9.0234375}},{"entity_number":315,"name":"land-mine","position":{"x":1.71875,"y":8.00390625}},{"entity_number":316,"name":"stone-wall","position":{"x":1,"y":8}},{"entity_number":317,"name":"stone-wall","position":{"x":2,"y":9}},{"entity_number":318,"name":"land-mine","position":{"x":3.1328125,"y":9.08203125}},{"entity_number":319,"name":"stone-wall","position":{"x":3,"y":8}},{"entity_number":320,"name":"land-mine","position":{"x":4.7265625,"y":9.08203125}},{"entity_number":321,"name":"land-mine","position":{"x":3.97265625,"y":8.01171875}},{"entity_number":322,"name":"stone-wall","position":{"x":4,"y":9}},{"entity_number":323,"name":"land-mine","position":{"x":5.87890625,"y":8.00390625}},{"entity_number":324,"name":"stone-wall","position":{"x":5,"y":8}},{"entity_number":325,"name":"land-mine","position":{"x":6.80078125,"y":8.8828125}},{"entity_number":326,"name":"stone-wall","position":{"x":6,"y":9}},{"entity_number":327,"name":"stone-wall","position":{"x":7,"y":8}},{"entity_number":328,"name":"land-mine","position":{"x":8.0390625,"y":8.1953125}},{"entity_number":329,"name":"stone-wall","position":{"x":9,"y":8}},{"entity_number":330,"name":"land-mine","position":{"x":-6.2109375,"y":10.0703125}},{"entity_number":331,"name":"stone-wall","position":{"x":-7,"y":10}},{"entity_number":332,"name":"land-mine","position":{"x":-4.69140625,"y":11.203125}},{"entity_number":333,"name":"stone-wall","position":{"x":-5,"y":10}},{"entity_number":334,"name":"land-mine","position":{"x":-3.953125,"y":10.0703125}},{"entity_number":335,"name":"stone-wall","position":{"x":-4,"y":11}},{"entity_number":336,"name":"land-mine","position":{"x":-2.96484375,"y":11.203125}},{"entity_number":337,"name":"land-mine","position":{"x":-2.16796875,"y":9.9375}},{"entity_number":338,"name":"stone-wall","position":{"x":-3,"y":10}},{"entity_number":339,"name":"stone-wall","position":{"x":-2,"y":11}},{"entity_number":340,"name":"land-mine","position":{"x":-1.09375,"y":11.17578125}},{"entity_number":341,"name":"land-mine","position":{"x":-0.2421875,"y":10.0703125}},{"entity_number":342,"name":"stone-wall","position":{"x":-1,"y":10}},{"entity_number":343,"name":"stone-wall","position":{"x":1,"y":10}},{"entity_number":344,"name":"land-mine","position":{"x":1.984375,"y":10.0703125}},{"entity_number":345,"name":"stone-wall","position":{"x":2,"y":11}},{"entity_number":346,"name":"land-mine","position":{"x":3.83984375,"y":10.0703125}},{"entity_number":347,"name":"land-mine","position":{"x":2.9296875,"y":11.12109375}},{"entity_number":348,"name":"stone-wall","position":{"x":3,"y":10}},{"entity_number":349,"name":"stone-wall","position":{"x":4,"y":11}},{"entity_number":350,"name":"land-mine","position":{"x":5.6953125,"y":10.0703125}},{"entity_number":351,"name":"stone-wall","position":{"x":5,"y":10}}],"tiles":[{"position":{"x":-12,"y":-3},"name":"refined-concrete"},{"position":{"x":-12,"y":1},"name":"refined-concrete"},{"position":{"x":-11,"y":-5},"name":"refined-concrete"},{"position":{"x":-11,"y":-4},"name":"refined-concrete"},{"position":{"x":-11,"y":-3},"name":"refined-concrete"},{"position":{"x":-11,"y":-2},"name":"refined-concrete"},{"position":{"x":-11,"y":-1},"name":"refined-concrete"},{"position":{"x":-11,"y":0},"name":"refined-concrete"},{"position":{"x":-11,"y":1},"name":"refined-concrete"},{"position":{"x":-11,"y":2},"name":"refined-concrete"},{"position":{"x":-11,"y":3},"name":"refined-concrete"},{"position":{"x":-10,"y":-7},"name":"refined-concrete"},{"position":{"x":-10,"y":-6},"name":"refined-concrete"},{"position":{"x":-10,"y":-5},"name":"refined-concrete"},{"position":{"x":-10,"y":-4},"name":"refined-concrete"},{"position":{"x":-10,"y":-3},"name":"refined-concrete"},{"position":{"x":-10,"y":-2},"name":"refined-concrete"},{"position":{"x":-10,"y":-1},"name":"refined-concrete"},{"position":{"x":-10,"y":0},"name":"refined-concrete"},{"position":{"x":-10,"y":1},"name":"refined-concrete"},{"position":{"x":-10,"y":2},"name":"refined-concrete"},{"position":{"x":-10,"y":3},"name":"refined-concrete"},{"position":{"x":-10,"y":4},"name":"refined-concrete"},{"position":{"x":-9,"y":-8},"name":"refined-concrete"},{"position":{"x":-9,"y":-7},"name":"refined-concrete"},{"position":{"x":-9,"y":-6},"name":"refined-concrete"},{"position":{"x":-9,"y":-5},"name":"refined-concrete"},{"position":{"x":-9,"y":-4},"name":"refined-concrete"},{"position":{"x":-9,"y":-3},"name":"refined-concrete"},{"position":{"x":-9,"y":-2},"name":"refined-concrete"},{"position":{"x":-9,"y":-1},"name":"refined-concrete"},{"position":{"x":-9,"y":0},"name":"refined-concrete"},{"position":{"x":-9,"y":1},"name":"refined-concrete"},{"position":{"x":-9,"y":2},"name":"refined-concrete"},{"position":{"x":-9,"y":3},"name":"refined-concrete"},{"position":{"x":-9,"y":4},"name":"refined-concrete"},{"position":{"x":-9,"y":5},"name":"refined-concrete"},{"position":{"x":-9,"y":6},"name":"refined-concrete"},{"position":{"x":-8,"y":-9},"name":"refined-concrete"},{"position":{"x":-8,"y":-8},"name":"refined-concrete"},{"position":{"x":-8,"y":-7},"name":"refined-concrete"},{"position":{"x":-8,"y":-6},"name":"refined-concrete"},{"position":{"x":-8,"y":-5},"name":"refined-concrete"},{"position":{"x":-8,"y":-4},"name":"refined-concrete"},{"position":{"x":-8,"y":-3},"name":"refined-concrete"},{"position":{"x":-8,"y":-2},"name":"refined-concrete"},{"position":{"x":-8,"y":-1},"name":"refined-concrete"},{"position":{"x":-8,"y":0},"name":"refined-concrete"},{"position":{"x":-8,"y":1},"name":"refined-concrete"},{"position":{"x":-8,"y":2},"name":"refined-concrete"},{"position":{"x":-8,"y":3},"name":"refined-concrete"},{"position":{"x":-8,"y":4},"name":"refined-concrete"},{"position":{"x":-8,"y":5},"name":"refined-concrete"},{"position":{"x":-8,"y":6},"name":"refined-concrete"},{"position":{"x":-8,"y":7},"name":"refined-concrete"},{"position":{"x":-7,"y":-9},"name":"refined-concrete"},{"position":{"x":-7,"y":-8},"name":"refined-concrete"},{"position":{"x":-7,"y":-7},"name":"refined-concrete"},{"position":{"x":-7,"y":-6},"name":"refined-concrete"},{"position":{"x":-7,"y":-5},"name":"refined-concrete"},{"position":{"x":-7,"y":-4},"name":"refined-concrete"},{"position":{"x":-7,"y":-3},"name":"refined-concrete"},{"position":{"x":-7,"y":-2},"name":"refined-concrete"},{"position":{"x":-7,"y":-1},"name":"refined-concrete"},{"position":{"x":-7,"y":0},"name":"refined-concrete"},{"position":{"x":-7,"y":1},"name":"refined-concrete"},{"position":{"x":-7,"y":2},"name":"refined-concrete"},{"position":{"x":-7,"y":3},"name":"refined-concrete"},{"position":{"x":-7,"y":4},"name":"refined-concrete"},{"position":{"x":-7,"y":5},"name":"refined-concrete"},{"position":{"x":-7,"y":6},"name":"refined-concrete"},{"position":{"x":-7,"y":7},"name":"refined-concrete"},{"position":{"x":-7,"y":8},"name":"refined-concrete"},{"position":{"x":-7,"y":9},"name":"refined-concrete"},{"position":{"x":-6,"y":-10},"name":"refined-concrete"},{"position":{"x":-6,"y":-9},"name":"refined-concrete"},{"position":{"x":-6,"y":-8},"name":"refined-concrete"},{"position":{"x":-6,"y":-7},"name":"refined-concrete"},{"position":{"x":-6,"y":-6},"name":"refined-concrete"},{"position":{"x":-6,"y":-5},"name":"refined-concrete"},{"position":{"x":-6,"y":-4},"name":"refined-concrete"},{"position":{"x":-6,"y":-3},"name":"refined-concrete"},{"position":{"x":-6,"y":-2},"name":"refined-concrete"},{"position":{"x":-6,"y":-1},"name":"refined-concrete"},{"position":{"x":-6,"y":0},"name":"refined-concrete"},{"position":{"x":-6,"y":1},"name":"refined-concrete"},{"position":{"x":-6,"y":2},"name":"refined-concrete"},{"position":{"x":-6,"y":3},"name":"refined-concrete"},{"position":{"x":-6,"y":4},"name":"refined-concrete"},{"position":{"x":-6,"y":5},"name":"refined-concrete"},{"position":{"x":-6,"y":6},"name":"refined-concrete"},{"position":{"x":-6,"y":7},"name":"refined-concrete"},{"position":{"x":-6,"y":8},"name":"refined-concrete"},{"position":{"x":-6,"y":9},"name":"refined-concrete"},{"position":{"x":-6,"y":10},"name":"refined-concrete"},{"position":{"x":-5,"y":-10},"name":"refined-concrete"},{"position":{"x":-5,"y":-9},"name":"refined-concrete"},{"position":{"x":-5,"y":-8},"name":"refined-concrete"},{"position":{"x":-5,"y":-7},"name":"refined-concrete"},{"position":{"x":-5,"y":-6},"name":"refined-concrete"},{"position":{"x":-5,"y":-5},"name":"refined-concrete"},{"position":{"x":-5,"y":-4},"name":"refined-concrete"},{"position":{"x":-5,"y":-3},"name":"refined-concrete"},{"position":{"x":-5,"y":-2},"name":"refined-concrete"},{"position":{"x":-5,"y":-1},"name":"refined-concrete"},{"position":{"x":-5,"y":0},"name":"refined-concrete"},{"position":{"x":-5,"y":1},"name":"refined-concrete"},{"position":{"x":-5,"y":2},"name":"refined-concrete"},{"position":{"x":-5,"y":3},"name":"refined-concrete"},{"position":{"x":-5,"y":4},"name":"refined-concrete"},{"position":{"x":-5,"y":5},"name":"refined-concrete"},{"position":{"x":-5,"y":6},"name":"refined-concrete"},{"position":{"x":-5,"y":7},"name":"refined-concrete"},{"position":{"x":-5,"y":8},"name":"refined-concrete"},{"position":{"x":-5,"y":9},"name":"refined-concrete"},{"position":{"x":-5,"y":10},"name":"refined-concrete"},{"position":{"x":-4,"y":-10},"name":"refined-concrete"},{"position":{"x":-4,"y":-9},"name":"refined-concrete"},{"position":{"x":-4,"y":-8},"name":"refined-concrete"},{"position":{"x":-4,"y":-7},"name":"refined-concrete"},{"position":{"x":-4,"y":-6},"name":"refined-concrete"},{"position":{"x":-4,"y":-5},"name":"refined-concrete"},{"position":{"x":-4,"y":-4},"name":"refined-concrete"},{"position":{"x":-4,"y":-3},"name":"refined-concrete"},{"position":{"x":-4,"y":-2},"name":"refined-concrete"},{"position":{"x":-4,"y":-1},"name":"refined-concrete"},{"position":{"x":-4,"y":0},"name":"refined-concrete"},{"position":{"x":-4,"y":1},"name":"refined-concrete"},{"position":{"x":-4,"y":2},"name":"refined-concrete"},{"position":{"x":-4,"y":3},"name":"refined-concrete"},{"position":{"x":-4,"y":4},"name":"refined-concrete"},{"position":{"x":-4,"y":5},"name":"refined-concrete"},{"position":{"x":-4,"y":6},"name":"refined-concrete"},{"position":{"x":-4,"y":7},"name":"refined-concrete"},{"position":{"x":-4,"y":8},"name":"refined-concrete"},{"position":{"x":-4,"y":9},"name":"refined-concrete"},{"position":{"x":-4,"y":10},"name":"refined-concrete"},{"position":{"x":-4,"y":11},"name":"refined-concrete"},{"position":{"x":-3,"y":-11},"name":"refined-concrete"},{"position":{"x":-3,"y":-10},"name":"refined-concrete"},{"position":{"x":-3,"y":-9},"name":"refined-concrete"},{"position":{"x":-3,"y":-8},"name":"refined-concrete"},{"position":{"x":-3,"y":-7},"name":"refined-concrete"},{"position":{"x":-3,"y":-6},"name":"refined-concrete"},{"position":{"x":-3,"y":-5},"name":"refined-concrete"},{"position":{"x":-3,"y":-4},"name":"refined-concrete"},{"position":{"x":-3,"y":-3},"name":"refined-concrete"},{"position":{"x":-3,"y":-2},"name":"refined-concrete"},{"position":{"x":-3,"y":-1},"name":"refined-concrete"},{"position":{"x":-3,"y":0},"name":"refined-concrete"},{"position":{"x":-3,"y":1},"name":"refined-concrete"},{"position":{"x":-3,"y":2},"name":"refined-concrete"},{"position":{"x":-3,"y":3},"name":"refined-concrete"},{"position":{"x":-3,"y":4},"name":"refined-concrete"},{"position":{"x":-3,"y":5},"name":"refined-concrete"},{"position":{"x":-3,"y":6},"name":"refined-concrete"},{"position":{"x":-3,"y":7},"name":"refined-concrete"},{"position":{"x":-3,"y":8},"name":"refined-concrete"},{"position":{"x":-3,"y":9},"name":"refined-concrete"},{"position":{"x":-3,"y":10},"name":"refined-concrete"},{"position":{"x":-3,"y":11},"name":"refined-concrete"},{"position":{"x":-2,"y":-10},"name":"refined-concrete"},{"position":{"x":-2,"y":-9},"name":"refined-concrete"},{"position":{"x":-2,"y":-8},"name":"refined-concrete"},{"position":{"x":-2,"y":-7},"name":"refined-concrete"},{"position":{"x":-2,"y":-6},"name":"refined-concrete"},{"position":{"x":-2,"y":-5},"name":"refined-concrete"},{"position":{"x":-2,"y":-4},"name":"refined-concrete"},{"position":{"x":-2,"y":-3},"name":"refined-concrete"},{"position":{"x":-2,"y":-2},"name":"refined-concrete"},{"position":{"x":-2,"y":-1},"name":"refined-concrete"},{"position":{"x":-2,"y":0},"name":"refined-concrete"},{"position":{"x":-2,"y":1},"name":"refined-concrete"},{"position":{"x":-2,"y":2},"name":"refined-concrete"},{"position":{"x":-2,"y":3},"name":"refined-concrete"},{"position":{"x":-2,"y":4},"name":"refined-concrete"},{"position":{"x":-2,"y":5},"name":"refined-concrete"},{"position":{"x":-2,"y":6},"name":"refined-concrete"},{"position":{"x":-2,"y":7},"name":"refined-concrete"},{"position":{"x":-2,"y":8},"name":"refined-concrete"},{"position":{"x":-2,"y":9},"name":"refined-concrete"},{"position":{"x":-2,"y":10},"name":"refined-concrete"},{"position":{"x":-2,"y":11},"name":"refined-concrete"},{"position":{"x":-1,"y":-11},"name":"refined-concrete"},{"position":{"x":-1,"y":-10},"name":"refined-concrete"},{"position":{"x":-1,"y":-9},"name":"refined-concrete"},{"position":{"x":-1,"y":-8},"name":"refined-concrete"},{"position":{"x":-1,"y":-7},"name":"refined-concrete"},{"position":{"x":-1,"y":-6},"name":"refined-concrete"},{"position":{"x":-1,"y":-5},"name":"refined-concrete"},{"position":{"x":-1,"y":-4},"name":"refined-concrete"},{"position":{"x":-1,"y":-3},"name":"refined-concrete"},{"position":{"x":-1,"y":-2},"name":"refined-concrete"},{"position":{"x":-1,"y":-1},"name":"refined-concrete"},{"position":{"x":-1,"y":0},"name":"refined-concrete"},{"position":{"x":-1,"y":1},"name":"refined-concrete"},{"position":{"x":-1,"y":2},"name":"refined-concrete"},{"position":{"x":-1,"y":3},"name":"refined-concrete"},{"position":{"x":-1,"y":4},"name":"refined-concrete"},{"position":{"x":-1,"y":5},"name":"refined-concrete"},{"position":{"x":-1,"y":6},"name":"refined-concrete"},{"position":{"x":-1,"y":7},"name":"refined-concrete"},{"position":{"x":-1,"y":8},"name":"refined-concrete"},{"position":{"x":-1,"y":9},"name":"refined-concrete"},{"position":{"x":-1,"y":10},"name":"refined-concrete"},{"position":{"x":0,"y":-10},"name":"refined-concrete"},{"position":{"x":0,"y":-9},"name":"refined-concrete"},{"position":{"x":0,"y":-8},"name":"refined-concrete"},{"position":{"x":0,"y":-7},"name":"refined-concrete"},{"position":{"x":0,"y":-6},"name":"refined-concrete"},{"position":{"x":0,"y":-5},"name":"refined-concrete"},{"position":{"x":0,"y":-4},"name":"refined-concrete"},{"position":{"x":0,"y":-3},"name":"refined-concrete"},{"position":{"x":0,"y":-2},"name":"refined-concrete"},{"position":{"x":0,"y":-1},"name":"refined-concrete"},{"position":{"x":0,"y":0},"name":"refined-concrete"},{"position":{"x":0,"y":1},"name":"refined-concrete"},{"position":{"x":0,"y":2},"name":"refined-concrete"},{"position":{"x":0,"y":3},"name":"refined-concrete"},{"position":{"x":0,"y":4},"name":"refined-concrete"},{"position":{"x":0,"y":5},"name":"refined-concrete"},{"position":{"x":0,"y":6},"name":"refined-concrete"},{"position":{"x":0,"y":7},"name":"refined-concrete"},{"position":{"x":0,"y":8},"name":"refined-concrete"},{"position":{"x":0,"y":9},"name":"refined-concrete"},{"position":{"x":0,"y":10},"name":"refined-concrete"},{"position":{"x":1,"y":-10},"name":"refined-concrete"},{"position":{"x":1,"y":-9},"name":"refined-concrete"},{"position":{"x":1,"y":-8},"name":"refined-concrete"},{"position":{"x":1,"y":-7},"name":"refined-concrete"},{"position":{"x":1,"y":-6},"name":"refined-concrete"},{"position":{"x":1,"y":-5},"name":"refined-concrete"},{"position":{"x":1,"y":-4},"name":"refined-concrete"},{"position":{"x":1,"y":-3},"name":"refined-concrete"},{"position":{"x":1,"y":-2},"name":"refined-concrete"},{"position":{"x":1,"y":-1},"name":"refined-concrete"},{"position":{"x":1,"y":0},"name":"refined-concrete"},{"position":{"x":1,"y":1},"name":"refined-concrete"},{"position":{"x":1,"y":2},"name":"refined-concrete"},{"position":{"x":1,"y":3},"name":"refined-concrete"},{"position":{"x":1,"y":4},"name":"refined-concrete"},{"position":{"x":1,"y":5},"name":"refined-concrete"},{"position":{"x":1,"y":6},"name":"refined-concrete"},{"position":{"x":1,"y":7},"name":"refined-concrete"},{"position":{"x":1,"y":8},"name":"refined-concrete"},{"position":{"x":1,"y":9},"name":"refined-concrete"},{"position":{"x":1,"y":10},"name":"refined-concrete"},{"position":{"x":2,"y":-10},"name":"refined-concrete"},{"position":{"x":2,"y":-9},"name":"refined-concrete"},{"position":{"x":2,"y":-8},"name":"refined-concrete"},{"position":{"x":2,"y":-7},"name":"refined-concrete"},{"position":{"x":2,"y":-6},"name":"refined-concrete"},{"position":{"x":2,"y":-5},"name":"refined-concrete"},{"position":{"x":2,"y":-4},"name":"refined-concrete"},{"position":{"x":2,"y":-3},"name":"refined-concrete"},{"position":{"x":2,"y":-2},"name":"refined-concrete"},{"position":{"x":2,"y":-1},"name":"refined-concrete"},{"position":{"x":2,"y":0},"name":"refined-concrete"},{"position":{"x":2,"y":1},"name":"refined-concrete"},{"position":{"x":2,"y":2},"name":"refined-concrete"},{"position":{"x":2,"y":3},"name":"refined-concrete"},{"position":{"x":2,"y":4},"name":"refined-concrete"},{"position":{"x":2,"y":5},"name":"refined-concrete"},{"position":{"x":2,"y":6},"name":"refined-concrete"},{"position":{"x":2,"y":7},"name":"refined-concrete"},{"position":{"x":2,"y":8},"name":"refined-concrete"},{"position":{"x":2,"y":9},"name":"refined-concrete"},{"position":{"x":2,"y":10},"name":"refined-concrete"},{"position":{"x":3,"y":-10},"name":"refined-concrete"},{"position":{"x":3,"y":-9},"name":"refined-concrete"},{"position":{"x":3,"y":-8},"name":"refined-concrete"},{"position":{"x":3,"y":-7},"name":"refined-concrete"},{"position":{"x":3,"y":-6},"name":"refined-concrete"},{"position":{"x":3,"y":-5},"name":"refined-concrete"},{"position":{"x":3,"y":-4},"name":"refined-concrete"},{"position":{"x":3,"y":-3},"name":"refined-concrete"},{"position":{"x":3,"y":-2},"name":"refined-concrete"},{"position":{"x":3,"y":-1},"name":"refined-concrete"},{"position":{"x":3,"y":0},"name":"refined-concrete"},{"position":{"x":3,"y":1},"name":"refined-concrete"},{"position":{"x":3,"y":2},"name":"refined-concrete"},{"position":{"x":3,"y":3},"name":"refined-concrete"},{"position":{"x":3,"y":4},"name":"refined-concrete"},{"position":{"x":3,"y":5},"name":"refined-concrete"},{"position":{"x":3,"y":6},"name":"refined-concrete"},{"position":{"x":3,"y":7},"name":"refined-concrete"},{"position":{"x":3,"y":8},"name":"refined-concrete"},{"position":{"x":3,"y":9},"name":"refined-concrete"},{"position":{"x":3,"y":10},"name":"refined-concrete"},{"position":{"x":3,"y":11},"name":"refined-concrete"},{"position":{"x":4,"y":-10},"name":"refined-concrete"},{"position":{"x":4,"y":-9},"name":"refined-concrete"},{"position":{"x":4,"y":-8},"name":"refined-concrete"},{"position":{"x":4,"y":-7},"name":"refined-concrete"},{"position":{"x":4,"y":-6},"name":"refined-concrete"},{"position":{"x":4,"y":-5},"name":"refined-concrete"},{"position":{"x":4,"y":-4},"name":"refined-concrete"},{"position":{"x":4,"y":-3},"name":"refined-concrete"},{"position":{"x":4,"y":-2},"name":"refined-concrete"},{"position":{"x":4,"y":-1},"name":"refined-concrete"},{"position":{"x":4,"y":0},"name":"refined-concrete"},{"position":{"x":4,"y":1},"name":"refined-concrete"},{"position":{"x":4,"y":2},"name":"refined-concrete"},{"position":{"x":4,"y":3},"name":"refined-concrete"},{"position":{"x":4,"y":4},"name":"refined-concrete"},{"position":{"x":4,"y":5},"name":"refined-concrete"},{"position":{"x":4,"y":6},"name":"refined-concrete"},{"position":{"x":4,"y":7},"name":"refined-concrete"},{"position":{"x":4,"y":8},"name":"refined-concrete"},{"position":{"x":4,"y":9},"name":"refined-concrete"},{"position":{"x":4,"y":10},"name":"refined-concrete"},{"position":{"x":5,"y":-11},"name":"refined-concrete"},{"position":{"x":5,"y":-10},"name":"refined-concrete"},{"position":{"x":5,"y":-9},"name":"refined-concrete"},{"position":{"x":5,"y":-8},"name":"refined-concrete"},{"position":{"x":5,"y":-7},"name":"refined-concrete"},{"position":{"x":5,"y":-6},"name":"refined-concrete"},{"position":{"x":5,"y":-5},"name":"refined-concrete"},{"position":{"x":5,"y":-4},"name":"refined-concrete"},{"position":{"x":5,"y":-3},"name":"refined-concrete"},{"position":{"x":5,"y":-2},"name":"refined-concrete"},{"position":{"x":5,"y":-1},"name":"refined-concrete"},{"position":{"x":5,"y":0},"name":"refined-concrete"},{"position":{"x":5,"y":1},"name":"refined-concrete"},{"position":{"x":5,"y":2},"name":"refined-concrete"},{"position":{"x":5,"y":3},"name":"refined-concrete"},{"position":{"x":5,"y":4},"name":"refined-concrete"},{"position":{"x":5,"y":5},"name":"refined-concrete"},{"position":{"x":5,"y":6},"name":"refined-concrete"},{"position":{"x":5,"y":7},"name":"refined-concrete"},{"position":{"x":5,"y":8},"name":"refined-concrete"},{"position":{"x":5,"y":9},"name":"refined-concrete"},{"position":{"x":5,"y":10},"name":"refined-concrete"},{"position":{"x":6,"y":-10},"name":"refined-concrete"},{"position":{"x":6,"y":-9},"name":"refined-concrete"},{"position":{"x":6,"y":-8},"name":"refined-concrete"},{"position":{"x":6,"y":-7},"name":"refined-concrete"},{"position":{"x":6,"y":-6},"name":"refined-concrete"},{"position":{"x":6,"y":-5},"name":"refined-concrete"},{"position":{"x":6,"y":-4},"name":"refined-concrete"},{"position":{"x":6,"y":-3},"name":"refined-concrete"},{"position":{"x":6,"y":-2},"name":"refined-concrete"},{"position":{"x":6,"y":-1},"name":"refined-concrete"},{"position":{"x":6,"y":0},"name":"refined-concrete"},{"position":{"x":6,"y":1},"name":"refined-concrete"},{"position":{"x":6,"y":2},"name":"refined-concrete"},{"position":{"x":6,"y":3},"name":"refined-concrete"},{"position":{"x":6,"y":4},"name":"refined-concrete"},{"position":{"x":6,"y":5},"name":"refined-concrete"},{"position":{"x":6,"y":6},"name":"refined-concrete"},{"position":{"x":6,"y":7},"name":"refined-concrete"},{"position":{"x":6,"y":8},"name":"refined-concrete"},{"position":{"x":6,"y":9},"name":"refined-concrete"},{"position":{"x":7,"y":-10},"name":"refined-concrete"},{"position":{"x":7,"y":-9},"name":"refined-concrete"},{"position":{"x":7,"y":-8},"name":"refined-concrete"},{"position":{"x":7,"y":-7},"name":"refined-concrete"},{"position":{"x":7,"y":-6},"name":"refined-concrete"},{"position":{"x":7,"y":-5},"name":"refined-concrete"},{"position":{"x":7,"y":-4},"name":"refined-concrete"},{"position":{"x":7,"y":-3},"name":"refined-concrete"},{"position":{"x":7,"y":-2},"name":"refined-concrete"},{"position":{"x":7,"y":-1},"name":"refined-concrete"},{"position":{"x":7,"y":0},"name":"refined-concrete"},{"position":{"x":7,"y":1},"name":"refined-concrete"},{"position":{"x":7,"y":2},"name":"refined-concrete"},{"position":{"x":7,"y":3},"name":"refined-concrete"},{"position":{"x":7,"y":4},"name":"refined-concrete"},{"position":{"x":7,"y":5},"name":"refined-concrete"},{"position":{"x":7,"y":6},"name":"refined-concrete"},{"position":{"x":7,"y":7},"name":"refined-concrete"},{"position":{"x":7,"y":8},"name":"refined-concrete"},{"position":{"x":7,"y":9},"name":"refined-concrete"},{"position":{"x":8,"y":-9},"name":"refined-concrete"},{"position":{"x":8,"y":-8},"name":"refined-concrete"},{"position":{"x":8,"y":-7},"name":"refined-concrete"},{"position":{"x":8,"y":-6},"name":"refined-concrete"},{"position":{"x":8,"y":-5},"name":"refined-concrete"},{"position":{"x":8,"y":-4},"name":"refined-concrete"},{"position":{"x":8,"y":-3},"name":"refined-concrete"},{"position":{"x":8,"y":-2},"name":"refined-concrete"},{"position":{"x":8,"y":-1},"name":"refined-concrete"},{"position":{"x":8,"y":0},"name":"refined-concrete"},{"position":{"x":8,"y":1},"name":"refined-concrete"},{"position":{"x":8,"y":2},"name":"refined-concrete"},{"position":{"x":8,"y":3},"name":"refined-concrete"},{"position":{"x":8,"y":4},"name":"refined-concrete"},{"position":{"x":8,"y":5},"name":"refined-concrete"},{"position":{"x":8,"y":6},"name":"refined-concrete"},{"position":{"x":8,"y":7},"name":"refined-concrete"},{"position":{"x":8,"y":8},"name":"refined-concrete"},{"position":{"x":9,"y":-9},"name":"refined-concrete"},{"position":{"x":9,"y":-8},"name":"refined-concrete"},{"position":{"x":9,"y":-7},"name":"refined-concrete"},{"position":{"x":9,"y":-6},"name":"refined-concrete"},{"position":{"x":9,"y":-5},"name":"refined-concrete"},{"position":{"x":9,"y":-4},"name":"refined-concrete"},{"position":{"x":9,"y":-3},"name":"refined-concrete"},{"position":{"x":9,"y":-2},"name":"refined-concrete"},{"position":{"x":9,"y":-1},"name":"refined-concrete"},{"position":{"x":9,"y":0},"name":"refined-concrete"},{"position":{"x":9,"y":1},"name":"refined-concrete"},{"position":{"x":9,"y":2},"name":"refined-concrete"},{"position":{"x":9,"y":3},"name":"refined-concrete"},{"position":{"x":9,"y":4},"name":"refined-concrete"},{"position":{"x":9,"y":5},"name":"refined-concrete"},{"position":{"x":9,"y":6},"name":"refined-concrete"},{"position":{"x":9,"y":7},"name":"refined-concrete"},{"position":{"x":9,"y":8},"name":"refined-concrete"},{"position":{"x":10,"y":-8},"name":"refined-concrete"},{"position":{"x":10,"y":-7},"name":"refined-concrete"},{"position":{"x":10,"y":-6},"name":"refined-concrete"},{"position":{"x":10,"y":-5},"name":"refined-concrete"},{"position":{"x":10,"y":-4},"name":"refined-concrete"},{"position":{"x":10,"y":-3},"name":"refined-concrete"},{"position":{"x":10,"y":-2},"name":"refined-concrete"},{"position":{"x":10,"y":-1},"name":"refined-concrete"},{"position":{"x":10,"y":0},"name":"refined-concrete"},{"position":{"x":10,"y":3},"name":"refined-concrete"},{"position":{"x":10,"y":4},"name":"refined-concrete"},{"position":{"x":10,"y":5},"name":"refined-concrete"},{"position":{"x":10,"y":6},"name":"refined-concrete"},{"position":{"x":10,"y":7},"name":"refined-concrete"},{"position":{"x":11,"y":-6},"name":"refined-concrete"},{"position":{"x":11,"y":-2},"name":"refined-concrete"},{"position":{"x":11,"y":5},"name":"refined-concrete"}],"item":"blueprint","version":73018507264}}' diff --git a/maps/tank_conquest/blueprint_poi_laser_json.lua b/maps/tank_conquest/blueprint_poi_laser_json.lua deleted file mode 100644 index 7d4eb47c6..000000000 --- a/maps/tank_conquest/blueprint_poi_laser_json.lua +++ /dev/null @@ -1 +0,0 @@ -return '{"blueprint":{"icons":[{"signal":{"type":"item","name":"land-mine"},"index":1},{"signal":{"type":"item","name":"stone-wall"},"index":2}],"entities":[{"entity_number":1,"name":"land-mine","position":{"x":-9.796875,"y":-12.77734375}},{"entity_number":2,"name":"land-mine","position":{"x":-8.296875,"y":-12.77734375}},{"entity_number":3,"name":"stone-wall","position":{"x":-9,"y":-13}},{"entity_number":4,"name":"land-mine","position":{"x":-6.296875,"y":-12.77734375}},{"entity_number":5,"name":"stone-wall","position":{"x":-7,"y":-13}},{"entity_number":6,"name":"stone-wall","position":{"x":-5,"y":-13}},{"entity_number":7,"name":"land-mine","position":{"x":-3.796875,"y":-12.77734375}},{"entity_number":8,"name":"stone-wall","position":{"x":-3,"y":-13}},{"entity_number":9,"name":"land-mine","position":{"x":-1.796875,"y":-12.77734375}},{"entity_number":10,"name":"land-mine","position":{"x":-0.296875,"y":-12.77734375}},{"entity_number":11,"name":"stone-wall","position":{"x":-1,"y":-13}},{"entity_number":12,"name":"land-mine","position":{"x":-1.01953125,"y":-13.93359375}},{"entity_number":13,"name":"land-mine","position":{"x":0.71484375,"y":-14.03515625}},{"entity_number":14,"name":"stone-wall","position":{"x":0,"y":-14}},{"entity_number":15,"name":"land-mine","position":{"x":1.703125,"y":-12.77734375}},{"entity_number":16,"name":"stone-wall","position":{"x":1,"y":-13}},{"entity_number":17,"name":"land-mine","position":{"x":2.71484375,"y":-14.03515625}},{"entity_number":18,"name":"stone-wall","position":{"x":2,"y":-14}},{"entity_number":19,"name":"land-mine","position":{"x":3.703125,"y":-12.77734375}},{"entity_number":20,"name":"stone-wall","position":{"x":3,"y":-13}},{"entity_number":21,"name":"land-mine","position":{"x":4.71484375,"y":-14.03515625}},{"entity_number":22,"name":"stone-wall","position":{"x":4,"y":-14}},{"entity_number":23,"name":"stone-wall","position":{"x":5,"y":-13}},{"entity_number":24,"name":"land-mine","position":{"x":6.203125,"y":-12.77734375}},{"entity_number":25,"name":"stone-wall","position":{"x":6,"y":-14}},{"entity_number":26,"name":"land-mine","position":{"x":8.203125,"y":-12.77734375}},{"entity_number":27,"name":"land-mine","position":{"x":9.703125,"y":-12.77734375}},{"entity_number":28,"name":"land-mine","position":{"x":11.703125,"y":-12.77734375}},{"entity_number":29,"name":"land-mine","position":{"x":-13.71484375,"y":-10.96484375}},{"entity_number":30,"name":"stone-wall","position":{"x":-13,"y":-11}},{"entity_number":31,"name":"land-mine","position":{"x":-12.16796875,"y":-10.93359375}},{"entity_number":32,"name":"stone-wall","position":{"x":-12,"y":-12}},{"entity_number":33,"name":"land-mine","position":{"x":-10.16796875,"y":-10.93359375}},{"entity_number":34,"name":"stone-wall","position":{"x":-11,"y":-11}},{"entity_number":35,"name":"land-mine","position":{"x":-11.015625,"y":-11.9140625}},{"entity_number":36,"name":"land-mine","position":{"x":-9.1953125,"y":-11.95703125}},{"entity_number":37,"name":"stone-wall","position":{"x":-10,"y":-12}},{"entity_number":38,"name":"land-mine","position":{"x":-8.16796875,"y":-10.93359375}},{"entity_number":39,"name":"stone-wall","position":{"x":-9,"y":-11}},{"entity_number":40,"name":"land-mine","position":{"x":-7.1953125,"y":-11.984375}},{"entity_number":41,"name":"stone-wall","position":{"x":-8,"y":-12}},{"entity_number":42,"name":"land-mine","position":{"x":-6.16796875,"y":-10.93359375}},{"entity_number":43,"name":"stone-wall","position":{"x":-7,"y":-11}},{"entity_number":44,"name":"land-mine","position":{"x":-5.16796875,"y":-12.02734375}},{"entity_number":45,"name":"stone-wall","position":{"x":-6,"y":-12}},{"entity_number":46,"name":"stone-wall","position":{"x":-5,"y":-11}},{"entity_number":47,"name":"land-mine","position":{"x":-4.16796875,"y":-10.93359375}},{"entity_number":48,"name":"stone-wall","position":{"x":-4,"y":-12}},{"entity_number":49,"name":"land-mine","position":{"x":-2.16796875,"y":-10.93359375}},{"entity_number":50,"name":"stone-wall","position":{"x":-3,"y":-11}},{"entity_number":51,"name":"land-mine","position":{"x":-3.015625,"y":-11.9140625}},{"entity_number":52,"name":"land-mine","position":{"x":-1.1953125,"y":-11.95703125}},{"entity_number":53,"name":"stone-wall","position":{"x":-2,"y":-12}},{"entity_number":54,"name":"land-mine","position":{"x":-0.16796875,"y":-10.93359375}},{"entity_number":55,"name":"stone-wall","position":{"x":-1,"y":-11}},{"entity_number":56,"name":"land-mine","position":{"x":0.8046875,"y":-11.984375}},{"entity_number":57,"name":"stone-wall","position":{"x":0,"y":-12}},{"entity_number":58,"name":"land-mine","position":{"x":1.83203125,"y":-10.93359375}},{"entity_number":59,"name":"stone-wall","position":{"x":1,"y":-11}},{"entity_number":60,"name":"land-mine","position":{"x":2.83203125,"y":-12.02734375}},{"entity_number":61,"name":"stone-wall","position":{"x":2,"y":-12}},{"entity_number":62,"name":"land-mine","position":{"x":3.83203125,"y":-10.93359375}},{"entity_number":63,"name":"stone-wall","position":{"x":3,"y":-11}},{"entity_number":64,"name":"land-mine","position":{"x":4.8046875,"y":-11.984375}},{"entity_number":65,"name":"stone-wall","position":{"x":4,"y":-12}},{"entity_number":66,"name":"stone-wall","position":{"x":5,"y":-11}},{"entity_number":67,"name":"land-mine","position":{"x":5.83203125,"y":-10.93359375}},{"entity_number":68,"name":"stone-wall","position":{"x":6,"y":-12}},{"entity_number":69,"name":"land-mine","position":{"x":7.83203125,"y":-10.93359375}},{"entity_number":70,"name":"stone-wall","position":{"x":7,"y":-11}},{"entity_number":71,"name":"land-mine","position":{"x":6.984375,"y":-11.9140625}},{"entity_number":72,"name":"land-mine","position":{"x":8.8046875,"y":-11.95703125}},{"entity_number":73,"name":"stone-wall","position":{"x":8,"y":-12}},{"entity_number":74,"name":"land-mine","position":{"x":9.83203125,"y":-10.93359375}},{"entity_number":75,"name":"stone-wall","position":{"x":9,"y":-11}},{"entity_number":76,"name":"land-mine","position":{"x":10.8046875,"y":-11.984375}},{"entity_number":77,"name":"stone-wall","position":{"x":10,"y":-12}},{"entity_number":78,"name":"land-mine","position":{"x":11.83203125,"y":-10.93359375}},{"entity_number":79,"name":"stone-wall","position":{"x":11,"y":-11}},{"entity_number":80,"name":"stone-wall","position":{"x":12,"y":-12}},{"entity_number":81,"name":"land-mine","position":{"x":12.96484375,"y":-11.71484375}},{"entity_number":82,"name":"stone-wall","position":{"x":13,"y":-11}},{"entity_number":83,"name":"land-mine","position":{"x":-15.77734375,"y":-8.703125}},{"entity_number":84,"name":"land-mine","position":{"x":-15.02734375,"y":-9.83203125}},{"entity_number":85,"name":"stone-wall","position":{"x":-15,"y":-9}},{"entity_number":86,"name":"land-mine","position":{"x":-13.93359375,"y":-8.83203125}},{"entity_number":87,"name":"stone-wall","position":{"x":-14,"y":-10}},{"entity_number":88,"name":"stone-wall","position":{"x":-13,"y":-9}},{"entity_number":89,"name":"stone-wall","position":{"x":-13,"y":-10}},{"entity_number":90,"name":"stone-wall","position":{"x":-12,"y":-10}},{"entity_number":91,"name":"stone-wall","position":{"x":-11,"y":-10}},{"entity_number":92,"name":"stone-wall","position":{"x":-10,"y":-10}},{"entity_number":93,"name":"stone-wall","position":{"x":-9,"y":-10}},{"entity_number":94,"name":"laser-turret","position":{"x":-9.5,"y":-8.5}},{"entity_number":95,"name":"stone-wall","position":{"x":-8,"y":-10}},{"entity_number":96,"name":"stone-wall","position":{"x":-7,"y":-10}},{"entity_number":97,"name":"stone-wall","position":{"x":-6,"y":-10}},{"entity_number":98,"name":"stone-wall","position":{"x":-5,"y":-10}},{"entity_number":99,"name":"laser-turret","position":{"x":-3.5,"y":-8.5}},{"entity_number":100,"name":"stone-wall","position":{"x":-4,"y":-10}},{"entity_number":101,"name":"stone-wall","position":{"x":-3,"y":-10}},{"entity_number":102,"name":"stone-wall","position":{"x":-2,"y":-10}},{"entity_number":103,"name":"stone-wall","position":{"x":-1,"y":-10}},{"entity_number":104,"name":"stone-wall","position":{"x":0,"y":-10}},{"entity_number":105,"name":"stone-wall","position":{"x":1,"y":-10}},{"entity_number":106,"name":"laser-turret","position":{"x":2.5,"y":-8.5}},{"entity_number":107,"name":"stone-wall","position":{"x":2,"y":-10}},{"entity_number":108,"name":"stone-wall","position":{"x":3,"y":-10}},{"entity_number":109,"name":"stone-wall","position":{"x":4,"y":-10}},{"entity_number":110,"name":"stone-wall","position":{"x":5,"y":-10}},{"entity_number":111,"name":"stone-wall","position":{"x":6,"y":-10}},{"entity_number":112,"name":"stone-wall","position":{"x":7,"y":-10}},{"entity_number":113,"name":"stone-wall","position":{"x":8,"y":-10}},{"entity_number":114,"name":"stone-wall","position":{"x":9,"y":-10}},{"entity_number":115,"name":"laser-turret","position":{"x":8.5,"y":-8.5}},{"entity_number":116,"name":"stone-wall","position":{"x":10,"y":-10}},{"entity_number":117,"name":"stone-wall","position":{"x":11,"y":-10}},{"entity_number":118,"name":"land-mine","position":{"x":12.96484375,"y":-9.71484375}},{"entity_number":119,"name":"stone-wall","position":{"x":13,"y":-9}},{"entity_number":120,"name":"stone-wall","position":{"x":12,"y":-10}},{"entity_number":121,"name":"stone-wall","position":{"x":12,"y":-9}},{"entity_number":122,"name":"land-mine","position":{"x":14.22265625,"y":-8.703125}},{"entity_number":123,"name":"stone-wall","position":{"x":14,"y":-10}},{"entity_number":124,"name":"land-mine","position":{"x":-15.77734375,"y":-6.703125}},{"entity_number":125,"name":"land-mine","position":{"x":-14.984375,"y":-7.8046875}},{"entity_number":126,"name":"stone-wall","position":{"x":-15,"y":-7}},{"entity_number":127,"name":"stone-wall","position":{"x":-16,"y":-8}},{"entity_number":128,"name":"land-mine","position":{"x":-13.93359375,"y":-6.83203125}},{"entity_number":129,"name":"stone-wall","position":{"x":-14,"y":-8}},{"entity_number":130,"name":"stone-wall","position":{"x":-13,"y":-8}},{"entity_number":131,"name":"stone-wall","position":{"x":-13,"y":-7}},{"entity_number":132,"name":"laser-turret","position":{"x":-11.5,"y":-6.5}},{"entity_number":133,"name":"laser-turret","position":{"x":10.5,"y":-6.5}},{"entity_number":134,"name":"land-mine","position":{"x":12.96484375,"y":-7.71484375}},{"entity_number":135,"name":"stone-wall","position":{"x":13,"y":-7}},{"entity_number":136,"name":"stone-wall","position":{"x":12,"y":-8}},{"entity_number":137,"name":"stone-wall","position":{"x":12,"y":-7}},{"entity_number":138,"name":"land-mine","position":{"x":15.015625,"y":-7.8046875}},{"entity_number":139,"name":"stone-wall","position":{"x":14,"y":-8}},{"entity_number":140,"name":"land-mine","position":{"x":14.22265625,"y":-6.703125}},{"entity_number":141,"name":"stone-wall","position":{"x":15,"y":-7}},{"entity_number":142,"name":"stone-wall","position":{"x":-17,"y":-5}},{"entity_number":143,"name":"land-mine","position":{"x":-15.77734375,"y":-5.203125}},{"entity_number":144,"name":"land-mine","position":{"x":-14.95703125,"y":-5.8046875}},{"entity_number":145,"name":"stone-wall","position":{"x":-15,"y":-5}},{"entity_number":146,"name":"stone-wall","position":{"x":-16,"y":-6}},{"entity_number":147,"name":"land-mine","position":{"x":-13.93359375,"y":-4.83203125}},{"entity_number":148,"name":"stone-wall","position":{"x":-14,"y":-6}},{"entity_number":149,"name":"stone-wall","position":{"x":-13,"y":-6}},{"entity_number":150,"name":"stone-wall","position":{"x":-13,"y":-5}},{"entity_number":151,"name":"medium-electric-pole","position":{"x":-8,"y":-5}},{"entity_number":152,"name":"medium-electric-pole","position":{"x":7,"y":-5}},{"entity_number":153,"name":"land-mine","position":{"x":12.96484375,"y":-5.71484375}},{"entity_number":154,"name":"stone-wall","position":{"x":13,"y":-5}},{"entity_number":155,"name":"stone-wall","position":{"x":12,"y":-6}},{"entity_number":156,"name":"stone-wall","position":{"x":12,"y":-5}},{"entity_number":157,"name":"land-mine","position":{"x":14.22265625,"y":-4.703125}},{"entity_number":158,"name":"land-mine","position":{"x":15.015625,"y":-5.8046875}},{"entity_number":159,"name":"stone-wall","position":{"x":15,"y":-5}},{"entity_number":160,"name":"stone-wall","position":{"x":14,"y":-6}},{"entity_number":161,"name":"land-mine","position":{"x":-17.03515625,"y":-3.71484375}},{"entity_number":162,"name":"stone-wall","position":{"x":-17,"y":-3}},{"entity_number":163,"name":"land-mine","position":{"x":-15.77734375,"y":-3.203125}},{"entity_number":164,"name":"stone-wall","position":{"x":-15,"y":-3}},{"entity_number":165,"name":"land-mine","position":{"x":-14.9140625,"y":-3.984375}},{"entity_number":166,"name":"stone-wall","position":{"x":-16,"y":-4}},{"entity_number":167,"name":"land-mine","position":{"x":-13.93359375,"y":-2.83203125}},{"entity_number":168,"name":"stone-wall","position":{"x":-14,"y":-4}},{"entity_number":169,"name":"stone-wall","position":{"x":-13,"y":-4}},{"entity_number":170,"name":"stone-wall","position":{"x":-13,"y":-3}},{"entity_number":171,"name":"laser-turret","position":{"x":-11.5,"y":-2.5}},{"entity_number":172,"name":"solar-panel","position":{"x":-6,"y":-3}},{"entity_number":173,"name":"solar-panel","position":{"x":-3,"y":-3}},{"entity_number":174,"name":"solar-panel","position":{"x":2,"y":-3}},{"entity_number":175,"name":"solar-panel","position":{"x":5,"y":-3}},{"entity_number":176,"name":"laser-turret","position":{"x":10.5,"y":-2.5}},{"entity_number":177,"name":"land-mine","position":{"x":12.96484375,"y":-3.71484375}},{"entity_number":178,"name":"stone-wall","position":{"x":13,"y":-3}},{"entity_number":179,"name":"stone-wall","position":{"x":12,"y":-4}},{"entity_number":180,"name":"stone-wall","position":{"x":12,"y":-3}},{"entity_number":181,"name":"land-mine","position":{"x":14.22265625,"y":-2.703125}},{"entity_number":182,"name":"land-mine","position":{"x":14.97265625,"y":-3.83203125}},{"entity_number":183,"name":"stone-wall","position":{"x":15,"y":-3}},{"entity_number":184,"name":"stone-wall","position":{"x":14,"y":-4}},{"entity_number":185,"name":"land-mine","position":{"x":-17.03515625,"y":-1.71484375}},{"entity_number":186,"name":"stone-wall","position":{"x":-17,"y":-1}},{"entity_number":187,"name":"land-mine","position":{"x":-15.77734375,"y":-0.703125}},{"entity_number":188,"name":"land-mine","position":{"x":-15.02734375,"y":-1.83203125}},{"entity_number":189,"name":"stone-wall","position":{"x":-15,"y":-1}},{"entity_number":190,"name":"stone-wall","position":{"x":-16,"y":-2}},{"entity_number":191,"name":"land-mine","position":{"x":-13.93359375,"y":-0.83203125}},{"entity_number":192,"name":"stone-wall","position":{"x":-14,"y":-2}},{"entity_number":193,"name":"stone-wall","position":{"x":-13,"y":-2}},{"entity_number":194,"name":"stone-wall","position":{"x":-13,"y":-1}},{"entity_number":195,"name":"accumulator","position":{"x":-6.5,"y":-0.5}},{"entity_number":196,"name":"accumulator","position":{"x":-4.5,"y":-0.5}},{"entity_number":197,"name":"electric-energy-interface","position":{"x":-2.5,"y":-0.5},"buffer_size":10000000000},{"entity_number":198,"name":"substation","position":{"x":-0.5,"y":-0.5}},{"entity_number":199,"name":"accumulator","position":{"x":1.5,"y":-0.5}},{"entity_number":200,"name":"accumulator","position":{"x":3.5,"y":-0.5}},{"entity_number":201,"name":"accumulator","position":{"x":5.5,"y":-0.5}},{"entity_number":202,"name":"land-mine","position":{"x":12.96484375,"y":-1.71484375}},{"entity_number":203,"name":"stone-wall","position":{"x":13,"y":-1}},{"entity_number":204,"name":"stone-wall","position":{"x":12,"y":-2}},{"entity_number":205,"name":"stone-wall","position":{"x":12,"y":-1}},{"entity_number":206,"name":"land-mine","position":{"x":14.22265625,"y":-0.703125}},{"entity_number":207,"name":"land-mine","position":{"x":15.015625,"y":-1.8046875}},{"entity_number":208,"name":"stone-wall","position":{"x":15,"y":-1}},{"entity_number":209,"name":"stone-wall","position":{"x":14,"y":-2}},{"entity_number":210,"name":"land-mine","position":{"x":16.06640625,"y":-0.83203125}},{"entity_number":211,"name":"stone-wall","position":{"x":16,"y":-2}},{"entity_number":212,"name":"land-mine","position":{"x":-17.03515625,"y":0.28515625}},{"entity_number":213,"name":"stone-wall","position":{"x":-17,"y":1}},{"entity_number":214,"name":"land-mine","position":{"x":-15.77734375,"y":1.296875}},{"entity_number":215,"name":"land-mine","position":{"x":-14.984375,"y":0.1953125}},{"entity_number":216,"name":"stone-wall","position":{"x":-15,"y":1}},{"entity_number":217,"name":"stone-wall","position":{"x":-16,"y":0}},{"entity_number":218,"name":"land-mine","position":{"x":-13.93359375,"y":1.16796875}},{"entity_number":219,"name":"stone-wall","position":{"x":-14,"y":0}},{"entity_number":220,"name":"stone-wall","position":{"x":-13,"y":0}},{"entity_number":221,"name":"stone-wall","position":{"x":-13,"y":1}},{"entity_number":222,"name":"laser-turret","position":{"x":-11.5,"y":1.5}},{"entity_number":223,"name":"solar-panel","position":{"x":-6,"y":2}},{"entity_number":224,"name":"solar-panel","position":{"x":-3,"y":2}},{"entity_number":225,"name":"infinity-chest","position":{"x":-1,"y":1},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"explosive-cannon-shell","count":1,"mode":"at-least","index":1}]}},{"entity_number":226,"name":"infinity-chest","position":{"x":0,"y":1},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"cluster-grenade","count":1,"mode":"at-least","index":1}]}},{"entity_number":227,"name":"solar-panel","position":{"x":2,"y":2}},{"entity_number":228,"name":"solar-panel","position":{"x":5,"y":2}},{"entity_number":229,"name":"laser-turret","position":{"x":10.5,"y":1.5}},{"entity_number":230,"name":"stone-wall","position":{"x":13,"y":1}},{"entity_number":231,"name":"land-mine","position":{"x":13.06640625,"y":0.01953125}},{"entity_number":232,"name":"stone-wall","position":{"x":12,"y":0}},{"entity_number":233,"name":"stone-wall","position":{"x":12,"y":1}},{"entity_number":234,"name":"land-mine","position":{"x":14.22265625,"y":0.796875}},{"entity_number":235,"name":"land-mine","position":{"x":15.04296875,"y":0.1953125}},{"entity_number":236,"name":"stone-wall","position":{"x":15,"y":1}},{"entity_number":237,"name":"stone-wall","position":{"x":14,"y":0}},{"entity_number":238,"name":"land-mine","position":{"x":16.06640625,"y":1.16796875}},{"entity_number":239,"name":"stone-wall","position":{"x":16,"y":0}},{"entity_number":240,"name":"stone-wall","position":{"x":-17,"y":3}},{"entity_number":241,"name":"land-mine","position":{"x":-16.93359375,"y":2.01953125}},{"entity_number":242,"name":"land-mine","position":{"x":-15.77734375,"y":2.796875}},{"entity_number":243,"name":"land-mine","position":{"x":-14.95703125,"y":2.1953125}},{"entity_number":244,"name":"stone-wall","position":{"x":-15,"y":3}},{"entity_number":245,"name":"stone-wall","position":{"x":-16,"y":2}},{"entity_number":246,"name":"land-mine","position":{"x":-13.93359375,"y":3.16796875}},{"entity_number":247,"name":"stone-wall","position":{"x":-14,"y":2}},{"entity_number":248,"name":"stone-wall","position":{"x":-13,"y":2}},{"entity_number":249,"name":"stone-wall","position":{"x":-13,"y":3}},{"entity_number":250,"name":"inserter","position":{"x":-1,"y":2}},{"entity_number":251,"name":"wooden-chest","position":{"x":-1,"y":3},"bar":1},{"entity_number":252,"name":"inserter","position":{"x":0,"y":2}},{"entity_number":253,"name":"wooden-chest","position":{"x":0,"y":3},"bar":1},{"entity_number":254,"name":"land-mine","position":{"x":12.96484375,"y":2.28515625}},{"entity_number":255,"name":"stone-wall","position":{"x":13,"y":3}},{"entity_number":256,"name":"stone-wall","position":{"x":12,"y":2}},{"entity_number":257,"name":"stone-wall","position":{"x":12,"y":3}},{"entity_number":258,"name":"land-mine","position":{"x":15.0859375,"y":2.015625}},{"entity_number":259,"name":"stone-wall","position":{"x":14,"y":2}},{"entity_number":260,"name":"land-mine","position":{"x":14.22265625,"y":3.296875}},{"entity_number":261,"name":"stone-wall","position":{"x":15,"y":3}},{"entity_number":262,"name":"stone-wall","position":{"x":16,"y":2}},{"entity_number":263,"name":"land-mine","position":{"x":16.06640625,"y":3.16796875}},{"entity_number":264,"name":"land-mine","position":{"x":-15.77734375,"y":4.796875}},{"entity_number":265,"name":"stone-wall","position":{"x":-15,"y":5}},{"entity_number":266,"name":"land-mine","position":{"x":-14.9140625,"y":4.015625}},{"entity_number":267,"name":"stone-wall","position":{"x":-16,"y":4}},{"entity_number":268,"name":"land-mine","position":{"x":-13.93359375,"y":5.16796875}},{"entity_number":269,"name":"stone-wall","position":{"x":-14,"y":4}},{"entity_number":270,"name":"stone-wall","position":{"x":-13,"y":4}},{"entity_number":271,"name":"stone-wall","position":{"x":-13,"y":5}},{"entity_number":272,"name":"laser-turret","position":{"x":-11.5,"y":5.5}},{"entity_number":273,"name":"medium-electric-pole","position":{"x":-8,"y":4}},{"entity_number":274,"name":"medium-electric-pole","position":{"x":7,"y":4}},{"entity_number":275,"name":"laser-turret","position":{"x":10.5,"y":5.5}},{"entity_number":276,"name":"land-mine","position":{"x":12.96484375,"y":4.28515625}},{"entity_number":277,"name":"stone-wall","position":{"x":13,"y":5}},{"entity_number":278,"name":"stone-wall","position":{"x":12,"y":4}},{"entity_number":279,"name":"stone-wall","position":{"x":12,"y":5}},{"entity_number":280,"name":"land-mine","position":{"x":14.22265625,"y":5.296875}},{"entity_number":281,"name":"land-mine","position":{"x":15.015625,"y":4.1953125}},{"entity_number":282,"name":"stone-wall","position":{"x":15,"y":5}},{"entity_number":283,"name":"stone-wall","position":{"x":14,"y":4}},{"entity_number":284,"name":"land-mine","position":{"x":16.06640625,"y":5.16796875}},{"entity_number":285,"name":"stone-wall","position":{"x":16,"y":4}},{"entity_number":286,"name":"land-mine","position":{"x":-15.77734375,"y":7.296875}},{"entity_number":287,"name":"land-mine","position":{"x":-15.02734375,"y":6.16796875}},{"entity_number":288,"name":"stone-wall","position":{"x":-15,"y":7}},{"entity_number":289,"name":"stone-wall","position":{"x":-16,"y":6}},{"entity_number":290,"name":"land-mine","position":{"x":-13.93359375,"y":7.16796875}},{"entity_number":291,"name":"stone-wall","position":{"x":-14,"y":6}},{"entity_number":292,"name":"stone-wall","position":{"x":-13,"y":6}},{"entity_number":293,"name":"stone-wall","position":{"x":-13,"y":7}},{"entity_number":294,"name":"laser-turret","position":{"x":-9.5,"y":7.5}},{"entity_number":295,"name":"laser-turret","position":{"x":-3.5,"y":7.5}},{"entity_number":296,"name":"laser-turret","position":{"x":2.5,"y":7.5}},{"entity_number":297,"name":"laser-turret","position":{"x":8.5,"y":7.5}},{"entity_number":298,"name":"land-mine","position":{"x":12.96484375,"y":6.28515625}},{"entity_number":299,"name":"stone-wall","position":{"x":13,"y":7}},{"entity_number":300,"name":"stone-wall","position":{"x":12,"y":6}},{"entity_number":301,"name":"stone-wall","position":{"x":12,"y":7}},{"entity_number":302,"name":"land-mine","position":{"x":14.22265625,"y":7.296875}},{"entity_number":303,"name":"land-mine","position":{"x":14.97265625,"y":6.16796875}},{"entity_number":304,"name":"stone-wall","position":{"x":15,"y":7}},{"entity_number":305,"name":"stone-wall","position":{"x":14,"y":6}},{"entity_number":306,"name":"land-mine","position":{"x":16.06640625,"y":7.16796875}},{"entity_number":307,"name":"stone-wall","position":{"x":16,"y":6}},{"entity_number":308,"name":"land-mine","position":{"x":-15.77734375,"y":9.296875}},{"entity_number":309,"name":"land-mine","position":{"x":-14.984375,"y":8.1953125}},{"entity_number":310,"name":"stone-wall","position":{"x":-15,"y":9}},{"entity_number":311,"name":"stone-wall","position":{"x":-16,"y":8}},{"entity_number":312,"name":"land-mine","position":{"x":-13.93359375,"y":9.16796875}},{"entity_number":313,"name":"stone-wall","position":{"x":-14,"y":8}},{"entity_number":314,"name":"stone-wall","position":{"x":-13,"y":9}},{"entity_number":315,"name":"stone-wall","position":{"x":-13,"y":8}},{"entity_number":316,"name":"stone-wall","position":{"x":-11,"y":9}},{"entity_number":317,"name":"stone-wall","position":{"x":-12,"y":9}},{"entity_number":318,"name":"stone-wall","position":{"x":-9,"y":9}},{"entity_number":319,"name":"stone-wall","position":{"x":-10,"y":9}},{"entity_number":320,"name":"stone-wall","position":{"x":-7,"y":9}},{"entity_number":321,"name":"stone-wall","position":{"x":-8,"y":9}},{"entity_number":322,"name":"stone-wall","position":{"x":-5,"y":9}},{"entity_number":323,"name":"stone-wall","position":{"x":-6,"y":9}},{"entity_number":324,"name":"stone-wall","position":{"x":-3,"y":9}},{"entity_number":325,"name":"stone-wall","position":{"x":-4,"y":9}},{"entity_number":326,"name":"stone-wall","position":{"x":-1,"y":9}},{"entity_number":327,"name":"stone-wall","position":{"x":-2,"y":9}},{"entity_number":328,"name":"stone-wall","position":{"x":1,"y":9}},{"entity_number":329,"name":"stone-wall","position":{"x":0,"y":9}},{"entity_number":330,"name":"stone-wall","position":{"x":3,"y":9}},{"entity_number":331,"name":"stone-wall","position":{"x":2,"y":9}},{"entity_number":332,"name":"stone-wall","position":{"x":5,"y":9}},{"entity_number":333,"name":"stone-wall","position":{"x":4,"y":9}},{"entity_number":334,"name":"stone-wall","position":{"x":7,"y":9}},{"entity_number":335,"name":"stone-wall","position":{"x":6,"y":9}},{"entity_number":336,"name":"stone-wall","position":{"x":9,"y":9}},{"entity_number":337,"name":"stone-wall","position":{"x":8,"y":9}},{"entity_number":338,"name":"stone-wall","position":{"x":11,"y":9}},{"entity_number":339,"name":"stone-wall","position":{"x":10,"y":9}},{"entity_number":340,"name":"land-mine","position":{"x":12.96484375,"y":8.28515625}},{"entity_number":341,"name":"stone-wall","position":{"x":13,"y":9}},{"entity_number":342,"name":"stone-wall","position":{"x":12,"y":8}},{"entity_number":343,"name":"stone-wall","position":{"x":12,"y":9}},{"entity_number":344,"name":"land-mine","position":{"x":15.015625,"y":8.1953125}},{"entity_number":345,"name":"stone-wall","position":{"x":14,"y":8}},{"entity_number":346,"name":"land-mine","position":{"x":-14.95703125,"y":10.1953125}},{"entity_number":347,"name":"stone-wall","position":{"x":-15,"y":11}},{"entity_number":348,"name":"land-mine","position":{"x":-13.93359375,"y":11.16796875}},{"entity_number":349,"name":"stone-wall","position":{"x":-14,"y":10}},{"entity_number":350,"name":"land-mine","position":{"x":-12.83203125,"y":9.93359375}},{"entity_number":351,"name":"land-mine","position":{"x":-12.703125,"y":11.77734375}},{"entity_number":352,"name":"stone-wall","position":{"x":-13,"y":11}},{"entity_number":353,"name":"land-mine","position":{"x":-10.83203125,"y":9.93359375}},{"entity_number":354,"name":"land-mine","position":{"x":-10.703125,"y":11.77734375}},{"entity_number":355,"name":"land-mine","position":{"x":-11.8046875,"y":10.984375}},{"entity_number":356,"name":"stone-wall","position":{"x":-11,"y":11}},{"entity_number":357,"name":"stone-wall","position":{"x":-12,"y":10}},{"entity_number":358,"name":"land-mine","position":{"x":-8.83203125,"y":9.93359375}},{"entity_number":359,"name":"land-mine","position":{"x":-8.703125,"y":11.77734375}},{"entity_number":360,"name":"land-mine","position":{"x":-9.83203125,"y":11.02734375}},{"entity_number":361,"name":"stone-wall","position":{"x":-9,"y":11}},{"entity_number":362,"name":"stone-wall","position":{"x":-10,"y":10}},{"entity_number":363,"name":"land-mine","position":{"x":-6.83203125,"y":9.93359375}},{"entity_number":364,"name":"land-mine","position":{"x":-6.703125,"y":11.77734375}},{"entity_number":365,"name":"land-mine","position":{"x":-7.8046875,"y":10.984375}},{"entity_number":366,"name":"stone-wall","position":{"x":-7,"y":11}},{"entity_number":367,"name":"stone-wall","position":{"x":-8,"y":10}},{"entity_number":368,"name":"land-mine","position":{"x":-4.83203125,"y":9.93359375}},{"entity_number":369,"name":"land-mine","position":{"x":-5.8046875,"y":10.95703125}},{"entity_number":370,"name":"stone-wall","position":{"x":-5,"y":11}},{"entity_number":371,"name":"stone-wall","position":{"x":-6,"y":10}},{"entity_number":372,"name":"land-mine","position":{"x":-2.83203125,"y":9.93359375}},{"entity_number":373,"name":"land-mine","position":{"x":-3.203125,"y":11.77734375}},{"entity_number":374,"name":"stone-wall","position":{"x":-3,"y":11}},{"entity_number":375,"name":"stone-wall","position":{"x":-4,"y":10}},{"entity_number":376,"name":"land-mine","position":{"x":-3.984375,"y":10.9140625}},{"entity_number":377,"name":"land-mine","position":{"x":-0.83203125,"y":9.93359375}},{"entity_number":378,"name":"land-mine","position":{"x":-0.703125,"y":11.77734375}},{"entity_number":379,"name":"land-mine","position":{"x":-1.83203125,"y":11.02734375}},{"entity_number":380,"name":"stone-wall","position":{"x":-1,"y":11}},{"entity_number":381,"name":"stone-wall","position":{"x":-2,"y":10}},{"entity_number":382,"name":"land-mine","position":{"x":1.16796875,"y":9.93359375}},{"entity_number":383,"name":"land-mine","position":{"x":1.296875,"y":11.77734375}},{"entity_number":384,"name":"land-mine","position":{"x":0.1953125,"y":10.984375}},{"entity_number":385,"name":"stone-wall","position":{"x":1,"y":11}},{"entity_number":386,"name":"stone-wall","position":{"x":0,"y":10}},{"entity_number":387,"name":"land-mine","position":{"x":3.16796875,"y":9.93359375}},{"entity_number":388,"name":"land-mine","position":{"x":2.796875,"y":11.77734375}},{"entity_number":389,"name":"land-mine","position":{"x":2.1953125,"y":10.95703125}},{"entity_number":390,"name":"stone-wall","position":{"x":3,"y":11}},{"entity_number":391,"name":"stone-wall","position":{"x":2,"y":10}},{"entity_number":392,"name":"land-mine","position":{"x":5.16796875,"y":9.93359375}},{"entity_number":393,"name":"land-mine","position":{"x":4.796875,"y":11.77734375}},{"entity_number":394,"name":"stone-wall","position":{"x":5,"y":11}},{"entity_number":395,"name":"stone-wall","position":{"x":4,"y":10}},{"entity_number":396,"name":"land-mine","position":{"x":4.015625,"y":10.9140625}},{"entity_number":397,"name":"land-mine","position":{"x":7.16796875,"y":9.93359375}},{"entity_number":398,"name":"land-mine","position":{"x":6.16796875,"y":11.02734375}},{"entity_number":399,"name":"stone-wall","position":{"x":7,"y":11}},{"entity_number":400,"name":"stone-wall","position":{"x":6,"y":10}},{"entity_number":401,"name":"land-mine","position":{"x":9.16796875,"y":9.93359375}},{"entity_number":402,"name":"land-mine","position":{"x":8.1953125,"y":10.984375}},{"entity_number":403,"name":"stone-wall","position":{"x":9,"y":11}},{"entity_number":404,"name":"stone-wall","position":{"x":8,"y":10}},{"entity_number":405,"name":"land-mine","position":{"x":11.16796875,"y":9.93359375}},{"entity_number":406,"name":"land-mine","position":{"x":10.1953125,"y":10.95703125}},{"entity_number":407,"name":"stone-wall","position":{"x":11,"y":11}},{"entity_number":408,"name":"stone-wall","position":{"x":10,"y":10}},{"entity_number":409,"name":"land-mine","position":{"x":13.16796875,"y":9.93359375}},{"entity_number":410,"name":"stone-wall","position":{"x":13,"y":11}},{"entity_number":411,"name":"stone-wall","position":{"x":12,"y":10}},{"entity_number":412,"name":"land-mine","position":{"x":12.015625,"y":10.9140625}},{"entity_number":413,"name":"stone-wall","position":{"x":-14,"y":12}},{"entity_number":414,"name":"stone-wall","position":{"x":-12,"y":12}},{"entity_number":415,"name":"land-mine","position":{"x":-9.71484375,"y":13.03515625}},{"entity_number":416,"name":"stone-wall","position":{"x":-9,"y":13}},{"entity_number":417,"name":"stone-wall","position":{"x":-10,"y":12}},{"entity_number":418,"name":"stone-wall","position":{"x":-8,"y":12}},{"entity_number":419,"name":"stone-wall","position":{"x":-3,"y":13}},{"entity_number":420,"name":"land-mine","position":{"x":-1.71484375,"y":13.03515625}},{"entity_number":421,"name":"stone-wall","position":{"x":-1,"y":13}},{"entity_number":422,"name":"stone-wall","position":{"x":-2,"y":12}},{"entity_number":423,"name":"land-mine","position":{"x":0.28515625,"y":13.03515625}},{"entity_number":424,"name":"stone-wall","position":{"x":1,"y":13}},{"entity_number":425,"name":"stone-wall","position":{"x":0,"y":12}},{"entity_number":426,"name":"stone-wall","position":{"x":3,"y":13}},{"entity_number":427,"name":"stone-wall","position":{"x":2,"y":12}},{"entity_number":428,"name":"land-mine","position":{"x":2.01953125,"y":12.93359375}},{"entity_number":429,"name":"land-mine","position":{"x":4.28515625,"y":13.03515625}},{"entity_number":430,"name":"stone-wall","position":{"x":5,"y":13}},{"entity_number":431,"name":"stone-wall","position":{"x":4,"y":12}},{"entity_number":432,"name":"stone-wall","position":{"x":6,"y":12}},{"entity_number":433,"name":"stone-wall","position":{"x":2,"y":14}},{"entity_number":434,"name":"stone-wall","position":{"x":4,"y":14}}],"tiles":[{"position":{"x":-17,"y":-4},"name":"refined-concrete"},{"position":{"x":-17,"y":-3},"name":"refined-concrete"},{"position":{"x":-17,"y":2},"name":"refined-concrete"},{"position":{"x":-17,"y":3},"name":"refined-concrete"},{"position":{"x":-16,"y":-8},"name":"refined-concrete"},{"position":{"x":-16,"y":-7},"name":"refined-concrete"},{"position":{"x":-16,"y":-6},"name":"refined-concrete"},{"position":{"x":-16,"y":-5},"name":"refined-concrete"},{"position":{"x":-16,"y":-4},"name":"refined-concrete"},{"position":{"x":-16,"y":-3},"name":"refined-concrete"},{"position":{"x":-16,"y":-2},"name":"refined-concrete"},{"position":{"x":-16,"y":-1},"name":"refined-concrete"},{"position":{"x":-16,"y":0},"name":"refined-concrete"},{"position":{"x":-16,"y":1},"name":"refined-concrete"},{"position":{"x":-16,"y":2},"name":"refined-concrete"},{"position":{"x":-16,"y":3},"name":"refined-concrete"},{"position":{"x":-16,"y":4},"name":"refined-concrete"},{"position":{"x":-16,"y":5},"name":"refined-concrete"},{"position":{"x":-16,"y":6},"name":"refined-concrete"},{"position":{"x":-16,"y":7},"name":"refined-concrete"},{"position":{"x":-16,"y":8},"name":"refined-concrete"},{"position":{"x":-15,"y":-10},"name":"refined-concrete"},{"position":{"x":-15,"y":-9},"name":"refined-concrete"},{"position":{"x":-15,"y":-8},"name":"refined-concrete"},{"position":{"x":-15,"y":-7},"name":"refined-concrete"},{"position":{"x":-15,"y":-6},"name":"refined-concrete"},{"position":{"x":-15,"y":-5},"name":"refined-concrete"},{"position":{"x":-15,"y":-4},"name":"refined-concrete"},{"position":{"x":-15,"y":-3},"name":"refined-concrete"},{"position":{"x":-15,"y":-2},"name":"refined-concrete"},{"position":{"x":-15,"y":-1},"name":"refined-concrete"},{"position":{"x":-15,"y":0},"name":"refined-concrete"},{"position":{"x":-15,"y":1},"name":"refined-concrete"},{"position":{"x":-15,"y":2},"name":"refined-concrete"},{"position":{"x":-15,"y":3},"name":"refined-concrete"},{"position":{"x":-15,"y":4},"name":"refined-concrete"},{"position":{"x":-15,"y":5},"name":"refined-concrete"},{"position":{"x":-15,"y":6},"name":"refined-concrete"},{"position":{"x":-15,"y":7},"name":"refined-concrete"},{"position":{"x":-15,"y":8},"name":"refined-concrete"},{"position":{"x":-15,"y":9},"name":"refined-concrete"},{"position":{"x":-15,"y":10},"name":"refined-concrete"},{"position":{"x":-14,"y":-10},"name":"refined-concrete"},{"position":{"x":-14,"y":-9},"name":"refined-concrete"},{"position":{"x":-14,"y":-8},"name":"refined-concrete"},{"position":{"x":-14,"y":-7},"name":"refined-concrete"},{"position":{"x":-14,"y":-6},"name":"refined-concrete"},{"position":{"x":-14,"y":-5},"name":"refined-concrete"},{"position":{"x":-14,"y":-4},"name":"refined-concrete"},{"position":{"x":-14,"y":-3},"name":"refined-concrete"},{"position":{"x":-14,"y":-2},"name":"refined-concrete"},{"position":{"x":-14,"y":-1},"name":"refined-concrete"},{"position":{"x":-14,"y":0},"name":"refined-concrete"},{"position":{"x":-14,"y":1},"name":"refined-concrete"},{"position":{"x":-14,"y":2},"name":"refined-concrete"},{"position":{"x":-14,"y":3},"name":"refined-concrete"},{"position":{"x":-14,"y":4},"name":"refined-concrete"},{"position":{"x":-14,"y":5},"name":"refined-concrete"},{"position":{"x":-14,"y":6},"name":"refined-concrete"},{"position":{"x":-14,"y":7},"name":"refined-concrete"},{"position":{"x":-14,"y":8},"name":"refined-concrete"},{"position":{"x":-14,"y":9},"name":"refined-concrete"},{"position":{"x":-14,"y":10},"name":"refined-concrete"},{"position":{"x":-14,"y":11},"name":"refined-concrete"},{"position":{"x":-14,"y":12},"name":"refined-concrete"},{"position":{"x":-13,"y":-11},"name":"refined-concrete"},{"position":{"x":-13,"y":-10},"name":"refined-concrete"},{"position":{"x":-13,"y":-9},"name":"refined-concrete"},{"position":{"x":-13,"y":-8},"name":"refined-concrete"},{"position":{"x":-13,"y":-7},"name":"refined-concrete"},{"position":{"x":-13,"y":-6},"name":"refined-concrete"},{"position":{"x":-13,"y":-5},"name":"refined-concrete"},{"position":{"x":-13,"y":-4},"name":"refined-concrete"},{"position":{"x":-13,"y":-3},"name":"refined-concrete"},{"position":{"x":-13,"y":-2},"name":"refined-concrete"},{"position":{"x":-13,"y":-1},"name":"refined-concrete"},{"position":{"x":-13,"y":0},"name":"refined-concrete"},{"position":{"x":-13,"y":1},"name":"refined-concrete"},{"position":{"x":-13,"y":2},"name":"refined-concrete"},{"position":{"x":-13,"y":3},"name":"refined-concrete"},{"position":{"x":-13,"y":4},"name":"refined-concrete"},{"position":{"x":-13,"y":5},"name":"refined-concrete"},{"position":{"x":-13,"y":6},"name":"refined-concrete"},{"position":{"x":-13,"y":7},"name":"refined-concrete"},{"position":{"x":-13,"y":8},"name":"refined-concrete"},{"position":{"x":-13,"y":9},"name":"refined-concrete"},{"position":{"x":-13,"y":10},"name":"refined-concrete"},{"position":{"x":-13,"y":11},"name":"refined-concrete"},{"position":{"x":-13,"y":12},"name":"refined-concrete"},{"position":{"x":-12,"y":-11},"name":"refined-concrete"},{"position":{"x":-12,"y":-10},"name":"refined-concrete"},{"position":{"x":-12,"y":-9},"name":"refined-concrete"},{"position":{"x":-12,"y":-8},"name":"refined-concrete"},{"position":{"x":-12,"y":-7},"name":"refined-concrete"},{"position":{"x":-12,"y":-6},"name":"refined-concrete"},{"position":{"x":-12,"y":-5},"name":"refined-concrete"},{"position":{"x":-12,"y":-4},"name":"refined-concrete"},{"position":{"x":-12,"y":-3},"name":"refined-concrete"},{"position":{"x":-12,"y":-2},"name":"refined-concrete"},{"position":{"x":-12,"y":-1},"name":"refined-concrete"},{"position":{"x":-12,"y":0},"name":"refined-concrete"},{"position":{"x":-12,"y":1},"name":"refined-concrete"},{"position":{"x":-12,"y":2},"name":"refined-concrete"},{"position":{"x":-12,"y":3},"name":"refined-concrete"},{"position":{"x":-12,"y":4},"name":"refined-concrete"},{"position":{"x":-12,"y":5},"name":"refined-concrete"},{"position":{"x":-12,"y":6},"name":"refined-concrete"},{"position":{"x":-12,"y":7},"name":"refined-concrete"},{"position":{"x":-12,"y":8},"name":"refined-concrete"},{"position":{"x":-12,"y":9},"name":"refined-concrete"},{"position":{"x":-12,"y":10},"name":"refined-concrete"},{"position":{"x":-12,"y":11},"name":"refined-concrete"},{"position":{"x":-12,"y":12},"name":"refined-concrete"},{"position":{"x":-11,"y":-11},"name":"refined-concrete"},{"position":{"x":-11,"y":-10},"name":"refined-concrete"},{"position":{"x":-11,"y":-9},"name":"refined-concrete"},{"position":{"x":-11,"y":-8},"name":"refined-concrete"},{"position":{"x":-11,"y":-7},"name":"refined-concrete"},{"position":{"x":-11,"y":-6},"name":"refined-concrete"},{"position":{"x":-11,"y":-5},"name":"refined-concrete"},{"position":{"x":-11,"y":-4},"name":"refined-concrete"},{"position":{"x":-11,"y":-3},"name":"refined-concrete"},{"position":{"x":-11,"y":-2},"name":"refined-concrete"},{"position":{"x":-11,"y":-1},"name":"refined-concrete"},{"position":{"x":-11,"y":0},"name":"refined-concrete"},{"position":{"x":-11,"y":1},"name":"refined-concrete"},{"position":{"x":-11,"y":2},"name":"refined-concrete"},{"position":{"x":-11,"y":3},"name":"refined-concrete"},{"position":{"x":-11,"y":4},"name":"refined-concrete"},{"position":{"x":-11,"y":5},"name":"refined-concrete"},{"position":{"x":-11,"y":6},"name":"refined-concrete"},{"position":{"x":-11,"y":7},"name":"refined-concrete"},{"position":{"x":-11,"y":8},"name":"refined-concrete"},{"position":{"x":-11,"y":9},"name":"refined-concrete"},{"position":{"x":-11,"y":10},"name":"refined-concrete"},{"position":{"x":-11,"y":11},"name":"refined-concrete"},{"position":{"x":-11,"y":12},"name":"refined-concrete"},{"position":{"x":-10,"y":-11},"name":"refined-concrete"},{"position":{"x":-10,"y":-10},"name":"refined-concrete"},{"position":{"x":-10,"y":-9},"name":"refined-concrete"},{"position":{"x":-10,"y":-8},"name":"refined-concrete"},{"position":{"x":-10,"y":-7},"name":"refined-concrete"},{"position":{"x":-10,"y":-6},"name":"refined-concrete"},{"position":{"x":-10,"y":-5},"name":"refined-concrete"},{"position":{"x":-10,"y":-4},"name":"refined-concrete"},{"position":{"x":-10,"y":-3},"name":"refined-concrete"},{"position":{"x":-10,"y":-2},"name":"refined-concrete"},{"position":{"x":-10,"y":-1},"name":"refined-concrete"},{"position":{"x":-10,"y":0},"name":"refined-concrete"},{"position":{"x":-10,"y":1},"name":"refined-concrete"},{"position":{"x":-10,"y":2},"name":"refined-concrete"},{"position":{"x":-10,"y":3},"name":"refined-concrete"},{"position":{"x":-10,"y":4},"name":"refined-concrete"},{"position":{"x":-10,"y":5},"name":"refined-concrete"},{"position":{"x":-10,"y":6},"name":"refined-concrete"},{"position":{"x":-10,"y":7},"name":"refined-concrete"},{"position":{"x":-10,"y":8},"name":"refined-concrete"},{"position":{"x":-10,"y":9},"name":"refined-concrete"},{"position":{"x":-10,"y":10},"name":"refined-concrete"},{"position":{"x":-10,"y":11},"name":"refined-concrete"},{"position":{"x":-10,"y":12},"name":"refined-concrete"},{"position":{"x":-10,"y":13},"name":"refined-concrete"},{"position":{"x":-9,"y":-12},"name":"refined-concrete"},{"position":{"x":-9,"y":-11},"name":"refined-concrete"},{"position":{"x":-9,"y":-10},"name":"refined-concrete"},{"position":{"x":-9,"y":-9},"name":"refined-concrete"},{"position":{"x":-9,"y":-8},"name":"refined-concrete"},{"position":{"x":-9,"y":-7},"name":"refined-concrete"},{"position":{"x":-9,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":-5},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":-4},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":-3},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":-2},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":-1},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":0},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":1},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":2},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":3},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":4},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":-9,"y":6},"name":"refined-concrete"},{"position":{"x":-9,"y":7},"name":"refined-concrete"},{"position":{"x":-9,"y":8},"name":"refined-concrete"},{"position":{"x":-9,"y":9},"name":"refined-concrete"},{"position":{"x":-9,"y":10},"name":"refined-concrete"},{"position":{"x":-9,"y":11},"name":"refined-concrete"},{"position":{"x":-9,"y":12},"name":"refined-concrete"},{"position":{"x":-8,"y":-12},"name":"refined-concrete"},{"position":{"x":-8,"y":-11},"name":"refined-concrete"},{"position":{"x":-8,"y":-10},"name":"refined-concrete"},{"position":{"x":-8,"y":-9},"name":"refined-concrete"},{"position":{"x":-8,"y":-8},"name":"refined-concrete"},{"position":{"x":-8,"y":-7},"name":"refined-concrete"},{"position":{"x":-8,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":-8,"y":-5},"name":"refined-concrete"},{"position":{"x":-8,"y":-4},"name":"refined-concrete"},{"position":{"x":-8,"y":-3},"name":"refined-concrete"},{"position":{"x":-8,"y":-2},"name":"refined-concrete"},{"position":{"x":-8,"y":-1},"name":"refined-concrete"},{"position":{"x":-8,"y":0},"name":"refined-concrete"},{"position":{"x":-8,"y":1},"name":"refined-concrete"},{"position":{"x":-8,"y":2},"name":"refined-concrete"},{"position":{"x":-8,"y":3},"name":"refined-concrete"},{"position":{"x":-8,"y":4},"name":"refined-concrete"},{"position":{"x":-8,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":-8,"y":6},"name":"refined-concrete"},{"position":{"x":-8,"y":7},"name":"refined-concrete"},{"position":{"x":-8,"y":8},"name":"refined-concrete"},{"position":{"x":-8,"y":9},"name":"refined-concrete"},{"position":{"x":-8,"y":10},"name":"refined-concrete"},{"position":{"x":-8,"y":11},"name":"refined-concrete"},{"position":{"x":-8,"y":12},"name":"refined-concrete"},{"position":{"x":-7,"y":-12},"name":"refined-concrete"},{"position":{"x":-7,"y":-11},"name":"refined-concrete"},{"position":{"x":-7,"y":-10},"name":"refined-concrete"},{"position":{"x":-7,"y":-9},"name":"refined-concrete"},{"position":{"x":-7,"y":-8},"name":"refined-concrete"},{"position":{"x":-7,"y":-7},"name":"refined-concrete"},{"position":{"x":-7,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":-7,"y":-5},"name":"refined-concrete"},{"position":{"x":-7,"y":-4},"name":"refined-concrete"},{"position":{"x":-7,"y":-3},"name":"refined-concrete"},{"position":{"x":-7,"y":-2},"name":"refined-concrete"},{"position":{"x":-7,"y":-1},"name":"refined-concrete"},{"position":{"x":-7,"y":0},"name":"refined-concrete"},{"position":{"x":-7,"y":1},"name":"refined-concrete"},{"position":{"x":-7,"y":2},"name":"refined-concrete"},{"position":{"x":-7,"y":3},"name":"refined-concrete"},{"position":{"x":-7,"y":4},"name":"refined-concrete"},{"position":{"x":-7,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":-7,"y":6},"name":"refined-concrete"},{"position":{"x":-7,"y":7},"name":"refined-concrete"},{"position":{"x":-7,"y":8},"name":"refined-concrete"},{"position":{"x":-7,"y":9},"name":"refined-concrete"},{"position":{"x":-7,"y":10},"name":"refined-concrete"},{"position":{"x":-7,"y":11},"name":"refined-concrete"},{"position":{"x":-6,"y":-12},"name":"refined-concrete"},{"position":{"x":-6,"y":-11},"name":"refined-concrete"},{"position":{"x":-6,"y":-10},"name":"refined-concrete"},{"position":{"x":-6,"y":-9},"name":"refined-concrete"},{"position":{"x":-6,"y":-8},"name":"refined-concrete"},{"position":{"x":-6,"y":-7},"name":"refined-concrete"},{"position":{"x":-6,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":-6,"y":-5},"name":"refined-concrete"},{"position":{"x":-6,"y":-4},"name":"refined-concrete"},{"position":{"x":-6,"y":-3},"name":"refined-concrete"},{"position":{"x":-6,"y":-2},"name":"refined-concrete"},{"position":{"x":-6,"y":-1},"name":"refined-concrete"},{"position":{"x":-6,"y":0},"name":"refined-concrete"},{"position":{"x":-6,"y":1},"name":"refined-concrete"},{"position":{"x":-6,"y":2},"name":"refined-concrete"},{"position":{"x":-6,"y":3},"name":"refined-concrete"},{"position":{"x":-6,"y":4},"name":"refined-concrete"},{"position":{"x":-6,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":-6,"y":6},"name":"refined-concrete"},{"position":{"x":-6,"y":7},"name":"refined-concrete"},{"position":{"x":-6,"y":8},"name":"refined-concrete"},{"position":{"x":-6,"y":9},"name":"refined-concrete"},{"position":{"x":-6,"y":10},"name":"refined-concrete"},{"position":{"x":-6,"y":11},"name":"refined-concrete"},{"position":{"x":-5,"y":-12},"name":"refined-concrete"},{"position":{"x":-5,"y":-11},"name":"refined-concrete"},{"position":{"x":-5,"y":-10},"name":"refined-concrete"},{"position":{"x":-5,"y":-9},"name":"refined-concrete"},{"position":{"x":-5,"y":-8},"name":"refined-concrete"},{"position":{"x":-5,"y":-7},"name":"refined-concrete"},{"position":{"x":-5,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":-5,"y":-5},"name":"refined-concrete"},{"position":{"x":-5,"y":-4},"name":"refined-concrete"},{"position":{"x":-5,"y":-3},"name":"refined-concrete"},{"position":{"x":-5,"y":-2},"name":"refined-concrete"},{"position":{"x":-5,"y":-1},"name":"refined-concrete"},{"position":{"x":-5,"y":0},"name":"refined-concrete"},{"position":{"x":-5,"y":1},"name":"refined-concrete"},{"position":{"x":-5,"y":2},"name":"refined-concrete"},{"position":{"x":-5,"y":3},"name":"refined-concrete"},{"position":{"x":-5,"y":4},"name":"refined-concrete"},{"position":{"x":-5,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":-5,"y":6},"name":"refined-concrete"},{"position":{"x":-5,"y":7},"name":"refined-concrete"},{"position":{"x":-5,"y":8},"name":"refined-concrete"},{"position":{"x":-5,"y":9},"name":"refined-concrete"},{"position":{"x":-5,"y":10},"name":"refined-concrete"},{"position":{"x":-5,"y":11},"name":"refined-concrete"},{"position":{"x":-4,"y":-12},"name":"refined-concrete"},{"position":{"x":-4,"y":-11},"name":"refined-concrete"},{"position":{"x":-4,"y":-10},"name":"refined-concrete"},{"position":{"x":-4,"y":-9},"name":"refined-concrete"},{"position":{"x":-4,"y":-8},"name":"refined-concrete"},{"position":{"x":-4,"y":-7},"name":"refined-concrete"},{"position":{"x":-4,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":-4,"y":-5},"name":"refined-concrete"},{"position":{"x":-4,"y":-4},"name":"refined-concrete"},{"position":{"x":-4,"y":-3},"name":"refined-concrete"},{"position":{"x":-4,"y":-2},"name":"refined-concrete"},{"position":{"x":-4,"y":-1},"name":"refined-concrete"},{"position":{"x":-4,"y":0},"name":"refined-concrete"},{"position":{"x":-4,"y":1},"name":"refined-concrete"},{"position":{"x":-4,"y":2},"name":"refined-concrete"},{"position":{"x":-4,"y":3},"name":"refined-concrete"},{"position":{"x":-4,"y":4},"name":"refined-concrete"},{"position":{"x":-4,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":-4,"y":6},"name":"refined-concrete"},{"position":{"x":-4,"y":7},"name":"refined-concrete"},{"position":{"x":-4,"y":8},"name":"refined-concrete"},{"position":{"x":-4,"y":9},"name":"refined-concrete"},{"position":{"x":-4,"y":10},"name":"refined-concrete"},{"position":{"x":-4,"y":11},"name":"refined-concrete"},{"position":{"x":-3,"y":-12},"name":"refined-concrete"},{"position":{"x":-3,"y":-11},"name":"refined-concrete"},{"position":{"x":-3,"y":-10},"name":"refined-concrete"},{"position":{"x":-3,"y":-9},"name":"refined-concrete"},{"position":{"x":-3,"y":-8},"name":"refined-concrete"},{"position":{"x":-3,"y":-7},"name":"refined-concrete"},{"position":{"x":-3,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":-3,"y":-5},"name":"refined-concrete"},{"position":{"x":-3,"y":-4},"name":"refined-concrete"},{"position":{"x":-3,"y":-3},"name":"refined-concrete"},{"position":{"x":-3,"y":-2},"name":"refined-concrete"},{"position":{"x":-3,"y":-1},"name":"refined-concrete"},{"position":{"x":-3,"y":0},"name":"refined-concrete"},{"position":{"x":-3,"y":1},"name":"refined-concrete"},{"position":{"x":-3,"y":2},"name":"refined-concrete"},{"position":{"x":-3,"y":3},"name":"refined-concrete"},{"position":{"x":-3,"y":4},"name":"refined-concrete"},{"position":{"x":-3,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":-3,"y":6},"name":"refined-concrete"},{"position":{"x":-3,"y":7},"name":"refined-concrete"},{"position":{"x":-3,"y":8},"name":"refined-concrete"},{"position":{"x":-3,"y":9},"name":"refined-concrete"},{"position":{"x":-3,"y":10},"name":"refined-concrete"},{"position":{"x":-3,"y":11},"name":"refined-concrete"},{"position":{"x":-3,"y":12},"name":"refined-concrete"},{"position":{"x":-3,"y":13},"name":"refined-concrete"},{"position":{"x":-2,"y":-12},"name":"refined-concrete"},{"position":{"x":-2,"y":-11},"name":"refined-concrete"},{"position":{"x":-2,"y":-10},"name":"refined-concrete"},{"position":{"x":-2,"y":-9},"name":"refined-concrete"},{"position":{"x":-2,"y":-8},"name":"refined-concrete"},{"position":{"x":-2,"y":-7},"name":"refined-concrete"},{"position":{"x":-2,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":-2,"y":-5},"name":"refined-concrete"},{"position":{"x":-2,"y":-4},"name":"refined-concrete"},{"position":{"x":-2,"y":-3},"name":"refined-concrete"},{"position":{"x":-2,"y":-2},"name":"refined-concrete"},{"position":{"x":-2,"y":-1},"name":"refined-concrete"},{"position":{"x":-2,"y":0},"name":"refined-concrete"},{"position":{"x":-2,"y":1},"name":"refined-concrete"},{"position":{"x":-2,"y":2},"name":"refined-concrete"},{"position":{"x":-2,"y":3},"name":"refined-concrete"},{"position":{"x":-2,"y":4},"name":"refined-concrete"},{"position":{"x":-2,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":-2,"y":6},"name":"refined-concrete"},{"position":{"x":-2,"y":7},"name":"refined-concrete"},{"position":{"x":-2,"y":8},"name":"refined-concrete"},{"position":{"x":-2,"y":9},"name":"refined-concrete"},{"position":{"x":-2,"y":10},"name":"refined-concrete"},{"position":{"x":-2,"y":11},"name":"refined-concrete"},{"position":{"x":-2,"y":12},"name":"refined-concrete"},{"position":{"x":-2,"y":13},"name":"refined-concrete"},{"position":{"x":-1,"y":-13},"name":"refined-concrete"},{"position":{"x":-1,"y":-12},"name":"refined-concrete"},{"position":{"x":-1,"y":-11},"name":"refined-concrete"},{"position":{"x":-1,"y":-10},"name":"refined-concrete"},{"position":{"x":-1,"y":-9},"name":"refined-concrete"},{"position":{"x":-1,"y":-8},"name":"refined-concrete"},{"position":{"x":-1,"y":-7},"name":"refined-concrete"},{"position":{"x":-1,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":-1,"y":-5},"name":"refined-concrete"},{"position":{"x":-1,"y":-4},"name":"refined-concrete"},{"position":{"x":-1,"y":-3},"name":"refined-concrete"},{"position":{"x":-1,"y":-2},"name":"refined-concrete"},{"position":{"x":-1,"y":-1},"name":"refined-concrete"},{"position":{"x":-1,"y":0},"name":"refined-concrete"},{"position":{"x":-1,"y":1},"name":"refined-concrete"},{"position":{"x":-1,"y":2},"name":"refined-concrete"},{"position":{"x":-1,"y":3},"name":"refined-concrete"},{"position":{"x":-1,"y":4},"name":"refined-concrete"},{"position":{"x":-1,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":-1,"y":6},"name":"refined-concrete"},{"position":{"x":-1,"y":7},"name":"refined-concrete"},{"position":{"x":-1,"y":8},"name":"refined-concrete"},{"position":{"x":-1,"y":9},"name":"refined-concrete"},{"position":{"x":-1,"y":10},"name":"refined-concrete"},{"position":{"x":-1,"y":11},"name":"refined-concrete"},{"position":{"x":-1,"y":12},"name":"refined-concrete"},{"position":{"x":-1,"y":13},"name":"refined-concrete"},{"position":{"x":0,"y":-13},"name":"refined-concrete"},{"position":{"x":0,"y":-12},"name":"refined-concrete"},{"position":{"x":0,"y":-11},"name":"refined-concrete"},{"position":{"x":0,"y":-10},"name":"refined-concrete"},{"position":{"x":0,"y":-9},"name":"refined-concrete"},{"position":{"x":0,"y":-8},"name":"refined-concrete"},{"position":{"x":0,"y":-7},"name":"refined-concrete"},{"position":{"x":0,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":0,"y":-5},"name":"refined-concrete"},{"position":{"x":0,"y":-4},"name":"refined-concrete"},{"position":{"x":0,"y":-3},"name":"refined-concrete"},{"position":{"x":0,"y":-2},"name":"refined-concrete"},{"position":{"x":0,"y":-1},"name":"refined-concrete"},{"position":{"x":0,"y":0},"name":"refined-concrete"},{"position":{"x":0,"y":1},"name":"refined-concrete"},{"position":{"x":0,"y":2},"name":"refined-concrete"},{"position":{"x":0,"y":3},"name":"refined-concrete"},{"position":{"x":0,"y":4},"name":"refined-concrete"},{"position":{"x":0,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":0,"y":6},"name":"refined-concrete"},{"position":{"x":0,"y":7},"name":"refined-concrete"},{"position":{"x":0,"y":8},"name":"refined-concrete"},{"position":{"x":0,"y":9},"name":"refined-concrete"},{"position":{"x":0,"y":10},"name":"refined-concrete"},{"position":{"x":0,"y":11},"name":"refined-concrete"},{"position":{"x":0,"y":12},"name":"refined-concrete"},{"position":{"x":0,"y":13},"name":"refined-concrete"},{"position":{"x":1,"y":-13},"name":"refined-concrete"},{"position":{"x":1,"y":-12},"name":"refined-concrete"},{"position":{"x":1,"y":-11},"name":"refined-concrete"},{"position":{"x":1,"y":-10},"name":"refined-concrete"},{"position":{"x":1,"y":-9},"name":"refined-concrete"},{"position":{"x":1,"y":-8},"name":"refined-concrete"},{"position":{"x":1,"y":-7},"name":"refined-concrete"},{"position":{"x":1,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":1,"y":-5},"name":"refined-concrete"},{"position":{"x":1,"y":-4},"name":"refined-concrete"},{"position":{"x":1,"y":-3},"name":"refined-concrete"},{"position":{"x":1,"y":-2},"name":"refined-concrete"},{"position":{"x":1,"y":-1},"name":"refined-concrete"},{"position":{"x":1,"y":0},"name":"refined-concrete"},{"position":{"x":1,"y":1},"name":"refined-concrete"},{"position":{"x":1,"y":2},"name":"refined-concrete"},{"position":{"x":1,"y":3},"name":"refined-concrete"},{"position":{"x":1,"y":4},"name":"refined-concrete"},{"position":{"x":1,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":1,"y":6},"name":"refined-concrete"},{"position":{"x":1,"y":7},"name":"refined-concrete"},{"position":{"x":1,"y":8},"name":"refined-concrete"},{"position":{"x":1,"y":9},"name":"refined-concrete"},{"position":{"x":1,"y":10},"name":"refined-concrete"},{"position":{"x":1,"y":11},"name":"refined-concrete"},{"position":{"x":1,"y":12},"name":"refined-concrete"},{"position":{"x":1,"y":13},"name":"refined-concrete"},{"position":{"x":2,"y":-13},"name":"refined-concrete"},{"position":{"x":2,"y":-12},"name":"refined-concrete"},{"position":{"x":2,"y":-11},"name":"refined-concrete"},{"position":{"x":2,"y":-10},"name":"refined-concrete"},{"position":{"x":2,"y":-9},"name":"refined-concrete"},{"position":{"x":2,"y":-8},"name":"refined-concrete"},{"position":{"x":2,"y":-7},"name":"refined-concrete"},{"position":{"x":2,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":2,"y":-5},"name":"refined-concrete"},{"position":{"x":2,"y":-4},"name":"refined-concrete"},{"position":{"x":2,"y":-3},"name":"refined-concrete"},{"position":{"x":2,"y":-2},"name":"refined-concrete"},{"position":{"x":2,"y":-1},"name":"refined-concrete"},{"position":{"x":2,"y":0},"name":"refined-concrete"},{"position":{"x":2,"y":1},"name":"refined-concrete"},{"position":{"x":2,"y":2},"name":"refined-concrete"},{"position":{"x":2,"y":3},"name":"refined-concrete"},{"position":{"x":2,"y":4},"name":"refined-concrete"},{"position":{"x":2,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":2,"y":6},"name":"refined-concrete"},{"position":{"x":2,"y":7},"name":"refined-concrete"},{"position":{"x":2,"y":8},"name":"refined-concrete"},{"position":{"x":2,"y":9},"name":"refined-concrete"},{"position":{"x":2,"y":10},"name":"refined-concrete"},{"position":{"x":2,"y":11},"name":"refined-concrete"},{"position":{"x":2,"y":12},"name":"refined-concrete"},{"position":{"x":2,"y":13},"name":"refined-concrete"},{"position":{"x":3,"y":-13},"name":"refined-concrete"},{"position":{"x":3,"y":-12},"name":"refined-concrete"},{"position":{"x":3,"y":-11},"name":"refined-concrete"},{"position":{"x":3,"y":-10},"name":"refined-concrete"},{"position":{"x":3,"y":-9},"name":"refined-concrete"},{"position":{"x":3,"y":-8},"name":"refined-concrete"},{"position":{"x":3,"y":-7},"name":"refined-concrete"},{"position":{"x":3,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":3,"y":-5},"name":"refined-concrete"},{"position":{"x":3,"y":-4},"name":"refined-concrete"},{"position":{"x":3,"y":-3},"name":"refined-concrete"},{"position":{"x":3,"y":-2},"name":"refined-concrete"},{"position":{"x":3,"y":-1},"name":"refined-concrete"},{"position":{"x":3,"y":0},"name":"refined-concrete"},{"position":{"x":3,"y":1},"name":"refined-concrete"},{"position":{"x":3,"y":2},"name":"refined-concrete"},{"position":{"x":3,"y":3},"name":"refined-concrete"},{"position":{"x":3,"y":4},"name":"refined-concrete"},{"position":{"x":3,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":3,"y":6},"name":"refined-concrete"},{"position":{"x":3,"y":7},"name":"refined-concrete"},{"position":{"x":3,"y":8},"name":"refined-concrete"},{"position":{"x":3,"y":9},"name":"refined-concrete"},{"position":{"x":3,"y":10},"name":"refined-concrete"},{"position":{"x":3,"y":11},"name":"refined-concrete"},{"position":{"x":3,"y":12},"name":"refined-concrete"},{"position":{"x":3,"y":13},"name":"refined-concrete"},{"position":{"x":3,"y":14},"name":"refined-concrete"},{"position":{"x":4,"y":-13},"name":"refined-concrete"},{"position":{"x":4,"y":-12},"name":"refined-concrete"},{"position":{"x":4,"y":-11},"name":"refined-concrete"},{"position":{"x":4,"y":-10},"name":"refined-concrete"},{"position":{"x":4,"y":-9},"name":"refined-concrete"},{"position":{"x":4,"y":-8},"name":"refined-concrete"},{"position":{"x":4,"y":-7},"name":"refined-concrete"},{"position":{"x":4,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":4,"y":-5},"name":"refined-concrete"},{"position":{"x":4,"y":-4},"name":"refined-concrete"},{"position":{"x":4,"y":-3},"name":"refined-concrete"},{"position":{"x":4,"y":-2},"name":"refined-concrete"},{"position":{"x":4,"y":-1},"name":"refined-concrete"},{"position":{"x":4,"y":0},"name":"refined-concrete"},{"position":{"x":4,"y":1},"name":"refined-concrete"},{"position":{"x":4,"y":2},"name":"refined-concrete"},{"position":{"x":4,"y":3},"name":"refined-concrete"},{"position":{"x":4,"y":4},"name":"refined-concrete"},{"position":{"x":4,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":4,"y":6},"name":"refined-concrete"},{"position":{"x":4,"y":7},"name":"refined-concrete"},{"position":{"x":4,"y":8},"name":"refined-concrete"},{"position":{"x":4,"y":9},"name":"refined-concrete"},{"position":{"x":4,"y":10},"name":"refined-concrete"},{"position":{"x":4,"y":11},"name":"refined-concrete"},{"position":{"x":4,"y":12},"name":"refined-concrete"},{"position":{"x":4,"y":13},"name":"refined-concrete"},{"position":{"x":4,"y":14},"name":"refined-concrete"},{"position":{"x":5,"y":-13},"name":"refined-concrete"},{"position":{"x":5,"y":-12},"name":"refined-concrete"},{"position":{"x":5,"y":-11},"name":"refined-concrete"},{"position":{"x":5,"y":-10},"name":"refined-concrete"},{"position":{"x":5,"y":-9},"name":"refined-concrete"},{"position":{"x":5,"y":-8},"name":"refined-concrete"},{"position":{"x":5,"y":-7},"name":"refined-concrete"},{"position":{"x":5,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":5,"y":-5},"name":"refined-concrete"},{"position":{"x":5,"y":-4},"name":"refined-concrete"},{"position":{"x":5,"y":-3},"name":"refined-concrete"},{"position":{"x":5,"y":-2},"name":"refined-concrete"},{"position":{"x":5,"y":-1},"name":"refined-concrete"},{"position":{"x":5,"y":0},"name":"refined-concrete"},{"position":{"x":5,"y":1},"name":"refined-concrete"},{"position":{"x":5,"y":2},"name":"refined-concrete"},{"position":{"x":5,"y":3},"name":"refined-concrete"},{"position":{"x":5,"y":4},"name":"refined-concrete"},{"position":{"x":5,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":5,"y":6},"name":"refined-concrete"},{"position":{"x":5,"y":7},"name":"refined-concrete"},{"position":{"x":5,"y":8},"name":"refined-concrete"},{"position":{"x":5,"y":9},"name":"refined-concrete"},{"position":{"x":5,"y":10},"name":"refined-concrete"},{"position":{"x":5,"y":11},"name":"refined-concrete"},{"position":{"x":5,"y":12},"name":"refined-concrete"},{"position":{"x":5,"y":13},"name":"refined-concrete"},{"position":{"x":6,"y":-13},"name":"refined-concrete"},{"position":{"x":6,"y":-12},"name":"refined-concrete"},{"position":{"x":6,"y":-11},"name":"refined-concrete"},{"position":{"x":6,"y":-10},"name":"refined-concrete"},{"position":{"x":6,"y":-9},"name":"refined-concrete"},{"position":{"x":6,"y":-8},"name":"refined-concrete"},{"position":{"x":6,"y":-7},"name":"refined-concrete"},{"position":{"x":6,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":6,"y":-5},"name":"refined-concrete"},{"position":{"x":6,"y":-4},"name":"refined-concrete"},{"position":{"x":6,"y":-3},"name":"refined-concrete"},{"position":{"x":6,"y":-2},"name":"refined-concrete"},{"position":{"x":6,"y":-1},"name":"refined-concrete"},{"position":{"x":6,"y":0},"name":"refined-concrete"},{"position":{"x":6,"y":1},"name":"refined-concrete"},{"position":{"x":6,"y":2},"name":"refined-concrete"},{"position":{"x":6,"y":3},"name":"refined-concrete"},{"position":{"x":6,"y":4},"name":"refined-concrete"},{"position":{"x":6,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":6,"y":6},"name":"refined-concrete"},{"position":{"x":6,"y":7},"name":"refined-concrete"},{"position":{"x":6,"y":8},"name":"refined-concrete"},{"position":{"x":6,"y":9},"name":"refined-concrete"},{"position":{"x":6,"y":10},"name":"refined-concrete"},{"position":{"x":6,"y":11},"name":"refined-concrete"},{"position":{"x":7,"y":-12},"name":"refined-concrete"},{"position":{"x":7,"y":-11},"name":"refined-concrete"},{"position":{"x":7,"y":-10},"name":"refined-concrete"},{"position":{"x":7,"y":-9},"name":"refined-concrete"},{"position":{"x":7,"y":-8},"name":"refined-concrete"},{"position":{"x":7,"y":-7},"name":"refined-concrete"},{"position":{"x":7,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":7,"y":-5},"name":"refined-concrete"},{"position":{"x":7,"y":-4},"name":"refined-concrete"},{"position":{"x":7,"y":-3},"name":"refined-concrete"},{"position":{"x":7,"y":-2},"name":"refined-concrete"},{"position":{"x":7,"y":-1},"name":"refined-concrete"},{"position":{"x":7,"y":0},"name":"refined-concrete"},{"position":{"x":7,"y":1},"name":"refined-concrete"},{"position":{"x":7,"y":2},"name":"refined-concrete"},{"position":{"x":7,"y":3},"name":"refined-concrete"},{"position":{"x":7,"y":4},"name":"refined-concrete"},{"position":{"x":7,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":7,"y":6},"name":"refined-concrete"},{"position":{"x":7,"y":7},"name":"refined-concrete"},{"position":{"x":7,"y":8},"name":"refined-concrete"},{"position":{"x":7,"y":9},"name":"refined-concrete"},{"position":{"x":7,"y":10},"name":"refined-concrete"},{"position":{"x":7,"y":11},"name":"refined-concrete"},{"position":{"x":8,"y":-12},"name":"refined-concrete"},{"position":{"x":8,"y":-11},"name":"refined-concrete"},{"position":{"x":8,"y":-10},"name":"refined-concrete"},{"position":{"x":8,"y":-9},"name":"refined-concrete"},{"position":{"x":8,"y":-8},"name":"refined-concrete"},{"position":{"x":8,"y":-7},"name":"refined-concrete"},{"position":{"x":8,"y":-6},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":-5},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":-4},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":-3},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":-2},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":-1},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":0},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":1},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":2},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":3},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":4},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":5},"name":"refined-hazard-concrete-right"},{"position":{"x":8,"y":6},"name":"refined-concrete"},{"position":{"x":8,"y":7},"name":"refined-concrete"},{"position":{"x":8,"y":8},"name":"refined-concrete"},{"position":{"x":8,"y":9},"name":"refined-concrete"},{"position":{"x":8,"y":10},"name":"refined-concrete"},{"position":{"x":8,"y":11},"name":"refined-concrete"},{"position":{"x":9,"y":-12},"name":"refined-concrete"},{"position":{"x":9,"y":-11},"name":"refined-concrete"},{"position":{"x":9,"y":-10},"name":"refined-concrete"},{"position":{"x":9,"y":-9},"name":"refined-concrete"},{"position":{"x":9,"y":-8},"name":"refined-concrete"},{"position":{"x":9,"y":-7},"name":"refined-concrete"},{"position":{"x":9,"y":-6},"name":"refined-concrete"},{"position":{"x":9,"y":-5},"name":"refined-concrete"},{"position":{"x":9,"y":-4},"name":"refined-concrete"},{"position":{"x":9,"y":-3},"name":"refined-concrete"},{"position":{"x":9,"y":-2},"name":"refined-concrete"},{"position":{"x":9,"y":-1},"name":"refined-concrete"},{"position":{"x":9,"y":0},"name":"refined-concrete"},{"position":{"x":9,"y":1},"name":"refined-concrete"},{"position":{"x":9,"y":2},"name":"refined-concrete"},{"position":{"x":9,"y":3},"name":"refined-concrete"},{"position":{"x":9,"y":4},"name":"refined-concrete"},{"position":{"x":9,"y":5},"name":"refined-concrete"},{"position":{"x":9,"y":6},"name":"refined-concrete"},{"position":{"x":9,"y":7},"name":"refined-concrete"},{"position":{"x":9,"y":8},"name":"refined-concrete"},{"position":{"x":9,"y":9},"name":"refined-concrete"},{"position":{"x":9,"y":10},"name":"refined-concrete"},{"position":{"x":9,"y":11},"name":"refined-concrete"},{"position":{"x":10,"y":-12},"name":"refined-concrete"},{"position":{"x":10,"y":-11},"name":"refined-concrete"},{"position":{"x":10,"y":-10},"name":"refined-concrete"},{"position":{"x":10,"y":-9},"name":"refined-concrete"},{"position":{"x":10,"y":-8},"name":"refined-concrete"},{"position":{"x":10,"y":-7},"name":"refined-concrete"},{"position":{"x":10,"y":-6},"name":"refined-concrete"},{"position":{"x":10,"y":-5},"name":"refined-concrete"},{"position":{"x":10,"y":-4},"name":"refined-concrete"},{"position":{"x":10,"y":-3},"name":"refined-concrete"},{"position":{"x":10,"y":-2},"name":"refined-concrete"},{"position":{"x":10,"y":-1},"name":"refined-concrete"},{"position":{"x":10,"y":0},"name":"refined-concrete"},{"position":{"x":10,"y":1},"name":"refined-concrete"},{"position":{"x":10,"y":2},"name":"refined-concrete"},{"position":{"x":10,"y":3},"name":"refined-concrete"},{"position":{"x":10,"y":4},"name":"refined-concrete"},{"position":{"x":10,"y":5},"name":"refined-concrete"},{"position":{"x":10,"y":6},"name":"refined-concrete"},{"position":{"x":10,"y":7},"name":"refined-concrete"},{"position":{"x":10,"y":8},"name":"refined-concrete"},{"position":{"x":10,"y":9},"name":"refined-concrete"},{"position":{"x":10,"y":10},"name":"refined-concrete"},{"position":{"x":10,"y":11},"name":"refined-concrete"},{"position":{"x":11,"y":-12},"name":"refined-concrete"},{"position":{"x":11,"y":-11},"name":"refined-concrete"},{"position":{"x":11,"y":-10},"name":"refined-concrete"},{"position":{"x":11,"y":-9},"name":"refined-concrete"},{"position":{"x":11,"y":-8},"name":"refined-concrete"},{"position":{"x":11,"y":-7},"name":"refined-concrete"},{"position":{"x":11,"y":-6},"name":"refined-concrete"},{"position":{"x":11,"y":-5},"name":"refined-concrete"},{"position":{"x":11,"y":-4},"name":"refined-concrete"},{"position":{"x":11,"y":-3},"name":"refined-concrete"},{"position":{"x":11,"y":-2},"name":"refined-concrete"},{"position":{"x":11,"y":-1},"name":"refined-concrete"},{"position":{"x":11,"y":0},"name":"refined-concrete"},{"position":{"x":11,"y":1},"name":"refined-concrete"},{"position":{"x":11,"y":2},"name":"refined-concrete"},{"position":{"x":11,"y":3},"name":"refined-concrete"},{"position":{"x":11,"y":4},"name":"refined-concrete"},{"position":{"x":11,"y":5},"name":"refined-concrete"},{"position":{"x":11,"y":6},"name":"refined-concrete"},{"position":{"x":11,"y":7},"name":"refined-concrete"},{"position":{"x":11,"y":8},"name":"refined-concrete"},{"position":{"x":11,"y":9},"name":"refined-concrete"},{"position":{"x":11,"y":10},"name":"refined-concrete"},{"position":{"x":11,"y":11},"name":"refined-concrete"},{"position":{"x":12,"y":-12},"name":"refined-concrete"},{"position":{"x":12,"y":-11},"name":"refined-concrete"},{"position":{"x":12,"y":-10},"name":"refined-concrete"},{"position":{"x":12,"y":-9},"name":"refined-concrete"},{"position":{"x":12,"y":-8},"name":"refined-concrete"},{"position":{"x":12,"y":-7},"name":"refined-concrete"},{"position":{"x":12,"y":-6},"name":"refined-concrete"},{"position":{"x":12,"y":-5},"name":"refined-concrete"},{"position":{"x":12,"y":-4},"name":"refined-concrete"},{"position":{"x":12,"y":-3},"name":"refined-concrete"},{"position":{"x":12,"y":-2},"name":"refined-concrete"},{"position":{"x":12,"y":-1},"name":"refined-concrete"},{"position":{"x":12,"y":0},"name":"refined-concrete"},{"position":{"x":12,"y":1},"name":"refined-concrete"},{"position":{"x":12,"y":2},"name":"refined-concrete"},{"position":{"x":12,"y":3},"name":"refined-concrete"},{"position":{"x":12,"y":4},"name":"refined-concrete"},{"position":{"x":12,"y":5},"name":"refined-concrete"},{"position":{"x":12,"y":6},"name":"refined-concrete"},{"position":{"x":12,"y":7},"name":"refined-concrete"},{"position":{"x":12,"y":8},"name":"refined-concrete"},{"position":{"x":12,"y":9},"name":"refined-concrete"},{"position":{"x":12,"y":10},"name":"refined-concrete"},{"position":{"x":12,"y":11},"name":"refined-concrete"},{"position":{"x":13,"y":-11},"name":"refined-concrete"},{"position":{"x":13,"y":-10},"name":"refined-concrete"},{"position":{"x":13,"y":-9},"name":"refined-concrete"},{"position":{"x":13,"y":-8},"name":"refined-concrete"},{"position":{"x":13,"y":-7},"name":"refined-concrete"},{"position":{"x":13,"y":-6},"name":"refined-concrete"},{"position":{"x":13,"y":-5},"name":"refined-concrete"},{"position":{"x":13,"y":-4},"name":"refined-concrete"},{"position":{"x":13,"y":-3},"name":"refined-concrete"},{"position":{"x":13,"y":-2},"name":"refined-concrete"},{"position":{"x":13,"y":-1},"name":"refined-concrete"},{"position":{"x":13,"y":0},"name":"refined-concrete"},{"position":{"x":13,"y":1},"name":"refined-concrete"},{"position":{"x":13,"y":2},"name":"refined-concrete"},{"position":{"x":13,"y":3},"name":"refined-concrete"},{"position":{"x":13,"y":4},"name":"refined-concrete"},{"position":{"x":13,"y":5},"name":"refined-concrete"},{"position":{"x":13,"y":6},"name":"refined-concrete"},{"position":{"x":13,"y":7},"name":"refined-concrete"},{"position":{"x":13,"y":8},"name":"refined-concrete"},{"position":{"x":13,"y":9},"name":"refined-concrete"},{"position":{"x":13,"y":10},"name":"refined-concrete"},{"position":{"x":14,"y":-8},"name":"refined-concrete"},{"position":{"x":14,"y":-7},"name":"refined-concrete"},{"position":{"x":14,"y":-6},"name":"refined-concrete"},{"position":{"x":14,"y":-5},"name":"refined-concrete"},{"position":{"x":14,"y":-4},"name":"refined-concrete"},{"position":{"x":14,"y":-3},"name":"refined-concrete"},{"position":{"x":14,"y":-2},"name":"refined-concrete"},{"position":{"x":14,"y":-1},"name":"refined-concrete"},{"position":{"x":14,"y":0},"name":"refined-concrete"},{"position":{"x":14,"y":1},"name":"refined-concrete"},{"position":{"x":14,"y":2},"name":"refined-concrete"},{"position":{"x":14,"y":3},"name":"refined-concrete"},{"position":{"x":14,"y":4},"name":"refined-concrete"},{"position":{"x":14,"y":5},"name":"refined-concrete"},{"position":{"x":14,"y":6},"name":"refined-concrete"},{"position":{"x":14,"y":7},"name":"refined-concrete"},{"position":{"x":14,"y":8},"name":"refined-concrete"},{"position":{"x":15,"y":-7},"name":"refined-concrete"},{"position":{"x":15,"y":-6},"name":"refined-concrete"},{"position":{"x":15,"y":-5},"name":"refined-concrete"},{"position":{"x":15,"y":-4},"name":"refined-concrete"},{"position":{"x":15,"y":-3},"name":"refined-concrete"},{"position":{"x":15,"y":-2},"name":"refined-concrete"},{"position":{"x":15,"y":-1},"name":"refined-concrete"},{"position":{"x":15,"y":0},"name":"refined-concrete"},{"position":{"x":15,"y":1},"name":"refined-concrete"},{"position":{"x":15,"y":2},"name":"refined-concrete"},{"position":{"x":15,"y":3},"name":"refined-concrete"},{"position":{"x":15,"y":4},"name":"refined-concrete"},{"position":{"x":15,"y":5},"name":"refined-concrete"},{"position":{"x":15,"y":6},"name":"refined-concrete"},{"position":{"x":15,"y":7},"name":"refined-concrete"},{"position":{"x":16,"y":-1},"name":"refined-concrete"},{"position":{"x":16,"y":1},"name":"refined-concrete"},{"position":{"x":16,"y":2},"name":"refined-concrete"},{"position":{"x":16,"y":3},"name":"refined-concrete"},{"position":{"x":16,"y":4},"name":"refined-concrete"},{"position":{"x":16,"y":5},"name":"refined-concrete"},{"position":{"x":16,"y":6},"name":"refined-concrete"}],"item":"blueprint","version":73018507264}}' diff --git a/maps/tank_conquest/blueprint_poi_spot_one_json.lua b/maps/tank_conquest/blueprint_poi_spot_one_json.lua deleted file mode 100644 index 96b26b8eb..000000000 --- a/maps/tank_conquest/blueprint_poi_spot_one_json.lua +++ /dev/null @@ -1 +0,0 @@ -return '{"blueprint":{"icons":[{"signal":{"type":"item","name":"land-mine"},"index":1},{"signal":{"type":"item","name":"stone-wall"},"index":2}],"entities":[{"entity_number":1,"name":"land-mine","position":{"x":-6.9765625,"y":-11.23828125}},{"entity_number":2,"name":"land-mine","position":{"x":-5.2265625,"y":-11.21875}},{"entity_number":3,"name":"stone-wall","position":{"x":-5,"y":-12}},{"entity_number":4,"name":"stone-wall","position":{"x":-3,"y":-12}},{"entity_number":5,"name":"land-mine","position":{"x":-2.01171875,"y":-12.2734375}},{"entity_number":6,"name":"land-mine","position":{"x":-1.14453125,"y":-11.125}},{"entity_number":7,"name":"land-mine","position":{"x":-0.18359375,"y":-12.2734375}},{"entity_number":8,"name":"stone-wall","position":{"x":-1,"y":-12}},{"entity_number":9,"name":"stone-wall","position":{"x":1,"y":-12}},{"entity_number":10,"name":"land-mine","position":{"x":2.25390625,"y":-12.2734375}},{"entity_number":11,"name":"stone-wall","position":{"x":3,"y":-12}},{"entity_number":12,"name":"land-mine","position":{"x":4.08203125,"y":-12.2734375}},{"entity_number":13,"name":"land-mine","position":{"x":5.12890625,"y":-11.2734375}},{"entity_number":14,"name":"stone-wall","position":{"x":5,"y":-12}},{"entity_number":15,"name":"land-mine","position":{"x":5.91015625,"y":-12.2734375}},{"entity_number":16,"name":"land-mine","position":{"x":7.73828125,"y":-12.2734375}},{"entity_number":17,"name":"stone-wall","position":{"x":7,"y":-12}},{"entity_number":18,"name":"stone-wall","position":{"x":9,"y":-12}},{"entity_number":19,"name":"land-mine","position":{"x":10.890625,"y":-11.30859375}},{"entity_number":20,"name":"land-mine","position":{"x":10.17578125,"y":-12.2734375}},{"entity_number":21,"name":"stone-wall","position":{"x":11,"y":-12}},{"entity_number":22,"name":"land-mine","position":{"x":-10.00390625,"y":-10.16015625}},{"entity_number":23,"name":"stone-wall","position":{"x":-9,"y":-10}},{"entity_number":24,"name":"land-mine","position":{"x":-8.03125,"y":-10.01171875}},{"entity_number":25,"name":"stone-wall","position":{"x":-8,"y":-11}},{"entity_number":26,"name":"stone-wall","position":{"x":-7,"y":-10}},{"entity_number":27,"name":"land-mine","position":{"x":-5.89453125,"y":-10.171875}},{"entity_number":28,"name":"stone-wall","position":{"x":-6,"y":-11}},{"entity_number":29,"name":"land-mine","position":{"x":-4.9296875,"y":-9.23828125}},{"entity_number":30,"name":"stone-wall","position":{"x":-5,"y":-10}},{"entity_number":31,"name":"land-mine","position":{"x":-4.06640625,"y":-10.171875}},{"entity_number":32,"name":"land-mine","position":{"x":-3.2734375,"y":-9.23828125}},{"entity_number":33,"name":"stone-wall","position":{"x":-4,"y":-11}},{"entity_number":34,"name":"land-mine","position":{"x":-2.23828125,"y":-10.171875}},{"entity_number":35,"name":"stone-wall","position":{"x":-3,"y":-10}},{"entity_number":36,"name":"stone-wall","position":{"x":-2,"y":-11}},{"entity_number":37,"name":"stone-wall","position":{"x":-1,"y":-10}},{"entity_number":38,"name":"land-mine","position":{"x":0.19921875,"y":-10.171875}},{"entity_number":39,"name":"stone-wall","position":{"x":0,"y":-11}},{"entity_number":40,"name":"stone-wall","position":{"x":1,"y":-10}},{"entity_number":41,"name":"land-mine","position":{"x":2.02734375,"y":-10.171875}},{"entity_number":42,"name":"stone-wall","position":{"x":2,"y":-11}},{"entity_number":43,"name":"land-mine","position":{"x":3.12109375,"y":-10.96484375}},{"entity_number":44,"name":"stone-wall","position":{"x":3,"y":-10}},{"entity_number":45,"name":"land-mine","position":{"x":4.30078125,"y":-9.7578125}},{"entity_number":46,"name":"stone-wall","position":{"x":4,"y":-11}},{"entity_number":47,"name":"stone-wall","position":{"x":5,"y":-10}},{"entity_number":48,"name":"land-mine","position":{"x":6.05078125,"y":-9.82421875}},{"entity_number":49,"name":"stone-wall","position":{"x":6,"y":-11}},{"entity_number":50,"name":"land-mine","position":{"x":7.11328125,"y":-10.91796875}},{"entity_number":51,"name":"stone-wall","position":{"x":7,"y":-10}},{"entity_number":52,"name":"land-mine","position":{"x":7.98046875,"y":-10.171875}},{"entity_number":53,"name":"land-mine","position":{"x":8.6953125,"y":-9.13671875}},{"entity_number":54,"name":"stone-wall","position":{"x":8,"y":-11}},{"entity_number":55,"name":"land-mine","position":{"x":8.9921875,"y":-10.89453125}},{"entity_number":56,"name":"stone-wall","position":{"x":9,"y":-10}},{"entity_number":57,"name":"land-mine","position":{"x":10.109375,"y":-10.05859375}},{"entity_number":58,"name":"stone-wall","position":{"x":10,"y":-11}},{"entity_number":59,"name":"land-mine","position":{"x":10.91015625,"y":-9.23828125}},{"entity_number":60,"name":"stone-wall","position":{"x":11,"y":-10}},{"entity_number":61,"name":"stone-wall","position":{"x":12,"y":-11}},{"entity_number":62,"name":"land-mine","position":{"x":-11.2890625,"y":-7.23828125}},{"entity_number":63,"name":"stone-wall","position":{"x":-11,"y":-8}},{"entity_number":64,"name":"land-mine","position":{"x":-9.984375,"y":-7.9453125}},{"entity_number":65,"name":"stone-wall","position":{"x":-10,"y":-9}},{"entity_number":66,"name":"land-mine","position":{"x":-9.01171875,"y":-8.7578125}},{"entity_number":67,"name":"stone-wall","position":{"x":-9,"y":-8}},{"entity_number":68,"name":"stone-wall","position":{"x":-8,"y":-9}},{"entity_number":69,"name":"stone-wall","position":{"x":-8,"y":-8}},{"entity_number":70,"name":"land-mine","position":{"x":-6.7578125,"y":-9.06640625}},{"entity_number":71,"name":"stone-wall","position":{"x":-7,"y":-8}},{"entity_number":72,"name":"stone-wall","position":{"x":-6,"y":-9}},{"entity_number":73,"name":"stone-wall","position":{"x":-6,"y":-8}},{"entity_number":74,"name":"stone-wall","position":{"x":-5,"y":-8}},{"entity_number":75,"name":"stone-wall","position":{"x":-4,"y":-9}},{"entity_number":76,"name":"stone-wall","position":{"x":-4,"y":-8}},{"entity_number":77,"name":"stone-wall","position":{"x":-3,"y":-8}},{"entity_number":78,"name":"stone-wall","position":{"x":-2,"y":-9}},{"entity_number":79,"name":"stone-wall","position":{"x":-2,"y":-8}},{"entity_number":80,"name":"land-mine","position":{"x":-0.90625,"y":-9.06640625}},{"entity_number":81,"name":"stone-wall","position":{"x":-1,"y":-8}},{"entity_number":82,"name":"stone-wall","position":{"x":0,"y":-9}},{"entity_number":83,"name":"stone-wall","position":{"x":0,"y":-8}},{"entity_number":84,"name":"land-mine","position":{"x":0.921875,"y":-9.06640625}},{"entity_number":85,"name":"stone-wall","position":{"x":1,"y":-8}},{"entity_number":86,"name":"land-mine","position":{"x":2.75,"y":-9.06640625}},{"entity_number":87,"name":"stone-wall","position":{"x":2,"y":-9}},{"entity_number":88,"name":"stone-wall","position":{"x":2,"y":-8}},{"entity_number":89,"name":"stone-wall","position":{"x":3,"y":-8}},{"entity_number":90,"name":"stone-wall","position":{"x":4,"y":-9}},{"entity_number":91,"name":"stone-wall","position":{"x":4,"y":-8}},{"entity_number":92,"name":"land-mine","position":{"x":5.1875,"y":-9.06640625}},{"entity_number":93,"name":"stone-wall","position":{"x":5,"y":-8}},{"entity_number":94,"name":"stone-wall","position":{"x":6,"y":-9}},{"entity_number":95,"name":"stone-wall","position":{"x":6,"y":-8}},{"entity_number":96,"name":"land-mine","position":{"x":7.015625,"y":-9.06640625}},{"entity_number":97,"name":"stone-wall","position":{"x":7,"y":-8}},{"entity_number":98,"name":"stone-wall","position":{"x":8,"y":-9}},{"entity_number":99,"name":"stone-wall","position":{"x":8,"y":-8}},{"entity_number":100,"name":"stone-wall","position":{"x":9,"y":-8}},{"entity_number":101,"name":"land-mine","position":{"x":10.09765625,"y":-7.82421875}},{"entity_number":102,"name":"stone-wall","position":{"x":10,"y":-9}},{"entity_number":103,"name":"stone-wall","position":{"x":11,"y":-8}},{"entity_number":104,"name":"land-mine","position":{"x":11.90234375,"y":-8.13671875}},{"entity_number":105,"name":"land-mine","position":{"x":-11.73828125,"y":-5.71875}},{"entity_number":106,"name":"stone-wall","position":{"x":-12,"y":-7}},{"entity_number":107,"name":"stone-wall","position":{"x":-11,"y":-6}},{"entity_number":108,"name":"land-mine","position":{"x":-9.11328125,"y":-6.99609375}},{"entity_number":109,"name":"land-mine","position":{"x":-9.11328125,"y":-5.3046875}},{"entity_number":110,"name":"land-mine","position":{"x":-9.91015625,"y":-6.1328125}},{"entity_number":111,"name":"stone-wall","position":{"x":-10,"y":-7}},{"entity_number":112,"name":"stone-wall","position":{"x":-9,"y":-6}},{"entity_number":113,"name":"stone-wall","position":{"x":-8,"y":-7}},{"entity_number":114,"name":"stone-wall","position":{"x":-8,"y":-6}},{"entity_number":115,"name":"solar-panel","position":{"x":-2,"y":-5}},{"entity_number":116,"name":"solar-panel","position":{"x":1,"y":-5}},{"entity_number":117,"name":"infinity-chest","position":{"x":4,"y":-6},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"cannon-shell","count":1,"mode":"at-least","index":1}]}},{"entity_number":118,"name":"infinity-chest","position":{"x":5,"y":-6},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"grenade","count":1,"mode":"at-least","index":1}]}},{"entity_number":119,"name":"stone-wall","position":{"x":9,"y":-7}},{"entity_number":120,"name":"stone-wall","position":{"x":9,"y":-6}},{"entity_number":121,"name":"land-mine","position":{"x":10.09765625,"y":-5.99609375}},{"entity_number":122,"name":"stone-wall","position":{"x":10,"y":-7}},{"entity_number":123,"name":"land-mine","position":{"x":11.015625,"y":-6.80078125}},{"entity_number":124,"name":"stone-wall","position":{"x":11,"y":-6}},{"entity_number":125,"name":"land-mine","position":{"x":11.98828125,"y":-6.06640625}},{"entity_number":126,"name":"stone-wall","position":{"x":12,"y":-7}},{"entity_number":127,"name":"land-mine","position":{"x":12.97265625,"y":-5.5703125}},{"entity_number":128,"name":"land-mine","position":{"x":-11.703125,"y":-4.16796875}},{"entity_number":129,"name":"stone-wall","position":{"x":-12,"y":-5}},{"entity_number":130,"name":"land-mine","position":{"x":-10.88671875,"y":-4.90234375}},{"entity_number":131,"name":"stone-wall","position":{"x":-11,"y":-4}},{"entity_number":132,"name":"land-mine","position":{"x":-9.875,"y":-4.0625}},{"entity_number":133,"name":"stone-wall","position":{"x":-10,"y":-5}},{"entity_number":134,"name":"land-mine","position":{"x":-9.046875,"y":-3.3046875}},{"entity_number":135,"name":"stone-wall","position":{"x":-9,"y":-4}},{"entity_number":136,"name":"stone-wall","position":{"x":-8,"y":-5}},{"entity_number":137,"name":"stone-wall","position":{"x":-8,"y":-4}},{"entity_number":138,"name":"inserter","position":{"x":-7,"y":-4}},{"entity_number":139,"name":"infinity-chest","position":{"x":-7,"y":-5},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":140,"name":"wooden-chest","position":{"x":4,"y":-4},"bar":1},{"entity_number":141,"name":"inserter","position":{"x":4,"y":-5}},{"entity_number":142,"name":"wooden-chest","position":{"x":5,"y":-4},"bar":1},{"entity_number":143,"name":"inserter","position":{"x":5,"y":-5}},{"entity_number":144,"name":"stone-wall","position":{"x":9,"y":-5}},{"entity_number":145,"name":"stone-wall","position":{"x":9,"y":-4}},{"entity_number":146,"name":"land-mine","position":{"x":10.09765625,"y":-4.16796875}},{"entity_number":147,"name":"stone-wall","position":{"x":10,"y":-5}},{"entity_number":148,"name":"land-mine","position":{"x":11.015625,"y":-3.14453125}},{"entity_number":149,"name":"land-mine","position":{"x":11.015625,"y":-4.97265625}},{"entity_number":150,"name":"stone-wall","position":{"x":11,"y":-4}},{"entity_number":151,"name":"land-mine","position":{"x":12.25,"y":-4.15625}},{"entity_number":152,"name":"stone-wall","position":{"x":12,"y":-5}},{"entity_number":153,"name":"land-mine","position":{"x":13.109375,"y":-4.7109375}},{"entity_number":154,"name":"land-mine","position":{"x":13.1796875,"y":-3.2734375}},{"entity_number":155,"name":"stone-wall","position":{"x":13,"y":-4}},{"entity_number":156,"name":"land-mine","position":{"x":-12.3046875,"y":-1.7890625}},{"entity_number":157,"name":"stone-wall","position":{"x":-12,"y":-3}},{"entity_number":158,"name":"land-mine","position":{"x":-10.640625,"y":-2.1953125}},{"entity_number":159,"name":"stone-wall","position":{"x":-10,"y":-3}},{"entity_number":160,"name":"stone-wall","position":{"x":-9,"y":-2}},{"entity_number":161,"name":"stone-wall","position":{"x":-8,"y":-3}},{"entity_number":162,"name":"stone-wall","position":{"x":-8,"y":-2}},{"entity_number":163,"name":"gun-turret","position":{"x":-6.5,"y":-2.5}},{"entity_number":164,"name":"gun-turret","position":{"x":7.5,"y":-2.5}},{"entity_number":165,"name":"stone-wall","position":{"x":9,"y":-3}},{"entity_number":166,"name":"stone-wall","position":{"x":9,"y":-2}},{"entity_number":167,"name":"land-mine","position":{"x":10.09765625,"y":-1.73046875}},{"entity_number":168,"name":"stone-wall","position":{"x":10,"y":-3}},{"entity_number":169,"name":"stone-wall","position":{"x":11,"y":-2}},{"entity_number":170,"name":"land-mine","position":{"x":11.96484375,"y":-2.125}},{"entity_number":171,"name":"stone-wall","position":{"x":12,"y":-3}},{"entity_number":172,"name":"stone-wall","position":{"x":13,"y":-2}},{"entity_number":173,"name":"land-mine","position":{"x":-12.3046875,"y":0.08203125}},{"entity_number":174,"name":"land-mine","position":{"x":-12.40625,"y":-0.765625}},{"entity_number":175,"name":"land-mine","position":{"x":-10.6640625,"y":0.75}},{"entity_number":176,"name":"land-mine","position":{"x":-10.6640625,"y":-0.2265625}},{"entity_number":177,"name":"land-mine","position":{"x":-10.71484375,"y":-1.0703125}},{"entity_number":178,"name":"land-mine","position":{"x":-9.203125,"y":0.671875}},{"entity_number":179,"name":"land-mine","position":{"x":-9.27734375,"y":-0.17578125}},{"entity_number":180,"name":"land-mine","position":{"x":-9.3828125,"y":-0.99609375}},{"entity_number":181,"name":"gate","position":{"x":-8,"y":0}},{"entity_number":182,"name":"gate","position":{"x":-8,"y":-1}},{"entity_number":183,"name":"accumulator","position":{"x":-1.5,"y":0.5}},{"entity_number":184,"name":"substation","position":{"x":0.5,"y":0.5}},{"entity_number":185,"name":"accumulator","position":{"x":2.5,"y":0.5}},{"entity_number":186,"name":"inserter","position":{"x":8,"y":-1},"direction":4},{"entity_number":187,"name":"infinity-chest","position":{"x":8,"y":0},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":188,"name":"stone-wall","position":{"x":9,"y":-1}},{"entity_number":189,"name":"stone-wall","position":{"x":9,"y":0}},{"entity_number":190,"name":"land-mine","position":{"x":9.92578125,"y":-0.0703125}},{"entity_number":191,"name":"stone-wall","position":{"x":10,"y":-1}},{"entity_number":192,"name":"land-mine","position":{"x":11.015625,"y":-0.70703125}},{"entity_number":193,"name":"stone-wall","position":{"x":11,"y":0}},{"entity_number":194,"name":"land-mine","position":{"x":12.14453125,"y":0.19140625}},{"entity_number":195,"name":"stone-wall","position":{"x":12,"y":-1}},{"entity_number":196,"name":"land-mine","position":{"x":-12.17578125,"y":2.7734375}},{"entity_number":197,"name":"land-mine","position":{"x":-12.17578125,"y":1.875}},{"entity_number":198,"name":"land-mine","position":{"x":-12.2265625,"y":0.9296875}},{"entity_number":199,"name":"land-mine","position":{"x":-10.61328125,"y":2.390625}},{"entity_number":200,"name":"land-mine","position":{"x":-10.6640625,"y":1.5703125}},{"entity_number":201,"name":"land-mine","position":{"x":-9.1484375,"y":2.4921875}},{"entity_number":202,"name":"land-mine","position":{"x":-9.1484375,"y":1.59375}},{"entity_number":203,"name":"gate","position":{"x":-8,"y":2}},{"entity_number":204,"name":"gate","position":{"x":-8,"y":1}},{"entity_number":205,"name":"infinity-chest","position":{"x":8,"y":2},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":206,"name":"stone-wall","position":{"x":9,"y":1}},{"entity_number":207,"name":"stone-wall","position":{"x":9,"y":2}},{"entity_number":208,"name":"land-mine","position":{"x":10.09765625,"y":1.92578125}},{"entity_number":209,"name":"stone-wall","position":{"x":10,"y":1}},{"entity_number":210,"name":"land-mine","position":{"x":11.015625,"y":1.12109375}},{"entity_number":211,"name":"stone-wall","position":{"x":11,"y":2}},{"entity_number":212,"name":"land-mine","position":{"x":11.98828125,"y":1.95703125}},{"entity_number":213,"name":"stone-wall","position":{"x":12,"y":1}},{"entity_number":214,"name":"land-mine","position":{"x":13.1796875,"y":2.8203125}},{"entity_number":215,"name":"land-mine","position":{"x":-11.234375,"y":4.8671875}},{"entity_number":216,"name":"land-mine","position":{"x":-10.71484375,"y":3.234375}},{"entity_number":217,"name":"stone-wall","position":{"x":-11,"y":4}},{"entity_number":218,"name":"stone-wall","position":{"x":-9,"y":4}},{"entity_number":219,"name":"gate","position":{"x":-8,"y":3}},{"entity_number":220,"name":"stone-wall","position":{"x":-8,"y":4}},{"entity_number":221,"name":"gun-turret","position":{"x":-6.5,"y":4.5}},{"entity_number":222,"name":"inserter","position":{"x":8,"y":3}},{"entity_number":223,"name":"gun-turret","position":{"x":7.5,"y":4.5}},{"entity_number":224,"name":"stone-wall","position":{"x":9,"y":3}},{"entity_number":225,"name":"stone-wall","position":{"x":9,"y":4}},{"entity_number":226,"name":"land-mine","position":{"x":9.92578125,"y":3.94140625}},{"entity_number":227,"name":"stone-wall","position":{"x":10,"y":3}},{"entity_number":228,"name":"land-mine","position":{"x":11.8359375,"y":3.7421875}},{"entity_number":229,"name":"land-mine","position":{"x":11.015625,"y":4.77734375}},{"entity_number":230,"name":"land-mine","position":{"x":11.015625,"y":2.94921875}},{"entity_number":231,"name":"stone-wall","position":{"x":11,"y":4}},{"entity_number":232,"name":"stone-wall","position":{"x":12,"y":3}},{"entity_number":233,"name":"stone-wall","position":{"x":13,"y":4}},{"entity_number":234,"name":"stone-wall","position":{"x":-11,"y":6}},{"entity_number":235,"name":"land-mine","position":{"x":-9.86328125,"y":5.70703125}},{"entity_number":236,"name":"stone-wall","position":{"x":-10,"y":5}},{"entity_number":237,"name":"land-mine","position":{"x":-8.9296875,"y":5.1875}},{"entity_number":238,"name":"stone-wall","position":{"x":-9,"y":6}},{"entity_number":239,"name":"stone-wall","position":{"x":-8,"y":5}},{"entity_number":240,"name":"stone-wall","position":{"x":-8,"y":6}},{"entity_number":241,"name":"inserter","position":{"x":-7,"y":6},"direction":4},{"entity_number":242,"name":"solar-panel","position":{"x":-2,"y":6}},{"entity_number":243,"name":"solar-panel","position":{"x":1,"y":6}},{"entity_number":244,"name":"wooden-chest","position":{"x":4,"y":5},"bar":1},{"entity_number":245,"name":"inserter","position":{"x":4,"y":6},"direction":4},{"entity_number":246,"name":"wooden-chest","position":{"x":5,"y":5},"bar":1},{"entity_number":247,"name":"inserter","position":{"x":5,"y":6},"direction":4},{"entity_number":248,"name":"stone-wall","position":{"x":9,"y":5}},{"entity_number":249,"name":"stone-wall","position":{"x":9,"y":6}},{"entity_number":250,"name":"land-mine","position":{"x":10.09765625,"y":6.19140625}},{"entity_number":251,"name":"stone-wall","position":{"x":10,"y":5}},{"entity_number":252,"name":"land-mine","position":{"x":11.89453125,"y":5.99609375}},{"entity_number":253,"name":"stone-wall","position":{"x":11,"y":6}},{"entity_number":254,"name":"stone-wall","position":{"x":12,"y":5}},{"entity_number":255,"name":"stone-wall","position":{"x":13,"y":6}},{"entity_number":256,"name":"land-mine","position":{"x":-12.2109375,"y":7.5}},{"entity_number":257,"name":"land-mine","position":{"x":-11.31640625,"y":7.22265625}},{"entity_number":258,"name":"stone-wall","position":{"x":-11,"y":8}},{"entity_number":259,"name":"land-mine","position":{"x":-9.96484375,"y":7.70703125}},{"entity_number":260,"name":"stone-wall","position":{"x":-10,"y":7}},{"entity_number":261,"name":"land-mine","position":{"x":-9.06640625,"y":7.29296875}},{"entity_number":262,"name":"stone-wall","position":{"x":-9,"y":8}},{"entity_number":263,"name":"stone-wall","position":{"x":-8,"y":7}},{"entity_number":264,"name":"stone-wall","position":{"x":-8,"y":8}},{"entity_number":265,"name":"infinity-chest","position":{"x":-7,"y":7},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":266,"name":"infinity-chest","position":{"x":4,"y":7},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"wood","count":1,"mode":"at-least","index":1}]}},{"entity_number":267,"name":"infinity-chest","position":{"x":5,"y":7},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"raw-fish","count":1,"mode":"at-least","index":1}]}},{"entity_number":268,"name":"stone-wall","position":{"x":9,"y":7}},{"entity_number":269,"name":"stone-wall","position":{"x":9,"y":8}},{"entity_number":270,"name":"land-mine","position":{"x":10.09765625,"y":8.01953125}},{"entity_number":271,"name":"stone-wall","position":{"x":10,"y":7}},{"entity_number":272,"name":"land-mine","position":{"x":11.015625,"y":7.21484375}},{"entity_number":273,"name":"stone-wall","position":{"x":11,"y":8}},{"entity_number":274,"name":"land-mine","position":{"x":12.0078125,"y":7.7109375}},{"entity_number":275,"name":"stone-wall","position":{"x":12,"y":7}},{"entity_number":276,"name":"land-mine","position":{"x":-11.9375,"y":10.12109375}},{"entity_number":277,"name":"land-mine","position":{"x":-11.1328125,"y":9}},{"entity_number":278,"name":"stone-wall","position":{"x":-12,"y":9}},{"entity_number":279,"name":"stone-wall","position":{"x":-11,"y":10}},{"entity_number":280,"name":"land-mine","position":{"x":-9.89453125,"y":9.8125}},{"entity_number":281,"name":"stone-wall","position":{"x":-10,"y":9}},{"entity_number":282,"name":"land-mine","position":{"x":-9.06640625,"y":9.08984375}},{"entity_number":283,"name":"land-mine","position":{"x":-8.2421875,"y":9.984375}},{"entity_number":284,"name":"stone-wall","position":{"x":-9,"y":10}},{"entity_number":285,"name":"stone-wall","position":{"x":-8,"y":9}},{"entity_number":286,"name":"stone-wall","position":{"x":-7,"y":10}},{"entity_number":287,"name":"stone-wall","position":{"x":-7,"y":9}},{"entity_number":288,"name":"land-mine","position":{"x":-5.8046875,"y":9.984375}},{"entity_number":289,"name":"stone-wall","position":{"x":-6,"y":9}},{"entity_number":290,"name":"stone-wall","position":{"x":-5,"y":10}},{"entity_number":291,"name":"stone-wall","position":{"x":-5,"y":9}},{"entity_number":292,"name":"land-mine","position":{"x":-3.9765625,"y":9.984375}},{"entity_number":293,"name":"stone-wall","position":{"x":-4,"y":9}},{"entity_number":294,"name":"land-mine","position":{"x":-2.1484375,"y":9.984375}},{"entity_number":295,"name":"stone-wall","position":{"x":-3,"y":10}},{"entity_number":296,"name":"stone-wall","position":{"x":-3,"y":9}},{"entity_number":297,"name":"stone-wall","position":{"x":-2,"y":9}},{"entity_number":298,"name":"stone-wall","position":{"x":-1,"y":10}},{"entity_number":299,"name":"stone-wall","position":{"x":-1,"y":9}},{"entity_number":300,"name":"land-mine","position":{"x":0.2890625,"y":9.984375}},{"entity_number":301,"name":"stone-wall","position":{"x":0,"y":9}},{"entity_number":302,"name":"stone-wall","position":{"x":1,"y":10}},{"entity_number":303,"name":"stone-wall","position":{"x":1,"y":9}},{"entity_number":304,"name":"land-mine","position":{"x":2.1171875,"y":9.984375}},{"entity_number":305,"name":"stone-wall","position":{"x":2,"y":9}},{"entity_number":306,"name":"stone-wall","position":{"x":3,"y":10}},{"entity_number":307,"name":"stone-wall","position":{"x":3,"y":9}},{"entity_number":308,"name":"land-mine","position":{"x":3.9453125,"y":9.984375}},{"entity_number":309,"name":"stone-wall","position":{"x":4,"y":9}},{"entity_number":310,"name":"land-mine","position":{"x":5.7734375,"y":9.984375}},{"entity_number":311,"name":"stone-wall","position":{"x":5,"y":10}},{"entity_number":312,"name":"stone-wall","position":{"x":5,"y":9}},{"entity_number":313,"name":"stone-wall","position":{"x":6,"y":9}},{"entity_number":314,"name":"stone-wall","position":{"x":7,"y":10}},{"entity_number":315,"name":"stone-wall","position":{"x":7,"y":9}},{"entity_number":316,"name":"land-mine","position":{"x":8.2109375,"y":9.984375}},{"entity_number":317,"name":"stone-wall","position":{"x":8,"y":9}},{"entity_number":318,"name":"stone-wall","position":{"x":9,"y":10}},{"entity_number":319,"name":"stone-wall","position":{"x":9,"y":9}},{"entity_number":320,"name":"land-mine","position":{"x":10.07421875,"y":9.984375}},{"entity_number":321,"name":"stone-wall","position":{"x":10,"y":9}},{"entity_number":322,"name":"land-mine","position":{"x":11.015625,"y":9.04296875}},{"entity_number":323,"name":"stone-wall","position":{"x":11,"y":10}},{"entity_number":324,"name":"land-mine","position":{"x":-11.90234375,"y":12.296875}},{"entity_number":325,"name":"stone-wall","position":{"x":-12,"y":11}},{"entity_number":326,"name":"land-mine","position":{"x":-11.07421875,"y":12.7109375}},{"entity_number":327,"name":"stone-wall","position":{"x":-11,"y":12}},{"entity_number":328,"name":"land-mine","position":{"x":-10.08984375,"y":11.85546875}},{"entity_number":329,"name":"stone-wall","position":{"x":-10,"y":11}},{"entity_number":330,"name":"land-mine","position":{"x":-9.078125,"y":11.08984375}},{"entity_number":331,"name":"stone-wall","position":{"x":-9,"y":12}},{"entity_number":332,"name":"land-mine","position":{"x":-7.28515625,"y":11.08984375}},{"entity_number":333,"name":"stone-wall","position":{"x":-8,"y":11}},{"entity_number":334,"name":"stone-wall","position":{"x":-7,"y":12}},{"entity_number":335,"name":"land-mine","position":{"x":-6.09375,"y":11.92578125}},{"entity_number":336,"name":"stone-wall","position":{"x":-6,"y":11}},{"entity_number":337,"name":"land-mine","position":{"x":-4.10546875,"y":12.296875}},{"entity_number":338,"name":"land-mine","position":{"x":-4.8828125,"y":11.0546875}},{"entity_number":339,"name":"stone-wall","position":{"x":-5,"y":12}},{"entity_number":340,"name":"stone-wall","position":{"x":-4,"y":11}},{"entity_number":341,"name":"land-mine","position":{"x":-3.0546875,"y":11.0546875}},{"entity_number":342,"name":"stone-wall","position":{"x":-3,"y":12}},{"entity_number":343,"name":"land-mine","position":{"x":-1.2265625,"y":11.0546875}},{"entity_number":344,"name":"land-mine","position":{"x":-2.02734375,"y":11.91015625}},{"entity_number":345,"name":"stone-wall","position":{"x":-2,"y":11}},{"entity_number":346,"name":"land-mine","position":{"x":-0.23828125,"y":12.125}},{"entity_number":347,"name":"stone-wall","position":{"x":-1,"y":12}},{"entity_number":348,"name":"stone-wall","position":{"x":0,"y":11}},{"entity_number":349,"name":"land-mine","position":{"x":1.2109375,"y":11.0546875}},{"entity_number":350,"name":"stone-wall","position":{"x":1,"y":12}},{"entity_number":351,"name":"land-mine","position":{"x":2.01171875,"y":11.91015625}},{"entity_number":352,"name":"stone-wall","position":{"x":2,"y":11}},{"entity_number":353,"name":"land-mine","position":{"x":3.0390625,"y":11.0546875}},{"entity_number":354,"name":"stone-wall","position":{"x":3,"y":12}},{"entity_number":355,"name":"land-mine","position":{"x":4.00390625,"y":12.2265625}},{"entity_number":356,"name":"land-mine","position":{"x":4.8671875,"y":11.0546875}},{"entity_number":357,"name":"stone-wall","position":{"x":4,"y":11}},{"entity_number":358,"name":"land-mine","position":{"x":5.6953125,"y":11.984375}},{"entity_number":359,"name":"stone-wall","position":{"x":5,"y":12}},{"entity_number":360,"name":"land-mine","position":{"x":6.6953125,"y":11.0546875}},{"entity_number":361,"name":"stone-wall","position":{"x":6,"y":11}},{"entity_number":362,"name":"stone-wall","position":{"x":7,"y":12}},{"entity_number":363,"name":"land-mine","position":{"x":8.0234375,"y":11.98046875}},{"entity_number":364,"name":"stone-wall","position":{"x":8,"y":11}},{"entity_number":365,"name":"land-mine","position":{"x":9.1328125,"y":11.0546875}},{"entity_number":366,"name":"stone-wall","position":{"x":9,"y":12}},{"entity_number":367,"name":"land-mine","position":{"x":10.11328125,"y":11.77734375}},{"entity_number":368,"name":"land-mine","position":{"x":10.73828125,"y":12.7109375}},{"entity_number":369,"name":"stone-wall","position":{"x":10,"y":11}},{"entity_number":370,"name":"land-mine","position":{"x":10.9609375,"y":11.0546875}},{"entity_number":371,"name":"stone-wall","position":{"x":11,"y":12}},{"entity_number":372,"name":"land-mine","position":{"x":12.24609375,"y":12.421875}},{"entity_number":373,"name":"stone-wall","position":{"x":12,"y":11}},{"entity_number":374,"name":"land-mine","position":{"x":-9.27734375,"y":12.984375}},{"entity_number":375,"name":"stone-wall","position":{"x":-10,"y":13}},{"entity_number":376,"name":"land-mine","position":{"x":-7.140625,"y":13.125}},{"entity_number":377,"name":"stone-wall","position":{"x":-8,"y":13}},{"entity_number":378,"name":"stone-wall","position":{"x":-6,"y":13}},{"entity_number":379,"name":"land-mine","position":{"x":-4.703125,"y":13.125}},{"entity_number":380,"name":"stone-wall","position":{"x":-4,"y":13}},{"entity_number":381,"name":"land-mine","position":{"x":-2.875,"y":13.125}},{"entity_number":382,"name":"stone-wall","position":{"x":-2,"y":13}},{"entity_number":383,"name":"land-mine","position":{"x":-1.046875,"y":13.125}},{"entity_number":384,"name":"stone-wall","position":{"x":0,"y":13}},{"entity_number":385,"name":"land-mine","position":{"x":5.046875,"y":13.125}},{"entity_number":386,"name":"land-mine","position":{"x":6.875,"y":13.125}},{"entity_number":387,"name":"stone-wall","position":{"x":6,"y":13}},{"entity_number":388,"name":"land-mine","position":{"x":8.703125,"y":13.125}},{"entity_number":389,"name":"stone-wall","position":{"x":8,"y":13}},{"entity_number":390,"name":"stone-wall","position":{"x":10,"y":13}}],"tiles":[{"position":{"x":-12,"y":-6},"name":"refined-concrete"},{"position":{"x":-12,"y":-5},"name":"refined-concrete"},{"position":{"x":-12,"y":-4},"name":"refined-concrete"},{"position":{"x":-12,"y":-3},"name":"refined-concrete"},{"position":{"x":-12,"y":-2},"name":"refined-concrete"},{"position":{"x":-12,"y":-1},"name":"refined-concrete"},{"position":{"x":-12,"y":0},"name":"refined-concrete"},{"position":{"x":-12,"y":1},"name":"refined-concrete"},{"position":{"x":-12,"y":2},"name":"refined-concrete"},{"position":{"x":-12,"y":3},"name":"refined-concrete"},{"position":{"x":-12,"y":8},"name":"refined-concrete"},{"position":{"x":-12,"y":9},"name":"refined-concrete"},{"position":{"x":-12,"y":10},"name":"refined-concrete"},{"position":{"x":-12,"y":11},"name":"refined-concrete"},{"position":{"x":-12,"y":12},"name":"refined-concrete"},{"position":{"x":-11,"y":-8},"name":"refined-concrete"},{"position":{"x":-11,"y":-7},"name":"refined-concrete"},{"position":{"x":-11,"y":-6},"name":"refined-concrete"},{"position":{"x":-11,"y":-5},"name":"refined-concrete"},{"position":{"x":-11,"y":-4},"name":"refined-concrete"},{"position":{"x":-11,"y":-3},"name":"refined-concrete"},{"position":{"x":-11,"y":-2},"name":"refined-concrete"},{"position":{"x":-11,"y":-1},"name":"refined-concrete"},{"position":{"x":-11,"y":0},"name":"refined-concrete"},{"position":{"x":-11,"y":1},"name":"refined-concrete"},{"position":{"x":-11,"y":2},"name":"refined-concrete"},{"position":{"x":-11,"y":3},"name":"refined-concrete"},{"position":{"x":-11,"y":4},"name":"refined-concrete"},{"position":{"x":-11,"y":5},"name":"refined-concrete"},{"position":{"x":-11,"y":6},"name":"refined-concrete"},{"position":{"x":-11,"y":7},"name":"refined-concrete"},{"position":{"x":-11,"y":8},"name":"refined-concrete"},{"position":{"x":-11,"y":9},"name":"refined-concrete"},{"position":{"x":-11,"y":10},"name":"refined-concrete"},{"position":{"x":-11,"y":11},"name":"refined-concrete"},{"position":{"x":-11,"y":12},"name":"refined-concrete"},{"position":{"x":-11,"y":13},"name":"refined-concrete"},{"position":{"x":-10,"y":-10},"name":"refined-concrete"},{"position":{"x":-10,"y":-9},"name":"refined-concrete"},{"position":{"x":-10,"y":-8},"name":"refined-concrete"},{"position":{"x":-10,"y":-7},"name":"refined-concrete"},{"position":{"x":-10,"y":-6},"name":"refined-concrete"},{"position":{"x":-10,"y":-5},"name":"refined-concrete"},{"position":{"x":-10,"y":-4},"name":"refined-concrete"},{"position":{"x":-10,"y":-3},"name":"refined-concrete"},{"position":{"x":-10,"y":-2},"name":"refined-concrete"},{"position":{"x":-10,"y":-1},"name":"refined-concrete"},{"position":{"x":-10,"y":0},"name":"refined-concrete"},{"position":{"x":-10,"y":1},"name":"refined-concrete"},{"position":{"x":-10,"y":2},"name":"refined-concrete"},{"position":{"x":-10,"y":3},"name":"refined-concrete"},{"position":{"x":-10,"y":4},"name":"refined-concrete"},{"position":{"x":-10,"y":5},"name":"refined-concrete"},{"position":{"x":-10,"y":6},"name":"refined-concrete"},{"position":{"x":-10,"y":7},"name":"refined-concrete"},{"position":{"x":-10,"y":8},"name":"refined-concrete"},{"position":{"x":-10,"y":9},"name":"refined-concrete"},{"position":{"x":-10,"y":10},"name":"refined-concrete"},{"position":{"x":-10,"y":11},"name":"refined-concrete"},{"position":{"x":-10,"y":12},"name":"refined-concrete"},{"position":{"x":-10,"y":13},"name":"refined-concrete"},{"position":{"x":-9,"y":-10},"name":"refined-concrete"},{"position":{"x":-9,"y":-9},"name":"refined-concrete"},{"position":{"x":-9,"y":-8},"name":"refined-concrete"},{"position":{"x":-9,"y":-7},"name":"refined-concrete"},{"position":{"x":-9,"y":-6},"name":"refined-concrete"},{"position":{"x":-9,"y":-5},"name":"refined-concrete"},{"position":{"x":-9,"y":-4},"name":"refined-concrete"},{"position":{"x":-9,"y":-3},"name":"refined-concrete"},{"position":{"x":-9,"y":-2},"name":"refined-concrete"},{"position":{"x":-9,"y":-1},"name":"refined-concrete"},{"position":{"x":-9,"y":0},"name":"refined-concrete"},{"position":{"x":-9,"y":1},"name":"refined-concrete"},{"position":{"x":-9,"y":2},"name":"refined-concrete"},{"position":{"x":-9,"y":3},"name":"refined-concrete"},{"position":{"x":-9,"y":4},"name":"refined-concrete"},{"position":{"x":-9,"y":5},"name":"refined-concrete"},{"position":{"x":-9,"y":6},"name":"refined-concrete"},{"position":{"x":-9,"y":7},"name":"refined-concrete"},{"position":{"x":-9,"y":8},"name":"refined-concrete"},{"position":{"x":-9,"y":9},"name":"refined-concrete"},{"position":{"x":-9,"y":10},"name":"refined-concrete"},{"position":{"x":-9,"y":11},"name":"refined-concrete"},{"position":{"x":-9,"y":12},"name":"refined-concrete"},{"position":{"x":-9,"y":13},"name":"refined-concrete"},{"position":{"x":-8,"y":-11},"name":"refined-concrete"},{"position":{"x":-8,"y":-10},"name":"refined-concrete"},{"position":{"x":-8,"y":-9},"name":"refined-concrete"},{"position":{"x":-8,"y":-8},"name":"refined-concrete"},{"position":{"x":-8,"y":-7},"name":"refined-concrete"},{"position":{"x":-8,"y":-6},"name":"refined-concrete"},{"position":{"x":-8,"y":-5},"name":"refined-concrete"},{"position":{"x":-8,"y":-4},"name":"refined-concrete"},{"position":{"x":-8,"y":-3},"name":"refined-concrete"},{"position":{"x":-8,"y":-2},"name":"refined-concrete"},{"position":{"x":-8,"y":-1},"name":"refined-concrete"},{"position":{"x":-8,"y":0},"name":"refined-concrete"},{"position":{"x":-8,"y":1},"name":"refined-concrete"},{"position":{"x":-8,"y":2},"name":"refined-concrete"},{"position":{"x":-8,"y":3},"name":"refined-concrete"},{"position":{"x":-8,"y":4},"name":"refined-concrete"},{"position":{"x":-8,"y":5},"name":"refined-concrete"},{"position":{"x":-8,"y":6},"name":"refined-concrete"},{"position":{"x":-8,"y":7},"name":"refined-concrete"},{"position":{"x":-8,"y":8},"name":"refined-concrete"},{"position":{"x":-8,"y":9},"name":"refined-concrete"},{"position":{"x":-8,"y":10},"name":"refined-concrete"},{"position":{"x":-8,"y":11},"name":"refined-concrete"},{"position":{"x":-8,"y":12},"name":"refined-concrete"},{"position":{"x":-8,"y":13},"name":"refined-concrete"},{"position":{"x":-7,"y":-11},"name":"refined-concrete"},{"position":{"x":-7,"y":-10},"name":"refined-concrete"},{"position":{"x":-7,"y":-9},"name":"refined-concrete"},{"position":{"x":-7,"y":-8},"name":"refined-concrete"},{"position":{"x":-7,"y":-7},"name":"refined-concrete"},{"position":{"x":-7,"y":-6},"name":"refined-concrete"},{"position":{"x":-7,"y":-5},"name":"refined-concrete"},{"position":{"x":-7,"y":-4},"name":"refined-concrete"},{"position":{"x":-7,"y":-3},"name":"refined-concrete"},{"position":{"x":-7,"y":-2},"name":"refined-concrete"},{"position":{"x":-7,"y":-1},"name":"refined-concrete"},{"position":{"x":-7,"y":0},"name":"refined-concrete"},{"position":{"x":-7,"y":1},"name":"refined-concrete"},{"position":{"x":-7,"y":2},"name":"refined-concrete"},{"position":{"x":-7,"y":3},"name":"refined-concrete"},{"position":{"x":-7,"y":4},"name":"refined-concrete"},{"position":{"x":-7,"y":5},"name":"refined-concrete"},{"position":{"x":-7,"y":6},"name":"refined-concrete"},{"position":{"x":-7,"y":7},"name":"refined-concrete"},{"position":{"x":-7,"y":8},"name":"refined-concrete"},{"position":{"x":-7,"y":9},"name":"refined-concrete"},{"position":{"x":-7,"y":10},"name":"refined-concrete"},{"position":{"x":-7,"y":11},"name":"refined-concrete"},{"position":{"x":-7,"y":12},"name":"refined-concrete"},{"position":{"x":-7,"y":13},"name":"refined-concrete"},{"position":{"x":-6,"y":-11},"name":"refined-concrete"},{"position":{"x":-6,"y":-10},"name":"refined-concrete"},{"position":{"x":-6,"y":-9},"name":"refined-concrete"},{"position":{"x":-6,"y":-8},"name":"refined-concrete"},{"position":{"x":-6,"y":-7},"name":"refined-concrete"},{"position":{"x":-6,"y":-6},"name":"refined-concrete"},{"position":{"x":-6,"y":-5},"name":"refined-concrete"},{"position":{"x":-6,"y":-4},"name":"refined-concrete"},{"position":{"x":-6,"y":-3},"name":"refined-concrete"},{"position":{"x":-6,"y":-2},"name":"refined-concrete"},{"position":{"x":-6,"y":-1},"name":"refined-concrete"},{"position":{"x":-6,"y":0},"name":"refined-concrete"},{"position":{"x":-6,"y":1},"name":"refined-concrete"},{"position":{"x":-6,"y":2},"name":"refined-concrete"},{"position":{"x":-6,"y":3},"name":"refined-concrete"},{"position":{"x":-6,"y":4},"name":"refined-concrete"},{"position":{"x":-6,"y":5},"name":"refined-concrete"},{"position":{"x":-6,"y":6},"name":"refined-concrete"},{"position":{"x":-6,"y":7},"name":"refined-concrete"},{"position":{"x":-6,"y":8},"name":"refined-concrete"},{"position":{"x":-6,"y":9},"name":"refined-concrete"},{"position":{"x":-6,"y":10},"name":"refined-concrete"},{"position":{"x":-6,"y":11},"name":"refined-concrete"},{"position":{"x":-6,"y":12},"name":"refined-concrete"},{"position":{"x":-6,"y":13},"name":"refined-concrete"},{"position":{"x":-5,"y":-11},"name":"refined-concrete"},{"position":{"x":-5,"y":-10},"name":"refined-concrete"},{"position":{"x":-5,"y":-9},"name":"refined-concrete"},{"position":{"x":-5,"y":-8},"name":"refined-concrete"},{"position":{"x":-5,"y":-7},"name":"refined-concrete"},{"position":{"x":-5,"y":-6},"name":"refined-concrete"},{"position":{"x":-5,"y":-5},"name":"refined-concrete"},{"position":{"x":-5,"y":-4},"name":"refined-concrete"},{"position":{"x":-5,"y":-3},"name":"refined-concrete"},{"position":{"x":-5,"y":-2},"name":"refined-concrete"},{"position":{"x":-5,"y":-1},"name":"refined-concrete"},{"position":{"x":-5,"y":0},"name":"refined-concrete"},{"position":{"x":-5,"y":1},"name":"refined-concrete"},{"position":{"x":-5,"y":2},"name":"refined-concrete"},{"position":{"x":-5,"y":3},"name":"refined-concrete"},{"position":{"x":-5,"y":4},"name":"refined-concrete"},{"position":{"x":-5,"y":5},"name":"refined-concrete"},{"position":{"x":-5,"y":6},"name":"refined-concrete"},{"position":{"x":-5,"y":7},"name":"refined-concrete"},{"position":{"x":-5,"y":8},"name":"refined-concrete"},{"position":{"x":-5,"y":9},"name":"refined-concrete"},{"position":{"x":-5,"y":10},"name":"refined-concrete"},{"position":{"x":-5,"y":11},"name":"refined-concrete"},{"position":{"x":-5,"y":12},"name":"refined-concrete"},{"position":{"x":-5,"y":13},"name":"refined-concrete"},{"position":{"x":-4,"y":-12},"name":"refined-concrete"},{"position":{"x":-4,"y":-11},"name":"refined-concrete"},{"position":{"x":-4,"y":-10},"name":"refined-concrete"},{"position":{"x":-4,"y":-9},"name":"refined-concrete"},{"position":{"x":-4,"y":-8},"name":"refined-concrete"},{"position":{"x":-4,"y":-7},"name":"refined-concrete"},{"position":{"x":-4,"y":-6},"name":"refined-concrete"},{"position":{"x":-4,"y":-5},"name":"refined-concrete"},{"position":{"x":-4,"y":-4},"name":"refined-concrete"},{"position":{"x":-4,"y":-3},"name":"refined-concrete"},{"position":{"x":-4,"y":-2},"name":"refined-concrete"},{"position":{"x":-4,"y":-1},"name":"refined-concrete"},{"position":{"x":-4,"y":0},"name":"refined-concrete"},{"position":{"x":-4,"y":1},"name":"refined-concrete"},{"position":{"x":-4,"y":2},"name":"refined-concrete"},{"position":{"x":-4,"y":3},"name":"refined-concrete"},{"position":{"x":-4,"y":4},"name":"refined-concrete"},{"position":{"x":-4,"y":5},"name":"refined-concrete"},{"position":{"x":-4,"y":6},"name":"refined-concrete"},{"position":{"x":-4,"y":7},"name":"refined-concrete"},{"position":{"x":-4,"y":8},"name":"refined-concrete"},{"position":{"x":-4,"y":9},"name":"refined-concrete"},{"position":{"x":-4,"y":10},"name":"refined-concrete"},{"position":{"x":-4,"y":11},"name":"refined-concrete"},{"position":{"x":-4,"y":12},"name":"refined-concrete"},{"position":{"x":-4,"y":13},"name":"refined-concrete"},{"position":{"x":-3,"y":-12},"name":"refined-concrete"},{"position":{"x":-3,"y":-11},"name":"refined-concrete"},{"position":{"x":-3,"y":-10},"name":"refined-concrete"},{"position":{"x":-3,"y":-9},"name":"refined-concrete"},{"position":{"x":-3,"y":-8},"name":"refined-concrete"},{"position":{"x":-3,"y":-7},"name":"refined-concrete"},{"position":{"x":-3,"y":-6},"name":"refined-concrete"},{"position":{"x":-3,"y":-5},"name":"refined-concrete"},{"position":{"x":-3,"y":-4},"name":"refined-concrete"},{"position":{"x":-3,"y":-3},"name":"refined-concrete"},{"position":{"x":-3,"y":-2},"name":"refined-concrete"},{"position":{"x":-3,"y":-1},"name":"refined-concrete"},{"position":{"x":-3,"y":0},"name":"refined-concrete"},{"position":{"x":-3,"y":1},"name":"refined-concrete"},{"position":{"x":-3,"y":2},"name":"refined-concrete"},{"position":{"x":-3,"y":3},"name":"refined-concrete"},{"position":{"x":-3,"y":4},"name":"refined-concrete"},{"position":{"x":-3,"y":5},"name":"refined-concrete"},{"position":{"x":-3,"y":6},"name":"refined-concrete"},{"position":{"x":-3,"y":7},"name":"refined-concrete"},{"position":{"x":-3,"y":8},"name":"refined-concrete"},{"position":{"x":-3,"y":9},"name":"refined-concrete"},{"position":{"x":-3,"y":10},"name":"refined-concrete"},{"position":{"x":-3,"y":11},"name":"refined-concrete"},{"position":{"x":-3,"y":12},"name":"refined-concrete"},{"position":{"x":-3,"y":13},"name":"refined-concrete"},{"position":{"x":-2,"y":-12},"name":"refined-concrete"},{"position":{"x":-2,"y":-11},"name":"refined-concrete"},{"position":{"x":-2,"y":-10},"name":"refined-concrete"},{"position":{"x":-2,"y":-9},"name":"refined-concrete"},{"position":{"x":-2,"y":-8},"name":"refined-concrete"},{"position":{"x":-2,"y":-7},"name":"refined-concrete"},{"position":{"x":-2,"y":-6},"name":"refined-concrete"},{"position":{"x":-2,"y":-5},"name":"refined-concrete"},{"position":{"x":-2,"y":-4},"name":"refined-concrete"},{"position":{"x":-2,"y":-3},"name":"refined-concrete"},{"position":{"x":-2,"y":-2},"name":"refined-concrete"},{"position":{"x":-2,"y":-1},"name":"refined-concrete"},{"position":{"x":-2,"y":0},"name":"refined-concrete"},{"position":{"x":-2,"y":1},"name":"refined-concrete"},{"position":{"x":-2,"y":2},"name":"refined-concrete"},{"position":{"x":-2,"y":3},"name":"refined-concrete"},{"position":{"x":-2,"y":4},"name":"refined-concrete"},{"position":{"x":-2,"y":5},"name":"refined-concrete"},{"position":{"x":-2,"y":6},"name":"refined-concrete"},{"position":{"x":-2,"y":7},"name":"refined-concrete"},{"position":{"x":-2,"y":8},"name":"refined-concrete"},{"position":{"x":-2,"y":9},"name":"refined-concrete"},{"position":{"x":-2,"y":10},"name":"refined-concrete"},{"position":{"x":-2,"y":11},"name":"refined-concrete"},{"position":{"x":-2,"y":12},"name":"refined-concrete"},{"position":{"x":-2,"y":13},"name":"refined-concrete"},{"position":{"x":-1,"y":-12},"name":"refined-concrete"},{"position":{"x":-1,"y":-11},"name":"refined-concrete"},{"position":{"x":-1,"y":-10},"name":"refined-concrete"},{"position":{"x":-1,"y":-9},"name":"refined-concrete"},{"position":{"x":-1,"y":-8},"name":"refined-concrete"},{"position":{"x":-1,"y":-7},"name":"refined-concrete"},{"position":{"x":-1,"y":-6},"name":"refined-concrete"},{"position":{"x":-1,"y":-5},"name":"refined-concrete"},{"position":{"x":-1,"y":-4},"name":"refined-concrete"},{"position":{"x":-1,"y":-3},"name":"refined-concrete"},{"position":{"x":-1,"y":-2},"name":"refined-concrete"},{"position":{"x":-1,"y":-1},"name":"refined-concrete"},{"position":{"x":-1,"y":0},"name":"refined-concrete"},{"position":{"x":-1,"y":1},"name":"refined-concrete"},{"position":{"x":-1,"y":2},"name":"refined-concrete"},{"position":{"x":-1,"y":3},"name":"refined-concrete"},{"position":{"x":-1,"y":4},"name":"refined-concrete"},{"position":{"x":-1,"y":5},"name":"refined-concrete"},{"position":{"x":-1,"y":6},"name":"refined-concrete"},{"position":{"x":-1,"y":7},"name":"refined-concrete"},{"position":{"x":-1,"y":8},"name":"refined-concrete"},{"position":{"x":-1,"y":9},"name":"refined-concrete"},{"position":{"x":-1,"y":10},"name":"refined-concrete"},{"position":{"x":-1,"y":11},"name":"refined-concrete"},{"position":{"x":-1,"y":12},"name":"refined-concrete"},{"position":{"x":-1,"y":13},"name":"refined-concrete"},{"position":{"x":0,"y":-12},"name":"refined-concrete"},{"position":{"x":0,"y":-11},"name":"refined-concrete"},{"position":{"x":0,"y":-10},"name":"refined-concrete"},{"position":{"x":0,"y":-9},"name":"refined-concrete"},{"position":{"x":0,"y":-8},"name":"refined-concrete"},{"position":{"x":0,"y":-7},"name":"refined-concrete"},{"position":{"x":0,"y":-6},"name":"refined-concrete"},{"position":{"x":0,"y":-5},"name":"refined-concrete"},{"position":{"x":0,"y":-4},"name":"refined-concrete"},{"position":{"x":0,"y":-3},"name":"refined-concrete"},{"position":{"x":0,"y":-2},"name":"refined-concrete"},{"position":{"x":0,"y":-1},"name":"refined-concrete"},{"position":{"x":0,"y":0},"name":"refined-concrete"},{"position":{"x":0,"y":1},"name":"refined-concrete"},{"position":{"x":0,"y":2},"name":"refined-concrete"},{"position":{"x":0,"y":3},"name":"refined-concrete"},{"position":{"x":0,"y":4},"name":"refined-concrete"},{"position":{"x":0,"y":5},"name":"refined-concrete"},{"position":{"x":0,"y":6},"name":"refined-concrete"},{"position":{"x":0,"y":7},"name":"refined-concrete"},{"position":{"x":0,"y":8},"name":"refined-concrete"},{"position":{"x":0,"y":9},"name":"refined-concrete"},{"position":{"x":0,"y":10},"name":"refined-concrete"},{"position":{"x":0,"y":11},"name":"refined-concrete"},{"position":{"x":0,"y":12},"name":"refined-concrete"},{"position":{"x":0,"y":13},"name":"refined-concrete"},{"position":{"x":1,"y":-12},"name":"refined-concrete"},{"position":{"x":1,"y":-11},"name":"refined-concrete"},{"position":{"x":1,"y":-10},"name":"refined-concrete"},{"position":{"x":1,"y":-9},"name":"refined-concrete"},{"position":{"x":1,"y":-8},"name":"refined-concrete"},{"position":{"x":1,"y":-7},"name":"refined-concrete"},{"position":{"x":1,"y":-6},"name":"refined-concrete"},{"position":{"x":1,"y":-5},"name":"refined-concrete"},{"position":{"x":1,"y":-4},"name":"refined-concrete"},{"position":{"x":1,"y":-3},"name":"refined-concrete"},{"position":{"x":1,"y":-2},"name":"refined-concrete"},{"position":{"x":1,"y":-1},"name":"refined-concrete"},{"position":{"x":1,"y":0},"name":"refined-concrete"},{"position":{"x":1,"y":1},"name":"refined-concrete"},{"position":{"x":1,"y":2},"name":"refined-concrete"},{"position":{"x":1,"y":3},"name":"refined-concrete"},{"position":{"x":1,"y":4},"name":"refined-concrete"},{"position":{"x":1,"y":5},"name":"refined-concrete"},{"position":{"x":1,"y":6},"name":"refined-concrete"},{"position":{"x":1,"y":7},"name":"refined-concrete"},{"position":{"x":1,"y":8},"name":"refined-concrete"},{"position":{"x":1,"y":9},"name":"refined-concrete"},{"position":{"x":1,"y":10},"name":"refined-concrete"},{"position":{"x":1,"y":11},"name":"refined-concrete"},{"position":{"x":1,"y":12},"name":"refined-concrete"},{"position":{"x":2,"y":-12},"name":"refined-concrete"},{"position":{"x":2,"y":-11},"name":"refined-concrete"},{"position":{"x":2,"y":-10},"name":"refined-concrete"},{"position":{"x":2,"y":-9},"name":"refined-concrete"},{"position":{"x":2,"y":-8},"name":"refined-concrete"},{"position":{"x":2,"y":-7},"name":"refined-concrete"},{"position":{"x":2,"y":-6},"name":"refined-concrete"},{"position":{"x":2,"y":-5},"name":"refined-concrete"},{"position":{"x":2,"y":-4},"name":"refined-concrete"},{"position":{"x":2,"y":-3},"name":"refined-concrete"},{"position":{"x":2,"y":-2},"name":"refined-concrete"},{"position":{"x":2,"y":-1},"name":"refined-concrete"},{"position":{"x":2,"y":0},"name":"refined-concrete"},{"position":{"x":2,"y":1},"name":"refined-concrete"},{"position":{"x":2,"y":2},"name":"refined-concrete"},{"position":{"x":2,"y":3},"name":"refined-concrete"},{"position":{"x":2,"y":4},"name":"refined-concrete"},{"position":{"x":2,"y":5},"name":"refined-concrete"},{"position":{"x":2,"y":6},"name":"refined-concrete"},{"position":{"x":2,"y":7},"name":"refined-concrete"},{"position":{"x":2,"y":8},"name":"refined-concrete"},{"position":{"x":2,"y":9},"name":"refined-concrete"},{"position":{"x":2,"y":10},"name":"refined-concrete"},{"position":{"x":2,"y":11},"name":"refined-concrete"},{"position":{"x":2,"y":12},"name":"refined-concrete"},{"position":{"x":3,"y":-12},"name":"refined-concrete"},{"position":{"x":3,"y":-11},"name":"refined-concrete"},{"position":{"x":3,"y":-10},"name":"refined-concrete"},{"position":{"x":3,"y":-9},"name":"refined-concrete"},{"position":{"x":3,"y":-8},"name":"refined-concrete"},{"position":{"x":3,"y":-7},"name":"refined-concrete"},{"position":{"x":3,"y":-6},"name":"refined-concrete"},{"position":{"x":3,"y":-5},"name":"refined-concrete"},{"position":{"x":3,"y":-4},"name":"refined-concrete"},{"position":{"x":3,"y":-3},"name":"refined-concrete"},{"position":{"x":3,"y":-2},"name":"refined-concrete"},{"position":{"x":3,"y":-1},"name":"refined-concrete"},{"position":{"x":3,"y":0},"name":"refined-concrete"},{"position":{"x":3,"y":1},"name":"refined-concrete"},{"position":{"x":3,"y":2},"name":"refined-concrete"},{"position":{"x":3,"y":3},"name":"refined-concrete"},{"position":{"x":3,"y":4},"name":"refined-concrete"},{"position":{"x":3,"y":5},"name":"refined-concrete"},{"position":{"x":3,"y":6},"name":"refined-concrete"},{"position":{"x":3,"y":7},"name":"refined-concrete"},{"position":{"x":3,"y":8},"name":"refined-concrete"},{"position":{"x":3,"y":9},"name":"refined-concrete"},{"position":{"x":3,"y":10},"name":"refined-concrete"},{"position":{"x":3,"y":11},"name":"refined-concrete"},{"position":{"x":3,"y":12},"name":"refined-concrete"},{"position":{"x":4,"y":-12},"name":"refined-concrete"},{"position":{"x":4,"y":-11},"name":"refined-concrete"},{"position":{"x":4,"y":-10},"name":"refined-concrete"},{"position":{"x":4,"y":-9},"name":"refined-concrete"},{"position":{"x":4,"y":-8},"name":"refined-concrete"},{"position":{"x":4,"y":-7},"name":"refined-concrete"},{"position":{"x":4,"y":-6},"name":"refined-concrete"},{"position":{"x":4,"y":-5},"name":"refined-concrete"},{"position":{"x":4,"y":-4},"name":"refined-concrete"},{"position":{"x":4,"y":-3},"name":"refined-concrete"},{"position":{"x":4,"y":-2},"name":"refined-concrete"},{"position":{"x":4,"y":-1},"name":"refined-concrete"},{"position":{"x":4,"y":0},"name":"refined-concrete"},{"position":{"x":4,"y":1},"name":"refined-concrete"},{"position":{"x":4,"y":2},"name":"refined-concrete"},{"position":{"x":4,"y":3},"name":"refined-concrete"},{"position":{"x":4,"y":4},"name":"refined-concrete"},{"position":{"x":4,"y":5},"name":"refined-concrete"},{"position":{"x":4,"y":6},"name":"refined-concrete"},{"position":{"x":4,"y":7},"name":"refined-concrete"},{"position":{"x":4,"y":8},"name":"refined-concrete"},{"position":{"x":4,"y":9},"name":"refined-concrete"},{"position":{"x":4,"y":10},"name":"refined-concrete"},{"position":{"x":4,"y":11},"name":"refined-concrete"},{"position":{"x":4,"y":12},"name":"refined-concrete"},{"position":{"x":5,"y":-12},"name":"refined-concrete"},{"position":{"x":5,"y":-11},"name":"refined-concrete"},{"position":{"x":5,"y":-10},"name":"refined-concrete"},{"position":{"x":5,"y":-9},"name":"refined-concrete"},{"position":{"x":5,"y":-8},"name":"refined-concrete"},{"position":{"x":5,"y":-7},"name":"refined-concrete"},{"position":{"x":5,"y":-6},"name":"refined-concrete"},{"position":{"x":5,"y":-5},"name":"refined-concrete"},{"position":{"x":5,"y":-4},"name":"refined-concrete"},{"position":{"x":5,"y":-3},"name":"refined-concrete"},{"position":{"x":5,"y":-2},"name":"refined-concrete"},{"position":{"x":5,"y":-1},"name":"refined-concrete"},{"position":{"x":5,"y":0},"name":"refined-concrete"},{"position":{"x":5,"y":1},"name":"refined-concrete"},{"position":{"x":5,"y":2},"name":"refined-concrete"},{"position":{"x":5,"y":3},"name":"refined-concrete"},{"position":{"x":5,"y":4},"name":"refined-concrete"},{"position":{"x":5,"y":5},"name":"refined-concrete"},{"position":{"x":5,"y":6},"name":"refined-concrete"},{"position":{"x":5,"y":7},"name":"refined-concrete"},{"position":{"x":5,"y":8},"name":"refined-concrete"},{"position":{"x":5,"y":9},"name":"refined-concrete"},{"position":{"x":5,"y":10},"name":"refined-concrete"},{"position":{"x":5,"y":11},"name":"refined-concrete"},{"position":{"x":5,"y":12},"name":"refined-concrete"},{"position":{"x":5,"y":13},"name":"refined-concrete"},{"position":{"x":6,"y":-12},"name":"refined-concrete"},{"position":{"x":6,"y":-11},"name":"refined-concrete"},{"position":{"x":6,"y":-10},"name":"refined-concrete"},{"position":{"x":6,"y":-9},"name":"refined-concrete"},{"position":{"x":6,"y":-8},"name":"refined-concrete"},{"position":{"x":6,"y":-7},"name":"refined-concrete"},{"position":{"x":6,"y":-6},"name":"refined-concrete"},{"position":{"x":6,"y":-5},"name":"refined-concrete"},{"position":{"x":6,"y":-4},"name":"refined-concrete"},{"position":{"x":6,"y":-3},"name":"refined-concrete"},{"position":{"x":6,"y":-2},"name":"refined-concrete"},{"position":{"x":6,"y":-1},"name":"refined-concrete"},{"position":{"x":6,"y":0},"name":"refined-concrete"},{"position":{"x":6,"y":1},"name":"refined-concrete"},{"position":{"x":6,"y":2},"name":"refined-concrete"},{"position":{"x":6,"y":3},"name":"refined-concrete"},{"position":{"x":6,"y":4},"name":"refined-concrete"},{"position":{"x":6,"y":5},"name":"refined-concrete"},{"position":{"x":6,"y":6},"name":"refined-concrete"},{"position":{"x":6,"y":7},"name":"refined-concrete"},{"position":{"x":6,"y":8},"name":"refined-concrete"},{"position":{"x":6,"y":9},"name":"refined-concrete"},{"position":{"x":6,"y":10},"name":"refined-concrete"},{"position":{"x":6,"y":11},"name":"refined-concrete"},{"position":{"x":6,"y":12},"name":"refined-concrete"},{"position":{"x":6,"y":13},"name":"refined-concrete"},{"position":{"x":7,"y":-12},"name":"refined-concrete"},{"position":{"x":7,"y":-11},"name":"refined-concrete"},{"position":{"x":7,"y":-10},"name":"refined-concrete"},{"position":{"x":7,"y":-9},"name":"refined-concrete"},{"position":{"x":7,"y":-8},"name":"refined-concrete"},{"position":{"x":7,"y":-7},"name":"refined-concrete"},{"position":{"x":7,"y":-6},"name":"refined-concrete"},{"position":{"x":7,"y":-5},"name":"refined-concrete"},{"position":{"x":7,"y":-4},"name":"refined-concrete"},{"position":{"x":7,"y":-3},"name":"refined-concrete"},{"position":{"x":7,"y":-2},"name":"refined-concrete"},{"position":{"x":7,"y":-1},"name":"refined-concrete"},{"position":{"x":7,"y":0},"name":"refined-concrete"},{"position":{"x":7,"y":1},"name":"refined-concrete"},{"position":{"x":7,"y":2},"name":"refined-concrete"},{"position":{"x":7,"y":3},"name":"refined-concrete"},{"position":{"x":7,"y":4},"name":"refined-concrete"},{"position":{"x":7,"y":5},"name":"refined-concrete"},{"position":{"x":7,"y":6},"name":"refined-concrete"},{"position":{"x":7,"y":7},"name":"refined-concrete"},{"position":{"x":7,"y":8},"name":"refined-concrete"},{"position":{"x":7,"y":9},"name":"refined-concrete"},{"position":{"x":7,"y":10},"name":"refined-concrete"},{"position":{"x":7,"y":11},"name":"refined-concrete"},{"position":{"x":7,"y":12},"name":"refined-concrete"},{"position":{"x":7,"y":13},"name":"refined-concrete"},{"position":{"x":8,"y":-12},"name":"refined-concrete"},{"position":{"x":8,"y":-11},"name":"refined-concrete"},{"position":{"x":8,"y":-10},"name":"refined-concrete"},{"position":{"x":8,"y":-9},"name":"refined-concrete"},{"position":{"x":8,"y":-8},"name":"refined-concrete"},{"position":{"x":8,"y":-7},"name":"refined-concrete"},{"position":{"x":8,"y":-6},"name":"refined-concrete"},{"position":{"x":8,"y":-5},"name":"refined-concrete"},{"position":{"x":8,"y":-4},"name":"refined-concrete"},{"position":{"x":8,"y":-3},"name":"refined-concrete"},{"position":{"x":8,"y":-2},"name":"refined-concrete"},{"position":{"x":8,"y":-1},"name":"refined-concrete"},{"position":{"x":8,"y":0},"name":"refined-concrete"},{"position":{"x":8,"y":1},"name":"refined-concrete"},{"position":{"x":8,"y":2},"name":"refined-concrete"},{"position":{"x":8,"y":3},"name":"refined-concrete"},{"position":{"x":8,"y":4},"name":"refined-concrete"},{"position":{"x":8,"y":5},"name":"refined-concrete"},{"position":{"x":8,"y":6},"name":"refined-concrete"},{"position":{"x":8,"y":7},"name":"refined-concrete"},{"position":{"x":8,"y":8},"name":"refined-concrete"},{"position":{"x":8,"y":9},"name":"refined-concrete"},{"position":{"x":8,"y":10},"name":"refined-concrete"},{"position":{"x":8,"y":11},"name":"refined-concrete"},{"position":{"x":8,"y":12},"name":"refined-concrete"},{"position":{"x":8,"y":13},"name":"refined-concrete"},{"position":{"x":9,"y":-12},"name":"refined-concrete"},{"position":{"x":9,"y":-11},"name":"refined-concrete"},{"position":{"x":9,"y":-10},"name":"refined-concrete"},{"position":{"x":9,"y":-9},"name":"refined-concrete"},{"position":{"x":9,"y":-8},"name":"refined-concrete"},{"position":{"x":9,"y":-7},"name":"refined-concrete"},{"position":{"x":9,"y":-6},"name":"refined-concrete"},{"position":{"x":9,"y":-5},"name":"refined-concrete"},{"position":{"x":9,"y":-4},"name":"refined-concrete"},{"position":{"x":9,"y":-3},"name":"refined-concrete"},{"position":{"x":9,"y":-2},"name":"refined-concrete"},{"position":{"x":9,"y":-1},"name":"refined-concrete"},{"position":{"x":9,"y":0},"name":"refined-concrete"},{"position":{"x":9,"y":1},"name":"refined-concrete"},{"position":{"x":9,"y":2},"name":"refined-concrete"},{"position":{"x":9,"y":3},"name":"refined-concrete"},{"position":{"x":9,"y":4},"name":"refined-concrete"},{"position":{"x":9,"y":5},"name":"refined-concrete"},{"position":{"x":9,"y":6},"name":"refined-concrete"},{"position":{"x":9,"y":7},"name":"refined-concrete"},{"position":{"x":9,"y":8},"name":"refined-concrete"},{"position":{"x":9,"y":9},"name":"refined-concrete"},{"position":{"x":9,"y":10},"name":"refined-concrete"},{"position":{"x":9,"y":11},"name":"refined-concrete"},{"position":{"x":9,"y":12},"name":"refined-concrete"},{"position":{"x":9,"y":13},"name":"refined-concrete"},{"position":{"x":10,"y":-12},"name":"refined-concrete"},{"position":{"x":10,"y":-11},"name":"refined-concrete"},{"position":{"x":10,"y":-10},"name":"refined-concrete"},{"position":{"x":10,"y":-9},"name":"refined-concrete"},{"position":{"x":10,"y":-8},"name":"refined-concrete"},{"position":{"x":10,"y":-7},"name":"refined-concrete"},{"position":{"x":10,"y":-6},"name":"refined-concrete"},{"position":{"x":10,"y":-5},"name":"refined-concrete"},{"position":{"x":10,"y":-4},"name":"refined-concrete"},{"position":{"x":10,"y":-3},"name":"refined-concrete"},{"position":{"x":10,"y":-2},"name":"refined-concrete"},{"position":{"x":10,"y":-1},"name":"refined-concrete"},{"position":{"x":10,"y":0},"name":"refined-concrete"},{"position":{"x":10,"y":1},"name":"refined-concrete"},{"position":{"x":10,"y":2},"name":"refined-concrete"},{"position":{"x":10,"y":3},"name":"refined-concrete"},{"position":{"x":10,"y":4},"name":"refined-concrete"},{"position":{"x":10,"y":5},"name":"refined-concrete"},{"position":{"x":10,"y":6},"name":"refined-concrete"},{"position":{"x":10,"y":7},"name":"refined-concrete"},{"position":{"x":10,"y":8},"name":"refined-concrete"},{"position":{"x":10,"y":9},"name":"refined-concrete"},{"position":{"x":10,"y":10},"name":"refined-concrete"},{"position":{"x":10,"y":11},"name":"refined-concrete"},{"position":{"x":10,"y":12},"name":"refined-concrete"},{"position":{"x":10,"y":13},"name":"refined-concrete"},{"position":{"x":11,"y":-12},"name":"refined-concrete"},{"position":{"x":11,"y":-11},"name":"refined-concrete"},{"position":{"x":11,"y":-10},"name":"refined-concrete"},{"position":{"x":11,"y":-9},"name":"refined-concrete"},{"position":{"x":11,"y":-8},"name":"refined-concrete"},{"position":{"x":11,"y":-7},"name":"refined-concrete"},{"position":{"x":11,"y":-6},"name":"refined-concrete"},{"position":{"x":11,"y":-5},"name":"refined-concrete"},{"position":{"x":11,"y":-4},"name":"refined-concrete"},{"position":{"x":11,"y":-3},"name":"refined-concrete"},{"position":{"x":11,"y":-2},"name":"refined-concrete"},{"position":{"x":11,"y":-1},"name":"refined-concrete"},{"position":{"x":11,"y":0},"name":"refined-concrete"},{"position":{"x":11,"y":1},"name":"refined-concrete"},{"position":{"x":11,"y":2},"name":"refined-concrete"},{"position":{"x":11,"y":3},"name":"refined-concrete"},{"position":{"x":11,"y":4},"name":"refined-concrete"},{"position":{"x":11,"y":5},"name":"refined-concrete"},{"position":{"x":11,"y":6},"name":"refined-concrete"},{"position":{"x":11,"y":7},"name":"refined-concrete"},{"position":{"x":11,"y":8},"name":"refined-concrete"},{"position":{"x":11,"y":9},"name":"refined-concrete"},{"position":{"x":11,"y":10},"name":"refined-concrete"},{"position":{"x":11,"y":11},"name":"refined-concrete"},{"position":{"x":11,"y":12},"name":"refined-concrete"},{"position":{"x":11,"y":13},"name":"refined-concrete"},{"position":{"x":12,"y":-11},"name":"refined-concrete"},{"position":{"x":12,"y":-7},"name":"refined-concrete"},{"position":{"x":12,"y":-6},"name":"refined-concrete"},{"position":{"x":12,"y":-5},"name":"refined-concrete"},{"position":{"x":12,"y":-4},"name":"refined-concrete"},{"position":{"x":12,"y":-3},"name":"refined-concrete"},{"position":{"x":12,"y":-2},"name":"refined-concrete"},{"position":{"x":12,"y":-1},"name":"refined-concrete"},{"position":{"x":12,"y":0},"name":"refined-concrete"},{"position":{"x":12,"y":1},"name":"refined-concrete"},{"position":{"x":12,"y":2},"name":"refined-concrete"},{"position":{"x":12,"y":3},"name":"refined-concrete"},{"position":{"x":12,"y":4},"name":"refined-concrete"},{"position":{"x":12,"y":5},"name":"refined-concrete"},{"position":{"x":12,"y":6},"name":"refined-concrete"},{"position":{"x":12,"y":7},"name":"refined-concrete"},{"position":{"x":12,"y":8},"name":"refined-concrete"},{"position":{"x":12,"y":11},"name":"refined-concrete"},{"position":{"x":12,"y":12},"name":"refined-concrete"},{"position":{"x":13,"y":-5},"name":"refined-concrete"},{"position":{"x":13,"y":-4},"name":"refined-concrete"},{"position":{"x":13,"y":-3},"name":"refined-concrete"},{"position":{"x":13,"y":-2},"name":"refined-concrete"},{"position":{"x":13,"y":3},"name":"refined-concrete"},{"position":{"x":13,"y":4},"name":"refined-concrete"},{"position":{"x":13,"y":5},"name":"refined-concrete"},{"position":{"x":13,"y":6},"name":"refined-concrete"}],"item":"blueprint","version":73018507264}}' diff --git a/maps/tank_conquest/blueprint_poi_spot_three_json.lua b/maps/tank_conquest/blueprint_poi_spot_three_json.lua deleted file mode 100644 index 86933851c..000000000 --- a/maps/tank_conquest/blueprint_poi_spot_three_json.lua +++ /dev/null @@ -1 +0,0 @@ -return '{"blueprint":{"icons":[{"signal":{"type":"item","name":"land-mine"},"index":1},{"signal":{"type":"item","name":"stone-wall"},"index":2}],"entities":[{"entity_number":1,"name":"land-mine","position":{"x":-4.875,"y":-12.203125}},{"entity_number":2,"name":"land-mine","position":{"x":-3.23828125,"y":-12.23828125}},{"entity_number":3,"name":"land-mine","position":{"x":4.94140625,"y":-12.21484375}},{"entity_number":4,"name":"land-mine","position":{"x":-6.93359375,"y":-12.08984375}},{"entity_number":5,"name":"land-mine","position":{"x":-6.72265625,"y":-10.14453125}},{"entity_number":6,"name":"stone-wall","position":{"x":-7,"y":-11}},{"entity_number":7,"name":"land-mine","position":{"x":-6.01953125,"y":-11.2109375}},{"entity_number":8,"name":"stone-wall","position":{"x":-6,"y":-12}},{"entity_number":9,"name":"stone-wall","position":{"x":-5,"y":-11}},{"entity_number":10,"name":"land-mine","position":{"x":-3.79296875,"y":-11.171875}},{"entity_number":11,"name":"stone-wall","position":{"x":-4,"y":-12}},{"entity_number":12,"name":"land-mine","position":{"x":-2.72265625,"y":-10.296875}},{"entity_number":13,"name":"stone-wall","position":{"x":-3,"y":-11}},{"entity_number":14,"name":"land-mine","position":{"x":-1.6953125,"y":-11.2890625}},{"entity_number":15,"name":"stone-wall","position":{"x":-2,"y":-12}},{"entity_number":16,"name":"land-mine","position":{"x":-1.01171875,"y":-10.296875}},{"entity_number":17,"name":"stone-wall","position":{"x":-1,"y":-11}},{"entity_number":18,"name":"land-mine","position":{"x":0.28125,"y":-11.25}},{"entity_number":19,"name":"land-mine","position":{"x":1.078125,"y":-10.1328125}},{"entity_number":20,"name":"stone-wall","position":{"x":1,"y":-11}},{"entity_number":21,"name":"land-mine","position":{"x":2.71875,"y":-12.05078125}},{"entity_number":22,"name":"land-mine","position":{"x":2.0703125,"y":-11.25}},{"entity_number":23,"name":"stone-wall","position":{"x":2,"y":-12}},{"entity_number":24,"name":"land-mine","position":{"x":2.72265625,"y":-10.18359375}},{"entity_number":25,"name":"stone-wall","position":{"x":3,"y":-11}},{"entity_number":26,"name":"stone-wall","position":{"x":4,"y":-12}},{"entity_number":27,"name":"land-mine","position":{"x":3.90234375,"y":-10.75390625}},{"entity_number":28,"name":"land-mine","position":{"x":4.78125,"y":-10.296875}},{"entity_number":29,"name":"stone-wall","position":{"x":5,"y":-11}},{"entity_number":30,"name":"land-mine","position":{"x":7.71484375,"y":-11.171875}},{"entity_number":31,"name":"stone-wall","position":{"x":6,"y":-12}},{"entity_number":32,"name":"land-mine","position":{"x":6.3046875,"y":-11.09765625}},{"entity_number":33,"name":"stone-wall","position":{"x":7,"y":-11}},{"entity_number":34,"name":"land-mine","position":{"x":8.703125,"y":-10.18359375}},{"entity_number":35,"name":"stone-wall","position":{"x":9,"y":-11}},{"entity_number":36,"name":"land-mine","position":{"x":10,"y":-10.71484375}},{"entity_number":37,"name":"land-mine","position":{"x":-8.99609375,"y":-9.953125}},{"entity_number":38,"name":"stone-wall","position":{"x":-9,"y":-9}},{"entity_number":39,"name":"land-mine","position":{"x":-8.08984375,"y":-9.16796875}},{"entity_number":40,"name":"stone-wall","position":{"x":-8,"y":-10}},{"entity_number":41,"name":"stone-wall","position":{"x":-7,"y":-9}},{"entity_number":42,"name":"land-mine","position":{"x":-4.19921875,"y":-9.19140625}},{"entity_number":43,"name":"land-mine","position":{"x":-5.01953125,"y":-10.0078125}},{"entity_number":44,"name":"stone-wall","position":{"x":-6,"y":-10}},{"entity_number":45,"name":"stone-wall","position":{"x":-5,"y":-9}},{"entity_number":46,"name":"stone-wall","position":{"x":-4,"y":-10}},{"entity_number":47,"name":"stone-wall","position":{"x":-3,"y":-9}},{"entity_number":48,"name":"land-mine","position":{"x":-1.97265625,"y":-9.19140625}},{"entity_number":49,"name":"stone-wall","position":{"x":-2,"y":-10}},{"entity_number":50,"name":"stone-wall","position":{"x":-1,"y":-9}},{"entity_number":51,"name":"land-mine","position":{"x":1.73828125,"y":-9.19140625}},{"entity_number":52,"name":"land-mine","position":{"x":0.25390625,"y":-9.19140625}},{"entity_number":53,"name":"stone-wall","position":{"x":0,"y":-10}},{"entity_number":54,"name":"stone-wall","position":{"x":1,"y":-9}},{"entity_number":55,"name":"stone-wall","position":{"x":2,"y":-10}},{"entity_number":56,"name":"stone-wall","position":{"x":3,"y":-9}},{"entity_number":57,"name":"land-mine","position":{"x":3.9375,"y":-9.125}},{"entity_number":58,"name":"stone-wall","position":{"x":4,"y":-10}},{"entity_number":59,"name":"stone-wall","position":{"x":5,"y":-9}},{"entity_number":60,"name":"land-mine","position":{"x":6.8359375,"y":-9.9921875}},{"entity_number":61,"name":"land-mine","position":{"x":6.19140625,"y":-9.19140625}},{"entity_number":62,"name":"stone-wall","position":{"x":6,"y":-10}},{"entity_number":63,"name":"land-mine","position":{"x":7.83984375,"y":-9.0390625}},{"entity_number":64,"name":"stone-wall","position":{"x":7,"y":-9}},{"entity_number":65,"name":"land-mine","position":{"x":9.73046875,"y":-9.23046875}},{"entity_number":66,"name":"stone-wall","position":{"x":8,"y":-10}},{"entity_number":67,"name":"stone-wall","position":{"x":9,"y":-9}},{"entity_number":68,"name":"land-mine","position":{"x":11.21875,"y":-9.87890625}},{"entity_number":69,"name":"stone-wall","position":{"x":10,"y":-10}},{"entity_number":70,"name":"land-mine","position":{"x":11.2578125,"y":-8.125}},{"entity_number":71,"name":"stone-wall","position":{"x":11,"y":-9}},{"entity_number":72,"name":"stone-wall","position":{"x":12,"y":-10}},{"entity_number":73,"name":"land-mine","position":{"x":12.28515625,"y":-8.92578125}},{"entity_number":74,"name":"stone-wall","position":{"x":13,"y":-9}},{"entity_number":75,"name":"land-mine","position":{"x":-11.07421875,"y":-7.71875}},{"entity_number":76,"name":"stone-wall","position":{"x":-11,"y":-7}},{"entity_number":77,"name":"land-mine","position":{"x":-8.99609375,"y":-8.06640625}},{"entity_number":78,"name":"stone-wall","position":{"x":-10,"y":-8}},{"entity_number":79,"name":"land-mine","position":{"x":-10.00390625,"y":-7.08984375}},{"entity_number":80,"name":"stone-wall","position":{"x":-9,"y":-7}},{"entity_number":81,"name":"stone-wall","position":{"x":-8,"y":-8}},{"entity_number":82,"name":"stone-wall","position":{"x":-7,"y":-8}},{"entity_number":83,"name":"stone-wall","position":{"x":-8,"y":-7}},{"entity_number":84,"name":"stone-wall","position":{"x":-6,"y":-8}},{"entity_number":85,"name":"stone-wall","position":{"x":-5,"y":-8}},{"entity_number":86,"name":"stone-wall","position":{"x":-4,"y":-8}},{"entity_number":87,"name":"stone-wall","position":{"x":-3,"y":-8}},{"entity_number":88,"name":"stone-wall","position":{"x":-2,"y":-8}},{"entity_number":89,"name":"stone-wall","position":{"x":-1,"y":-8}},{"entity_number":90,"name":"stone-wall","position":{"x":0,"y":-8}},{"entity_number":91,"name":"stone-wall","position":{"x":1,"y":-8}},{"entity_number":92,"name":"stone-wall","position":{"x":2,"y":-8}},{"entity_number":93,"name":"stone-wall","position":{"x":3,"y":-8}},{"entity_number":94,"name":"stone-wall","position":{"x":4,"y":-8}},{"entity_number":95,"name":"stone-wall","position":{"x":5,"y":-8}},{"entity_number":96,"name":"stone-wall","position":{"x":6,"y":-8}},{"entity_number":97,"name":"stone-wall","position":{"x":7,"y":-8}},{"entity_number":98,"name":"stone-wall","position":{"x":8,"y":-8}},{"entity_number":99,"name":"stone-wall","position":{"x":9,"y":-8}},{"entity_number":100,"name":"stone-wall","position":{"x":9,"y":-7}},{"entity_number":101,"name":"stone-wall","position":{"x":10,"y":-8}},{"entity_number":102,"name":"land-mine","position":{"x":9.921875,"y":-6.79296875}},{"entity_number":103,"name":"land-mine","position":{"x":11.87890625,"y":-7.04296875}},{"entity_number":104,"name":"stone-wall","position":{"x":11,"y":-7}},{"entity_number":105,"name":"land-mine","position":{"x":12.703125,"y":-7.8984375}},{"entity_number":106,"name":"stone-wall","position":{"x":12,"y":-8}},{"entity_number":107,"name":"stone-wall","position":{"x":13,"y":-7}},{"entity_number":108,"name":"land-mine","position":{"x":-10.9609375,"y":-6.07421875}},{"entity_number":109,"name":"stone-wall","position":{"x":-11,"y":-5}},{"entity_number":110,"name":"land-mine","position":{"x":-8.99609375,"y":-5.83984375}},{"entity_number":111,"name":"stone-wall","position":{"x":-10,"y":-6}},{"entity_number":112,"name":"land-mine","position":{"x":-9.8828125,"y":-5.046875}},{"entity_number":113,"name":"land-mine","position":{"x":-8.91796875,"y":-4.296875}},{"entity_number":114,"name":"stone-wall","position":{"x":-9,"y":-5}},{"entity_number":115,"name":"stone-wall","position":{"x":-8,"y":-6}},{"entity_number":116,"name":"stone-wall","position":{"x":-8,"y":-5}},{"entity_number":117,"name":"solar-panel","position":{"x":-4,"y":-5}},{"entity_number":118,"name":"solar-panel","position":{"x":-1,"y":-5}},{"entity_number":119,"name":"inserter","position":{"x":2,"y":-5}},{"entity_number":120,"name":"infinity-chest","position":{"x":2,"y":-6},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"cannon-shell","count":1,"mode":"at-least","index":1}]}},{"entity_number":121,"name":"infinity-chest","position":{"x":3,"y":-6},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"grenade","count":1,"mode":"at-least","index":1}]}},{"entity_number":122,"name":"inserter","position":{"x":3,"y":-5}},{"entity_number":123,"name":"stone-wall","position":{"x":9,"y":-6}},{"entity_number":124,"name":"infinity-chest","position":{"x":8,"y":-5},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":125,"name":"stone-wall","position":{"x":9,"y":-5}},{"entity_number":126,"name":"land-mine","position":{"x":11.29296875,"y":-5.80078125}},{"entity_number":127,"name":"land-mine","position":{"x":9.921875,"y":-5.26953125}},{"entity_number":128,"name":"stone-wall","position":{"x":10,"y":-6}},{"entity_number":129,"name":"land-mine","position":{"x":10.76171875,"y":-4.27734375}},{"entity_number":130,"name":"stone-wall","position":{"x":11,"y":-5}},{"entity_number":131,"name":"land-mine","position":{"x":12.93359375,"y":-5.7265625}},{"entity_number":132,"name":"stone-wall","position":{"x":12,"y":-6}},{"entity_number":133,"name":"land-mine","position":{"x":12.0546875,"y":-4.8515625}},{"entity_number":134,"name":"stone-wall","position":{"x":13,"y":-5}},{"entity_number":135,"name":"land-mine","position":{"x":-10.9609375,"y":-4.07421875}},{"entity_number":136,"name":"stone-wall","position":{"x":-12,"y":-4}},{"entity_number":137,"name":"stone-wall","position":{"x":-11,"y":-3}},{"entity_number":138,"name":"stone-wall","position":{"x":-10,"y":-4}},{"entity_number":139,"name":"land-mine","position":{"x":-9.8828125,"y":-3.046875}},{"entity_number":140,"name":"stone-wall","position":{"x":-9,"y":-3}},{"entity_number":141,"name":"gun-turret","position":{"x":-6.5,"y":-2.5}},{"entity_number":142,"name":"stone-wall","position":{"x":-8,"y":-4}},{"entity_number":143,"name":"stone-wall","position":{"x":-8,"y":-3}},{"entity_number":144,"name":"wooden-chest","position":{"x":2,"y":-4},"bar":1},{"entity_number":145,"name":"wooden-chest","position":{"x":3,"y":-4},"bar":1},{"entity_number":146,"name":"gun-turret","position":{"x":7.5,"y":-2.5}},{"entity_number":147,"name":"inserter","position":{"x":8,"y":-4}},{"entity_number":148,"name":"stone-wall","position":{"x":9,"y":-4}},{"entity_number":149,"name":"stone-wall","position":{"x":9,"y":-3}},{"entity_number":150,"name":"land-mine","position":{"x":9.9921875,"y":-2.72265625}},{"entity_number":151,"name":"stone-wall","position":{"x":10,"y":-4}},{"entity_number":152,"name":"stone-wall","position":{"x":11,"y":-3}},{"entity_number":153,"name":"land-mine","position":{"x":12.703125,"y":-3.97265625}},{"entity_number":154,"name":"land-mine","position":{"x":12.046875,"y":-3.15625}},{"entity_number":155,"name":"stone-wall","position":{"x":12,"y":-4}},{"entity_number":156,"name":"stone-wall","position":{"x":13,"y":-3}},{"entity_number":157,"name":"land-mine","position":{"x":-12.140625,"y":-1.0546875}},{"entity_number":158,"name":"land-mine","position":{"x":-10.9609375,"y":-2.07421875}},{"entity_number":159,"name":"stone-wall","position":{"x":-11,"y":-1}},{"entity_number":160,"name":"land-mine","position":{"x":-9.0390625,"y":-1.98046875}},{"entity_number":161,"name":"stone-wall","position":{"x":-10,"y":-2}},{"entity_number":162,"name":"land-mine","position":{"x":-9.8828125,"y":-1.046875}},{"entity_number":163,"name":"stone-wall","position":{"x":-9,"y":-1}},{"entity_number":164,"name":"inserter","position":{"x":-7,"y":-1},"direction":4},{"entity_number":165,"name":"stone-wall","position":{"x":-8,"y":-2}},{"entity_number":166,"name":"stone-wall","position":{"x":-8,"y":-1}},{"entity_number":167,"name":"stone-wall","position":{"x":9,"y":-2}},{"entity_number":168,"name":"gate","position":{"x":9,"y":-1}},{"entity_number":169,"name":"land-mine","position":{"x":11.29296875,"y":-1.58984375}},{"entity_number":170,"name":"land-mine","position":{"x":11.15234375,"y":-0.65625}},{"entity_number":171,"name":"land-mine","position":{"x":9.9375,"y":-0.234375}},{"entity_number":172,"name":"land-mine","position":{"x":9.9375,"y":-1.0546875}},{"entity_number":173,"name":"land-mine","position":{"x":9.90625,"y":-1.875}},{"entity_number":174,"name":"land-mine","position":{"x":12.82421875,"y":-0.17578125}},{"entity_number":175,"name":"land-mine","position":{"x":12.79296875,"y":-1.0234375}},{"entity_number":176,"name":"land-mine","position":{"x":12.82421875,"y":-1.90234375}},{"entity_number":177,"name":"land-mine","position":{"x":-10.9609375,"y":-0.07421875}},{"entity_number":178,"name":"stone-wall","position":{"x":-12,"y":0}},{"entity_number":179,"name":"stone-wall","position":{"x":-11,"y":1}},{"entity_number":180,"name":"land-mine","position":{"x":-8.99609375,"y":0.09765625}},{"entity_number":181,"name":"stone-wall","position":{"x":-10,"y":0}},{"entity_number":182,"name":"land-mine","position":{"x":-9.8828125,"y":0.953125}},{"entity_number":183,"name":"stone-wall","position":{"x":-9,"y":1}},{"entity_number":184,"name":"infinity-chest","position":{"x":-7,"y":1},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":185,"name":"infinity-chest","position":{"x":-7,"y":0},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":186,"name":"stone-wall","position":{"x":-8,"y":0}},{"entity_number":187,"name":"stone-wall","position":{"x":-8,"y":1}},{"entity_number":188,"name":"accumulator","position":{"x":-4.5,"y":0.5}},{"entity_number":189,"name":"accumulator","position":{"x":-2.5,"y":0.5}},{"entity_number":190,"name":"substation","position":{"x":0.5,"y":0.5}},{"entity_number":191,"name":"gate","position":{"x":9,"y":0}},{"entity_number":192,"name":"gate","position":{"x":9,"y":1}},{"entity_number":193,"name":"land-mine","position":{"x":11.32421875,"y":0.27734375}},{"entity_number":194,"name":"land-mine","position":{"x":11.32421875,"y":1.15234375}},{"entity_number":195,"name":"land-mine","position":{"x":10.01953125,"y":1.5234375}},{"entity_number":196,"name":"land-mine","position":{"x":10.01953125,"y":0.671875}},{"entity_number":197,"name":"land-mine","position":{"x":12.8515625,"y":1.60546875}},{"entity_number":198,"name":"land-mine","position":{"x":12.8515625,"y":0.78515625}},{"entity_number":199,"name":"land-mine","position":{"x":-12.140625,"y":3.2109375}},{"entity_number":200,"name":"land-mine","position":{"x":-10.9921875,"y":1.9609375}},{"entity_number":201,"name":"stone-wall","position":{"x":-11,"y":3}},{"entity_number":202,"name":"land-mine","position":{"x":-8.84375,"y":2.09375}},{"entity_number":203,"name":"stone-wall","position":{"x":-10,"y":2}},{"entity_number":204,"name":"land-mine","position":{"x":-9.8828125,"y":2.953125}},{"entity_number":205,"name":"land-mine","position":{"x":-9.0390625,"y":3.875}},{"entity_number":206,"name":"stone-wall","position":{"x":-9,"y":3}},{"entity_number":207,"name":"inserter","position":{"x":-7,"y":2}},{"entity_number":208,"name":"gun-turret","position":{"x":-6.5,"y":3.5}},{"entity_number":209,"name":"stone-wall","position":{"x":-8,"y":2}},{"entity_number":210,"name":"stone-wall","position":{"x":-8,"y":3}},{"entity_number":211,"name":"gun-turret","position":{"x":7.5,"y":3.5}},{"entity_number":212,"name":"gate","position":{"x":9,"y":2}},{"entity_number":213,"name":"stone-wall","position":{"x":9,"y":3}},{"entity_number":214,"name":"land-mine","position":{"x":11.3515625,"y":1.9765625}},{"entity_number":215,"name":"land-mine","position":{"x":10.078125,"y":2.34375}},{"entity_number":216,"name":"stone-wall","position":{"x":11,"y":3}},{"entity_number":217,"name":"land-mine","position":{"x":12.2265625,"y":2.76953125}},{"entity_number":218,"name":"stone-wall","position":{"x":13,"y":3}},{"entity_number":219,"name":"land-mine","position":{"x":-12.140625,"y":5.0390625}},{"entity_number":220,"name":"land-mine","position":{"x":-10.9609375,"y":3.92578125}},{"entity_number":221,"name":"stone-wall","position":{"x":-12,"y":4}},{"entity_number":222,"name":"stone-wall","position":{"x":-11,"y":5}},{"entity_number":223,"name":"stone-wall","position":{"x":-10,"y":4}},{"entity_number":224,"name":"land-mine","position":{"x":-9.8828125,"y":4.953125}},{"entity_number":225,"name":"stone-wall","position":{"x":-9,"y":5}},{"entity_number":226,"name":"stone-wall","position":{"x":-8,"y":4}},{"entity_number":227,"name":"stone-wall","position":{"x":-8,"y":5}},{"entity_number":228,"name":"solar-panel","position":{"x":-4,"y":6}},{"entity_number":229,"name":"solar-panel","position":{"x":-1,"y":6}},{"entity_number":230,"name":"wooden-chest","position":{"x":3,"y":5},"bar":1},{"entity_number":231,"name":"wooden-chest","position":{"x":2,"y":5},"bar":1},{"entity_number":232,"name":"stone-wall","position":{"x":9,"y":4}},{"entity_number":233,"name":"inserter","position":{"x":8,"y":5},"direction":4},{"entity_number":234,"name":"stone-wall","position":{"x":9,"y":5}},{"entity_number":235,"name":"land-mine","position":{"x":11.05859375,"y":3.90625}},{"entity_number":236,"name":"stone-wall","position":{"x":10,"y":4}},{"entity_number":237,"name":"land-mine","position":{"x":11.796875,"y":4.921875}},{"entity_number":238,"name":"land-mine","position":{"x":11.1171875,"y":5.7734375}},{"entity_number":239,"name":"land-mine","position":{"x":9.984375,"y":5.29296875}},{"entity_number":240,"name":"stone-wall","position":{"x":11,"y":5}},{"entity_number":241,"name":"stone-wall","position":{"x":12,"y":4}},{"entity_number":242,"name":"land-mine","position":{"x":-10.9609375,"y":5.92578125}},{"entity_number":243,"name":"stone-wall","position":{"x":-11,"y":7}},{"entity_number":244,"name":"land-mine","position":{"x":-8.99609375,"y":6.03515625}},{"entity_number":245,"name":"stone-wall","position":{"x":-10,"y":6}},{"entity_number":246,"name":"land-mine","position":{"x":-9.8828125,"y":6.953125}},{"entity_number":247,"name":"stone-wall","position":{"x":-9,"y":7}},{"entity_number":248,"name":"stone-wall","position":{"x":-8,"y":6}},{"entity_number":249,"name":"stone-wall","position":{"x":-8,"y":7}},{"entity_number":250,"name":"inserter","position":{"x":3,"y":6},"direction":4},{"entity_number":251,"name":"infinity-chest","position":{"x":3,"y":7},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"raw-fish","count":1,"mode":"at-least","index":1}]}},{"entity_number":252,"name":"infinity-chest","position":{"x":2,"y":7},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"wood","count":1,"mode":"at-least","index":1}]}},{"entity_number":253,"name":"inserter","position":{"x":2,"y":6},"direction":4},{"entity_number":254,"name":"infinity-chest","position":{"x":8,"y":6},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":255,"name":"stone-wall","position":{"x":9,"y":6}},{"entity_number":256,"name":"land-mine","position":{"x":9.8125,"y":7.1015625}},{"entity_number":257,"name":"stone-wall","position":{"x":9,"y":7}},{"entity_number":258,"name":"stone-wall","position":{"x":10,"y":6}},{"entity_number":259,"name":"stone-wall","position":{"x":11,"y":7}},{"entity_number":260,"name":"land-mine","position":{"x":12.1640625,"y":6.70703125}},{"entity_number":261,"name":"stone-wall","position":{"x":12,"y":6}},{"entity_number":262,"name":"land-mine","position":{"x":-11.09765625,"y":7.984375}},{"entity_number":263,"name":"land-mine","position":{"x":-11.12890625,"y":9.765625}},{"entity_number":264,"name":"stone-wall","position":{"x":-11,"y":9}},{"entity_number":265,"name":"land-mine","position":{"x":-8.99609375,"y":8.26171875}},{"entity_number":266,"name":"stone-wall","position":{"x":-10,"y":8}},{"entity_number":267,"name":"land-mine","position":{"x":-9.8828125,"y":8.953125}},{"entity_number":268,"name":"land-mine","position":{"x":-8.99609375,"y":9.78515625}},{"entity_number":269,"name":"stone-wall","position":{"x":-9,"y":9}},{"entity_number":270,"name":"stone-wall","position":{"x":-8,"y":8}},{"entity_number":271,"name":"stone-wall","position":{"x":-7,"y":9}},{"entity_number":272,"name":"stone-wall","position":{"x":-8,"y":9}},{"entity_number":273,"name":"stone-wall","position":{"x":-5,"y":9}},{"entity_number":274,"name":"stone-wall","position":{"x":-6,"y":9}},{"entity_number":275,"name":"stone-wall","position":{"x":-3,"y":9}},{"entity_number":276,"name":"stone-wall","position":{"x":-4,"y":9}},{"entity_number":277,"name":"stone-wall","position":{"x":-1,"y":9}},{"entity_number":278,"name":"stone-wall","position":{"x":-2,"y":9}},{"entity_number":279,"name":"stone-wall","position":{"x":1,"y":9}},{"entity_number":280,"name":"stone-wall","position":{"x":0,"y":9}},{"entity_number":281,"name":"stone-wall","position":{"x":3,"y":9}},{"entity_number":282,"name":"stone-wall","position":{"x":2,"y":9}},{"entity_number":283,"name":"stone-wall","position":{"x":5,"y":9}},{"entity_number":284,"name":"stone-wall","position":{"x":4,"y":9}},{"entity_number":285,"name":"stone-wall","position":{"x":7,"y":9}},{"entity_number":286,"name":"stone-wall","position":{"x":6,"y":9}},{"entity_number":287,"name":"stone-wall","position":{"x":9,"y":8}},{"entity_number":288,"name":"stone-wall","position":{"x":9,"y":9}},{"entity_number":289,"name":"stone-wall","position":{"x":8,"y":9}},{"entity_number":290,"name":"land-mine","position":{"x":11.01171875,"y":8.01953125}},{"entity_number":291,"name":"stone-wall","position":{"x":10,"y":8}},{"entity_number":292,"name":"land-mine","position":{"x":10.265625,"y":9.140625}},{"entity_number":293,"name":"stone-wall","position":{"x":11,"y":9}},{"entity_number":294,"name":"land-mine","position":{"x":12.0234375,"y":8.74609375}},{"entity_number":295,"name":"stone-wall","position":{"x":12,"y":8}},{"entity_number":296,"name":"stone-wall","position":{"x":13,"y":9}},{"entity_number":297,"name":"stone-wall","position":{"x":-11,"y":11}},{"entity_number":298,"name":"land-mine","position":{"x":-8.21484375,"y":10.7265625}},{"entity_number":299,"name":"stone-wall","position":{"x":-10,"y":10}},{"entity_number":300,"name":"land-mine","position":{"x":-9.0078125,"y":11.74609375}},{"entity_number":301,"name":"land-mine","position":{"x":-10.046875,"y":10.9296875}},{"entity_number":302,"name":"stone-wall","position":{"x":-9,"y":11}},{"entity_number":303,"name":"land-mine","position":{"x":-6.21484375,"y":10.7265625}},{"entity_number":304,"name":"land-mine","position":{"x":-7.18359375,"y":10.1328125}},{"entity_number":305,"name":"stone-wall","position":{"x":-8,"y":10}},{"entity_number":306,"name":"stone-wall","position":{"x":-7,"y":11}},{"entity_number":307,"name":"land-mine","position":{"x":-5.18359375,"y":10.1328125}},{"entity_number":308,"name":"stone-wall","position":{"x":-6,"y":10}},{"entity_number":309,"name":"stone-wall","position":{"x":-5,"y":11}},{"entity_number":310,"name":"land-mine","position":{"x":-2.21484375,"y":10.7265625}},{"entity_number":311,"name":"land-mine","position":{"x":-3.18359375,"y":10.1328125}},{"entity_number":312,"name":"stone-wall","position":{"x":-4,"y":10}},{"entity_number":313,"name":"land-mine","position":{"x":-3.984375,"y":11.12890625}},{"entity_number":314,"name":"stone-wall","position":{"x":-3,"y":11}},{"entity_number":315,"name":"land-mine","position":{"x":-0.21484375,"y":10.7265625}},{"entity_number":316,"name":"land-mine","position":{"x":-1.18359375,"y":10.1328125}},{"entity_number":317,"name":"stone-wall","position":{"x":-2,"y":10}},{"entity_number":318,"name":"stone-wall","position":{"x":-1,"y":11}},{"entity_number":319,"name":"land-mine","position":{"x":1.78515625,"y":10.7265625}},{"entity_number":320,"name":"land-mine","position":{"x":0.81640625,"y":10.1328125}},{"entity_number":321,"name":"stone-wall","position":{"x":0,"y":10}},{"entity_number":322,"name":"stone-wall","position":{"x":1,"y":11}},{"entity_number":323,"name":"land-mine","position":{"x":2.81640625,"y":10.1328125}},{"entity_number":324,"name":"stone-wall","position":{"x":2,"y":10}},{"entity_number":325,"name":"land-mine","position":{"x":3.859375,"y":10.94140625}},{"entity_number":326,"name":"stone-wall","position":{"x":3,"y":11}},{"entity_number":327,"name":"land-mine","position":{"x":5.78515625,"y":10.7265625}},{"entity_number":328,"name":"land-mine","position":{"x":4.81640625,"y":10.1328125}},{"entity_number":329,"name":"stone-wall","position":{"x":4,"y":10}},{"entity_number":330,"name":"stone-wall","position":{"x":5,"y":11}},{"entity_number":331,"name":"land-mine","position":{"x":7.78515625,"y":10.7265625}},{"entity_number":332,"name":"land-mine","position":{"x":6.81640625,"y":10.1328125}},{"entity_number":333,"name":"stone-wall","position":{"x":6,"y":10}},{"entity_number":334,"name":"stone-wall","position":{"x":7,"y":11}},{"entity_number":335,"name":"land-mine","position":{"x":8.81640625,"y":10.1328125}},{"entity_number":336,"name":"stone-wall","position":{"x":8,"y":10}},{"entity_number":337,"name":"stone-wall","position":{"x":9,"y":11}},{"entity_number":338,"name":"land-mine","position":{"x":10.81640625,"y":10.1328125}},{"entity_number":339,"name":"stone-wall","position":{"x":10,"y":10}},{"entity_number":340,"name":"land-mine","position":{"x":9.9609375,"y":10.921875}},{"entity_number":341,"name":"stone-wall","position":{"x":11,"y":11}},{"entity_number":342,"name":"land-mine","position":{"x":12.078125,"y":10.69921875}},{"entity_number":343,"name":"stone-wall","position":{"x":12,"y":10}},{"entity_number":344,"name":"stone-wall","position":{"x":-10,"y":12}},{"entity_number":345,"name":"land-mine","position":{"x":-8.31640625,"y":13.04296875}},{"entity_number":346,"name":"land-mine","position":{"x":-6.90234375,"y":12.0546875}},{"entity_number":347,"name":"stone-wall","position":{"x":-8,"y":12}},{"entity_number":348,"name":"stone-wall","position":{"x":-7,"y":13}},{"entity_number":349,"name":"land-mine","position":{"x":-5.71484375,"y":12.79296875}},{"entity_number":350,"name":"land-mine","position":{"x":-4.90234375,"y":12.0546875}},{"entity_number":351,"name":"stone-wall","position":{"x":-6,"y":12}},{"entity_number":352,"name":"stone-wall","position":{"x":-5,"y":13}},{"entity_number":353,"name":"land-mine","position":{"x":-2.90234375,"y":12.0546875}},{"entity_number":354,"name":"stone-wall","position":{"x":-4,"y":12}},{"entity_number":355,"name":"land-mine","position":{"x":-3.76171875,"y":12.93359375}},{"entity_number":356,"name":"land-mine","position":{"x":-0.90234375,"y":12.0546875}},{"entity_number":357,"name":"stone-wall","position":{"x":-2,"y":12}},{"entity_number":358,"name":"land-mine","position":{"x":0.76953125,"y":11.94921875}},{"entity_number":359,"name":"stone-wall","position":{"x":0,"y":12}},{"entity_number":360,"name":"land-mine","position":{"x":-0.0546875,"y":13.1328125}},{"entity_number":361,"name":"stone-wall","position":{"x":1,"y":13}},{"entity_number":362,"name":"land-mine","position":{"x":3.09765625,"y":12.0546875}},{"entity_number":363,"name":"stone-wall","position":{"x":2,"y":12}},{"entity_number":364,"name":"land-mine","position":{"x":1.984375,"y":13.1328125}},{"entity_number":365,"name":"stone-wall","position":{"x":3,"y":13}},{"entity_number":366,"name":"land-mine","position":{"x":5.09765625,"y":12.0546875}},{"entity_number":367,"name":"stone-wall","position":{"x":4,"y":12}},{"entity_number":368,"name":"land-mine","position":{"x":4.0234375,"y":13.10546875}},{"entity_number":369,"name":"stone-wall","position":{"x":5,"y":13}},{"entity_number":370,"name":"land-mine","position":{"x":6.91796875,"y":12.078125}},{"entity_number":371,"name":"stone-wall","position":{"x":6,"y":12}},{"entity_number":372,"name":"land-mine","position":{"x":9.09765625,"y":12.0546875}},{"entity_number":373,"name":"stone-wall","position":{"x":8,"y":12}},{"entity_number":374,"name":"land-mine","position":{"x":10.69140625,"y":12}},{"entity_number":375,"name":"stone-wall","position":{"x":10,"y":12}},{"entity_number":376,"name":"stone-wall","position":{"x":12,"y":12}}],"tiles":[{"position":{"x":-12,"y":-4},"name":"refined-concrete"},{"position":{"x":-12,"y":-3},"name":"refined-concrete"},{"position":{"x":-12,"y":-1},"name":"refined-concrete"},{"position":{"x":-12,"y":0},"name":"refined-concrete"},{"position":{"x":-12,"y":3},"name":"refined-concrete"},{"position":{"x":-12,"y":4},"name":"refined-concrete"},{"position":{"x":-12,"y":5},"name":"refined-concrete"},{"position":{"x":-11,"y":-7},"name":"refined-concrete"},{"position":{"x":-11,"y":-6},"name":"refined-concrete"},{"position":{"x":-11,"y":-5},"name":"refined-concrete"},{"position":{"x":-11,"y":-4},"name":"refined-concrete"},{"position":{"x":-11,"y":-3},"name":"refined-concrete"},{"position":{"x":-11,"y":-2},"name":"refined-concrete"},{"position":{"x":-11,"y":-1},"name":"refined-concrete"},{"position":{"x":-11,"y":0},"name":"refined-concrete"},{"position":{"x":-11,"y":1},"name":"refined-concrete"},{"position":{"x":-11,"y":2},"name":"refined-concrete"},{"position":{"x":-11,"y":3},"name":"refined-concrete"},{"position":{"x":-11,"y":4},"name":"refined-concrete"},{"position":{"x":-11,"y":5},"name":"refined-concrete"},{"position":{"x":-11,"y":6},"name":"refined-concrete"},{"position":{"x":-11,"y":7},"name":"refined-concrete"},{"position":{"x":-11,"y":8},"name":"refined-concrete"},{"position":{"x":-11,"y":9},"name":"refined-concrete"},{"position":{"x":-11,"y":10},"name":"refined-concrete"},{"position":{"x":-11,"y":11},"name":"refined-concrete"},{"position":{"x":-10,"y":-8},"name":"refined-concrete"},{"position":{"x":-10,"y":-7},"name":"refined-concrete"},{"position":{"x":-10,"y":-6},"name":"refined-concrete"},{"position":{"x":-10,"y":-5},"name":"refined-concrete"},{"position":{"x":-10,"y":-4},"name":"refined-concrete"},{"position":{"x":-10,"y":-3},"name":"refined-concrete"},{"position":{"x":-10,"y":-2},"name":"refined-concrete"},{"position":{"x":-10,"y":-1},"name":"refined-concrete"},{"position":{"x":-10,"y":0},"name":"refined-concrete"},{"position":{"x":-10,"y":1},"name":"refined-concrete"},{"position":{"x":-10,"y":2},"name":"refined-concrete"},{"position":{"x":-10,"y":3},"name":"refined-concrete"},{"position":{"x":-10,"y":4},"name":"refined-concrete"},{"position":{"x":-10,"y":5},"name":"refined-concrete"},{"position":{"x":-10,"y":6},"name":"refined-concrete"},{"position":{"x":-10,"y":7},"name":"refined-concrete"},{"position":{"x":-10,"y":8},"name":"refined-concrete"},{"position":{"x":-10,"y":9},"name":"refined-concrete"},{"position":{"x":-10,"y":10},"name":"refined-concrete"},{"position":{"x":-10,"y":11},"name":"refined-concrete"},{"position":{"x":-10,"y":12},"name":"refined-concrete"},{"position":{"x":-9,"y":-10},"name":"refined-concrete"},{"position":{"x":-9,"y":-9},"name":"refined-concrete"},{"position":{"x":-9,"y":-8},"name":"refined-concrete"},{"position":{"x":-9,"y":-7},"name":"refined-concrete"},{"position":{"x":-9,"y":-6},"name":"refined-concrete"},{"position":{"x":-9,"y":-5},"name":"refined-concrete"},{"position":{"x":-9,"y":-4},"name":"refined-concrete"},{"position":{"x":-9,"y":-3},"name":"refined-concrete"},{"position":{"x":-9,"y":-2},"name":"refined-concrete"},{"position":{"x":-9,"y":-1},"name":"refined-concrete"},{"position":{"x":-9,"y":0},"name":"refined-concrete"},{"position":{"x":-9,"y":1},"name":"refined-concrete"},{"position":{"x":-9,"y":2},"name":"refined-concrete"},{"position":{"x":-9,"y":3},"name":"refined-concrete"},{"position":{"x":-9,"y":4},"name":"refined-concrete"},{"position":{"x":-9,"y":5},"name":"refined-concrete"},{"position":{"x":-9,"y":6},"name":"refined-concrete"},{"position":{"x":-9,"y":7},"name":"refined-concrete"},{"position":{"x":-9,"y":8},"name":"refined-concrete"},{"position":{"x":-9,"y":9},"name":"refined-concrete"},{"position":{"x":-9,"y":10},"name":"refined-concrete"},{"position":{"x":-9,"y":11},"name":"refined-concrete"},{"position":{"x":-9,"y":12},"name":"refined-concrete"},{"position":{"x":-8,"y":-10},"name":"refined-concrete"},{"position":{"x":-8,"y":-9},"name":"refined-concrete"},{"position":{"x":-8,"y":-8},"name":"refined-concrete"},{"position":{"x":-8,"y":-7},"name":"refined-concrete"},{"position":{"x":-8,"y":-6},"name":"refined-concrete"},{"position":{"x":-8,"y":-5},"name":"refined-concrete"},{"position":{"x":-8,"y":-4},"name":"refined-concrete"},{"position":{"x":-8,"y":-3},"name":"refined-concrete"},{"position":{"x":-8,"y":-2},"name":"refined-concrete"},{"position":{"x":-8,"y":-1},"name":"refined-concrete"},{"position":{"x":-8,"y":0},"name":"refined-concrete"},{"position":{"x":-8,"y":1},"name":"refined-concrete"},{"position":{"x":-8,"y":2},"name":"refined-concrete"},{"position":{"x":-8,"y":3},"name":"refined-concrete"},{"position":{"x":-8,"y":4},"name":"refined-concrete"},{"position":{"x":-8,"y":5},"name":"refined-concrete"},{"position":{"x":-8,"y":6},"name":"refined-concrete"},{"position":{"x":-8,"y":7},"name":"refined-concrete"},{"position":{"x":-8,"y":8},"name":"refined-concrete"},{"position":{"x":-8,"y":9},"name":"refined-concrete"},{"position":{"x":-8,"y":10},"name":"refined-concrete"},{"position":{"x":-8,"y":11},"name":"refined-concrete"},{"position":{"x":-8,"y":12},"name":"refined-concrete"},{"position":{"x":-8,"y":13},"name":"refined-concrete"},{"position":{"x":-7,"y":-12},"name":"refined-concrete"},{"position":{"x":-7,"y":-11},"name":"refined-concrete"},{"position":{"x":-7,"y":-10},"name":"refined-concrete"},{"position":{"x":-7,"y":-9},"name":"refined-concrete"},{"position":{"x":-7,"y":-8},"name":"refined-concrete"},{"position":{"x":-7,"y":-7},"name":"refined-concrete"},{"position":{"x":-7,"y":-6},"name":"refined-concrete"},{"position":{"x":-7,"y":-5},"name":"refined-concrete"},{"position":{"x":-7,"y":-4},"name":"refined-concrete"},{"position":{"x":-7,"y":-3},"name":"refined-concrete"},{"position":{"x":-7,"y":-2},"name":"refined-concrete"},{"position":{"x":-7,"y":-1},"name":"refined-concrete"},{"position":{"x":-7,"y":0},"name":"refined-concrete"},{"position":{"x":-7,"y":1},"name":"refined-concrete"},{"position":{"x":-7,"y":2},"name":"refined-concrete"},{"position":{"x":-7,"y":3},"name":"refined-concrete"},{"position":{"x":-7,"y":4},"name":"refined-concrete"},{"position":{"x":-7,"y":5},"name":"refined-concrete"},{"position":{"x":-7,"y":6},"name":"refined-concrete"},{"position":{"x":-7,"y":7},"name":"refined-concrete"},{"position":{"x":-7,"y":8},"name":"refined-concrete"},{"position":{"x":-7,"y":9},"name":"refined-concrete"},{"position":{"x":-7,"y":10},"name":"refined-concrete"},{"position":{"x":-7,"y":11},"name":"refined-concrete"},{"position":{"x":-7,"y":12},"name":"refined-concrete"},{"position":{"x":-7,"y":13},"name":"refined-concrete"},{"position":{"x":-6,"y":-12},"name":"refined-concrete"},{"position":{"x":-6,"y":-11},"name":"refined-concrete"},{"position":{"x":-6,"y":-10},"name":"refined-concrete"},{"position":{"x":-6,"y":-9},"name":"refined-concrete"},{"position":{"x":-6,"y":-8},"name":"refined-concrete"},{"position":{"x":-6,"y":-7},"name":"refined-concrete"},{"position":{"x":-6,"y":-6},"name":"refined-concrete"},{"position":{"x":-6,"y":-5},"name":"refined-concrete"},{"position":{"x":-6,"y":-4},"name":"refined-concrete"},{"position":{"x":-6,"y":-3},"name":"refined-concrete"},{"position":{"x":-6,"y":-2},"name":"refined-concrete"},{"position":{"x":-6,"y":-1},"name":"refined-concrete"},{"position":{"x":-6,"y":0},"name":"refined-concrete"},{"position":{"x":-6,"y":1},"name":"refined-concrete"},{"position":{"x":-6,"y":2},"name":"refined-concrete"},{"position":{"x":-6,"y":3},"name":"refined-concrete"},{"position":{"x":-6,"y":4},"name":"refined-concrete"},{"position":{"x":-6,"y":5},"name":"refined-concrete"},{"position":{"x":-6,"y":6},"name":"refined-concrete"},{"position":{"x":-6,"y":7},"name":"refined-concrete"},{"position":{"x":-6,"y":8},"name":"refined-concrete"},{"position":{"x":-6,"y":9},"name":"refined-concrete"},{"position":{"x":-6,"y":10},"name":"refined-concrete"},{"position":{"x":-6,"y":11},"name":"refined-concrete"},{"position":{"x":-6,"y":12},"name":"refined-concrete"},{"position":{"x":-6,"y":13},"name":"refined-concrete"},{"position":{"x":-5,"y":-12},"name":"refined-concrete"},{"position":{"x":-5,"y":-11},"name":"refined-concrete"},{"position":{"x":-5,"y":-10},"name":"refined-concrete"},{"position":{"x":-5,"y":-9},"name":"refined-concrete"},{"position":{"x":-5,"y":-8},"name":"refined-concrete"},{"position":{"x":-5,"y":-7},"name":"refined-concrete"},{"position":{"x":-5,"y":-6},"name":"refined-concrete"},{"position":{"x":-5,"y":-5},"name":"refined-concrete"},{"position":{"x":-5,"y":-4},"name":"refined-concrete"},{"position":{"x":-5,"y":-3},"name":"refined-concrete"},{"position":{"x":-5,"y":-2},"name":"refined-concrete"},{"position":{"x":-5,"y":-1},"name":"refined-concrete"},{"position":{"x":-5,"y":0},"name":"refined-concrete"},{"position":{"x":-5,"y":1},"name":"refined-concrete"},{"position":{"x":-5,"y":2},"name":"refined-concrete"},{"position":{"x":-5,"y":3},"name":"refined-concrete"},{"position":{"x":-5,"y":4},"name":"refined-concrete"},{"position":{"x":-5,"y":5},"name":"refined-concrete"},{"position":{"x":-5,"y":6},"name":"refined-concrete"},{"position":{"x":-5,"y":7},"name":"refined-concrete"},{"position":{"x":-5,"y":8},"name":"refined-concrete"},{"position":{"x":-5,"y":9},"name":"refined-concrete"},{"position":{"x":-5,"y":10},"name":"refined-concrete"},{"position":{"x":-5,"y":11},"name":"refined-concrete"},{"position":{"x":-5,"y":12},"name":"refined-concrete"},{"position":{"x":-5,"y":13},"name":"refined-concrete"},{"position":{"x":-4,"y":-12},"name":"refined-concrete"},{"position":{"x":-4,"y":-11},"name":"refined-concrete"},{"position":{"x":-4,"y":-10},"name":"refined-concrete"},{"position":{"x":-4,"y":-9},"name":"refined-concrete"},{"position":{"x":-4,"y":-8},"name":"refined-concrete"},{"position":{"x":-4,"y":-7},"name":"refined-concrete"},{"position":{"x":-4,"y":-6},"name":"refined-concrete"},{"position":{"x":-4,"y":-5},"name":"refined-concrete"},{"position":{"x":-4,"y":-4},"name":"refined-concrete"},{"position":{"x":-4,"y":-3},"name":"refined-concrete"},{"position":{"x":-4,"y":-2},"name":"refined-concrete"},{"position":{"x":-4,"y":-1},"name":"refined-concrete"},{"position":{"x":-4,"y":0},"name":"refined-concrete"},{"position":{"x":-4,"y":1},"name":"refined-concrete"},{"position":{"x":-4,"y":2},"name":"refined-concrete"},{"position":{"x":-4,"y":3},"name":"refined-concrete"},{"position":{"x":-4,"y":4},"name":"refined-concrete"},{"position":{"x":-4,"y":5},"name":"refined-concrete"},{"position":{"x":-4,"y":6},"name":"refined-concrete"},{"position":{"x":-4,"y":7},"name":"refined-concrete"},{"position":{"x":-4,"y":8},"name":"refined-concrete"},{"position":{"x":-4,"y":9},"name":"refined-concrete"},{"position":{"x":-4,"y":10},"name":"refined-concrete"},{"position":{"x":-4,"y":11},"name":"refined-concrete"},{"position":{"x":-4,"y":12},"name":"refined-concrete"},{"position":{"x":-4,"y":13},"name":"refined-concrete"},{"position":{"x":-3,"y":-12},"name":"refined-concrete"},{"position":{"x":-3,"y":-11},"name":"refined-concrete"},{"position":{"x":-3,"y":-10},"name":"refined-concrete"},{"position":{"x":-3,"y":-9},"name":"refined-concrete"},{"position":{"x":-3,"y":-8},"name":"refined-concrete"},{"position":{"x":-3,"y":-7},"name":"refined-concrete"},{"position":{"x":-3,"y":-6},"name":"refined-concrete"},{"position":{"x":-3,"y":-5},"name":"refined-concrete"},{"position":{"x":-3,"y":-4},"name":"refined-concrete"},{"position":{"x":-3,"y":-3},"name":"refined-concrete"},{"position":{"x":-3,"y":-2},"name":"refined-concrete"},{"position":{"x":-3,"y":-1},"name":"refined-concrete"},{"position":{"x":-3,"y":0},"name":"refined-concrete"},{"position":{"x":-3,"y":1},"name":"refined-concrete"},{"position":{"x":-3,"y":2},"name":"refined-concrete"},{"position":{"x":-3,"y":3},"name":"refined-concrete"},{"position":{"x":-3,"y":4},"name":"refined-concrete"},{"position":{"x":-3,"y":5},"name":"refined-concrete"},{"position":{"x":-3,"y":6},"name":"refined-concrete"},{"position":{"x":-3,"y":7},"name":"refined-concrete"},{"position":{"x":-3,"y":8},"name":"refined-concrete"},{"position":{"x":-3,"y":9},"name":"refined-concrete"},{"position":{"x":-3,"y":10},"name":"refined-concrete"},{"position":{"x":-3,"y":11},"name":"refined-concrete"},{"position":{"x":-3,"y":12},"name":"refined-concrete"},{"position":{"x":-2,"y":-12},"name":"refined-concrete"},{"position":{"x":-2,"y":-11},"name":"refined-concrete"},{"position":{"x":-2,"y":-10},"name":"refined-concrete"},{"position":{"x":-2,"y":-9},"name":"refined-concrete"},{"position":{"x":-2,"y":-8},"name":"refined-concrete"},{"position":{"x":-2,"y":-7},"name":"refined-concrete"},{"position":{"x":-2,"y":-6},"name":"refined-concrete"},{"position":{"x":-2,"y":-5},"name":"refined-concrete"},{"position":{"x":-2,"y":-4},"name":"refined-concrete"},{"position":{"x":-2,"y":-3},"name":"refined-concrete"},{"position":{"x":-2,"y":-2},"name":"refined-concrete"},{"position":{"x":-2,"y":-1},"name":"refined-concrete"},{"position":{"x":-2,"y":0},"name":"refined-concrete"},{"position":{"x":-2,"y":1},"name":"refined-concrete"},{"position":{"x":-2,"y":2},"name":"refined-concrete"},{"position":{"x":-2,"y":3},"name":"refined-concrete"},{"position":{"x":-2,"y":4},"name":"refined-concrete"},{"position":{"x":-2,"y":5},"name":"refined-concrete"},{"position":{"x":-2,"y":6},"name":"refined-concrete"},{"position":{"x":-2,"y":7},"name":"refined-concrete"},{"position":{"x":-2,"y":8},"name":"refined-concrete"},{"position":{"x":-2,"y":9},"name":"refined-concrete"},{"position":{"x":-2,"y":10},"name":"refined-concrete"},{"position":{"x":-2,"y":11},"name":"refined-concrete"},{"position":{"x":-2,"y":12},"name":"refined-concrete"},{"position":{"x":-1,"y":-11},"name":"refined-concrete"},{"position":{"x":-1,"y":-10},"name":"refined-concrete"},{"position":{"x":-1,"y":-9},"name":"refined-concrete"},{"position":{"x":-1,"y":-8},"name":"refined-concrete"},{"position":{"x":-1,"y":-7},"name":"refined-concrete"},{"position":{"x":-1,"y":-6},"name":"refined-concrete"},{"position":{"x":-1,"y":-5},"name":"refined-concrete"},{"position":{"x":-1,"y":-4},"name":"refined-concrete"},{"position":{"x":-1,"y":-3},"name":"refined-concrete"},{"position":{"x":-1,"y":-2},"name":"refined-concrete"},{"position":{"x":-1,"y":-1},"name":"refined-concrete"},{"position":{"x":-1,"y":0},"name":"refined-concrete"},{"position":{"x":-1,"y":1},"name":"refined-concrete"},{"position":{"x":-1,"y":2},"name":"refined-concrete"},{"position":{"x":-1,"y":3},"name":"refined-concrete"},{"position":{"x":-1,"y":4},"name":"refined-concrete"},{"position":{"x":-1,"y":5},"name":"refined-concrete"},{"position":{"x":-1,"y":6},"name":"refined-concrete"},{"position":{"x":-1,"y":7},"name":"refined-concrete"},{"position":{"x":-1,"y":8},"name":"refined-concrete"},{"position":{"x":-1,"y":9},"name":"refined-concrete"},{"position":{"x":-1,"y":10},"name":"refined-concrete"},{"position":{"x":-1,"y":11},"name":"refined-concrete"},{"position":{"x":-1,"y":12},"name":"refined-concrete"},{"position":{"x":0,"y":-11},"name":"refined-concrete"},{"position":{"x":0,"y":-10},"name":"refined-concrete"},{"position":{"x":0,"y":-9},"name":"refined-concrete"},{"position":{"x":0,"y":-8},"name":"refined-concrete"},{"position":{"x":0,"y":-7},"name":"refined-concrete"},{"position":{"x":0,"y":-6},"name":"refined-concrete"},{"position":{"x":0,"y":-5},"name":"refined-concrete"},{"position":{"x":0,"y":-4},"name":"refined-concrete"},{"position":{"x":0,"y":-3},"name":"refined-concrete"},{"position":{"x":0,"y":-2},"name":"refined-concrete"},{"position":{"x":0,"y":-1},"name":"refined-concrete"},{"position":{"x":0,"y":0},"name":"refined-concrete"},{"position":{"x":0,"y":1},"name":"refined-concrete"},{"position":{"x":0,"y":2},"name":"refined-concrete"},{"position":{"x":0,"y":3},"name":"refined-concrete"},{"position":{"x":0,"y":4},"name":"refined-concrete"},{"position":{"x":0,"y":5},"name":"refined-concrete"},{"position":{"x":0,"y":6},"name":"refined-concrete"},{"position":{"x":0,"y":7},"name":"refined-concrete"},{"position":{"x":0,"y":8},"name":"refined-concrete"},{"position":{"x":0,"y":9},"name":"refined-concrete"},{"position":{"x":0,"y":10},"name":"refined-concrete"},{"position":{"x":0,"y":11},"name":"refined-concrete"},{"position":{"x":0,"y":12},"name":"refined-concrete"},{"position":{"x":0,"y":13},"name":"refined-concrete"},{"position":{"x":1,"y":-11},"name":"refined-concrete"},{"position":{"x":1,"y":-10},"name":"refined-concrete"},{"position":{"x":1,"y":-9},"name":"refined-concrete"},{"position":{"x":1,"y":-8},"name":"refined-concrete"},{"position":{"x":1,"y":-7},"name":"refined-concrete"},{"position":{"x":1,"y":-6},"name":"refined-concrete"},{"position":{"x":1,"y":-5},"name":"refined-concrete"},{"position":{"x":1,"y":-4},"name":"refined-concrete"},{"position":{"x":1,"y":-3},"name":"refined-concrete"},{"position":{"x":1,"y":-2},"name":"refined-concrete"},{"position":{"x":1,"y":-1},"name":"refined-concrete"},{"position":{"x":1,"y":0},"name":"refined-concrete"},{"position":{"x":1,"y":1},"name":"refined-concrete"},{"position":{"x":1,"y":2},"name":"refined-concrete"},{"position":{"x":1,"y":3},"name":"refined-concrete"},{"position":{"x":1,"y":4},"name":"refined-concrete"},{"position":{"x":1,"y":5},"name":"refined-concrete"},{"position":{"x":1,"y":6},"name":"refined-concrete"},{"position":{"x":1,"y":7},"name":"refined-concrete"},{"position":{"x":1,"y":8},"name":"refined-concrete"},{"position":{"x":1,"y":9},"name":"refined-concrete"},{"position":{"x":1,"y":10},"name":"refined-concrete"},{"position":{"x":1,"y":11},"name":"refined-concrete"},{"position":{"x":1,"y":12},"name":"refined-concrete"},{"position":{"x":1,"y":13},"name":"refined-concrete"},{"position":{"x":2,"y":-12},"name":"refined-concrete"},{"position":{"x":2,"y":-11},"name":"refined-concrete"},{"position":{"x":2,"y":-10},"name":"refined-concrete"},{"position":{"x":2,"y":-9},"name":"refined-concrete"},{"position":{"x":2,"y":-8},"name":"refined-concrete"},{"position":{"x":2,"y":-7},"name":"refined-concrete"},{"position":{"x":2,"y":-6},"name":"refined-concrete"},{"position":{"x":2,"y":-5},"name":"refined-concrete"},{"position":{"x":2,"y":-4},"name":"refined-concrete"},{"position":{"x":2,"y":-3},"name":"refined-concrete"},{"position":{"x":2,"y":-2},"name":"refined-concrete"},{"position":{"x":2,"y":-1},"name":"refined-concrete"},{"position":{"x":2,"y":0},"name":"refined-concrete"},{"position":{"x":2,"y":1},"name":"refined-concrete"},{"position":{"x":2,"y":2},"name":"refined-concrete"},{"position":{"x":2,"y":3},"name":"refined-concrete"},{"position":{"x":2,"y":4},"name":"refined-concrete"},{"position":{"x":2,"y":5},"name":"refined-concrete"},{"position":{"x":2,"y":6},"name":"refined-concrete"},{"position":{"x":2,"y":7},"name":"refined-concrete"},{"position":{"x":2,"y":8},"name":"refined-concrete"},{"position":{"x":2,"y":9},"name":"refined-concrete"},{"position":{"x":2,"y":10},"name":"refined-concrete"},{"position":{"x":2,"y":11},"name":"refined-concrete"},{"position":{"x":2,"y":12},"name":"refined-concrete"},{"position":{"x":2,"y":13},"name":"refined-concrete"},{"position":{"x":3,"y":-12},"name":"refined-concrete"},{"position":{"x":3,"y":-11},"name":"refined-concrete"},{"position":{"x":3,"y":-10},"name":"refined-concrete"},{"position":{"x":3,"y":-9},"name":"refined-concrete"},{"position":{"x":3,"y":-8},"name":"refined-concrete"},{"position":{"x":3,"y":-7},"name":"refined-concrete"},{"position":{"x":3,"y":-6},"name":"refined-concrete"},{"position":{"x":3,"y":-5},"name":"refined-concrete"},{"position":{"x":3,"y":-4},"name":"refined-concrete"},{"position":{"x":3,"y":-3},"name":"refined-concrete"},{"position":{"x":3,"y":-2},"name":"refined-concrete"},{"position":{"x":3,"y":-1},"name":"refined-concrete"},{"position":{"x":3,"y":0},"name":"refined-concrete"},{"position":{"x":3,"y":1},"name":"refined-concrete"},{"position":{"x":3,"y":2},"name":"refined-concrete"},{"position":{"x":3,"y":3},"name":"refined-concrete"},{"position":{"x":3,"y":4},"name":"refined-concrete"},{"position":{"x":3,"y":5},"name":"refined-concrete"},{"position":{"x":3,"y":6},"name":"refined-concrete"},{"position":{"x":3,"y":7},"name":"refined-concrete"},{"position":{"x":3,"y":8},"name":"refined-concrete"},{"position":{"x":3,"y":9},"name":"refined-concrete"},{"position":{"x":3,"y":10},"name":"refined-concrete"},{"position":{"x":3,"y":11},"name":"refined-concrete"},{"position":{"x":3,"y":12},"name":"refined-concrete"},{"position":{"x":3,"y":13},"name":"refined-concrete"},{"position":{"x":4,"y":-12},"name":"refined-concrete"},{"position":{"x":4,"y":-11},"name":"refined-concrete"},{"position":{"x":4,"y":-10},"name":"refined-concrete"},{"position":{"x":4,"y":-9},"name":"refined-concrete"},{"position":{"x":4,"y":-8},"name":"refined-concrete"},{"position":{"x":4,"y":-7},"name":"refined-concrete"},{"position":{"x":4,"y":-6},"name":"refined-concrete"},{"position":{"x":4,"y":-5},"name":"refined-concrete"},{"position":{"x":4,"y":-4},"name":"refined-concrete"},{"position":{"x":4,"y":-3},"name":"refined-concrete"},{"position":{"x":4,"y":-2},"name":"refined-concrete"},{"position":{"x":4,"y":-1},"name":"refined-concrete"},{"position":{"x":4,"y":0},"name":"refined-concrete"},{"position":{"x":4,"y":1},"name":"refined-concrete"},{"position":{"x":4,"y":2},"name":"refined-concrete"},{"position":{"x":4,"y":3},"name":"refined-concrete"},{"position":{"x":4,"y":4},"name":"refined-concrete"},{"position":{"x":4,"y":5},"name":"refined-concrete"},{"position":{"x":4,"y":6},"name":"refined-concrete"},{"position":{"x":4,"y":7},"name":"refined-concrete"},{"position":{"x":4,"y":8},"name":"refined-concrete"},{"position":{"x":4,"y":9},"name":"refined-concrete"},{"position":{"x":4,"y":10},"name":"refined-concrete"},{"position":{"x":4,"y":11},"name":"refined-concrete"},{"position":{"x":4,"y":12},"name":"refined-concrete"},{"position":{"x":4,"y":13},"name":"refined-concrete"},{"position":{"x":5,"y":-12},"name":"refined-concrete"},{"position":{"x":5,"y":-11},"name":"refined-concrete"},{"position":{"x":5,"y":-10},"name":"refined-concrete"},{"position":{"x":5,"y":-9},"name":"refined-concrete"},{"position":{"x":5,"y":-8},"name":"refined-concrete"},{"position":{"x":5,"y":-7},"name":"refined-concrete"},{"position":{"x":5,"y":-6},"name":"refined-concrete"},{"position":{"x":5,"y":-5},"name":"refined-concrete"},{"position":{"x":5,"y":-4},"name":"refined-concrete"},{"position":{"x":5,"y":-3},"name":"refined-concrete"},{"position":{"x":5,"y":-2},"name":"refined-concrete"},{"position":{"x":5,"y":-1},"name":"refined-concrete"},{"position":{"x":5,"y":0},"name":"refined-concrete"},{"position":{"x":5,"y":1},"name":"refined-concrete"},{"position":{"x":5,"y":2},"name":"refined-concrete"},{"position":{"x":5,"y":3},"name":"refined-concrete"},{"position":{"x":5,"y":4},"name":"refined-concrete"},{"position":{"x":5,"y":5},"name":"refined-concrete"},{"position":{"x":5,"y":6},"name":"refined-concrete"},{"position":{"x":5,"y":7},"name":"refined-concrete"},{"position":{"x":5,"y":8},"name":"refined-concrete"},{"position":{"x":5,"y":9},"name":"refined-concrete"},{"position":{"x":5,"y":10},"name":"refined-concrete"},{"position":{"x":5,"y":11},"name":"refined-concrete"},{"position":{"x":5,"y":12},"name":"refined-concrete"},{"position":{"x":5,"y":13},"name":"refined-concrete"},{"position":{"x":6,"y":-11},"name":"refined-concrete"},{"position":{"x":6,"y":-10},"name":"refined-concrete"},{"position":{"x":6,"y":-9},"name":"refined-concrete"},{"position":{"x":6,"y":-8},"name":"refined-concrete"},{"position":{"x":6,"y":-7},"name":"refined-concrete"},{"position":{"x":6,"y":-6},"name":"refined-concrete"},{"position":{"x":6,"y":-5},"name":"refined-concrete"},{"position":{"x":6,"y":-4},"name":"refined-concrete"},{"position":{"x":6,"y":-3},"name":"refined-concrete"},{"position":{"x":6,"y":-2},"name":"refined-concrete"},{"position":{"x":6,"y":-1},"name":"refined-concrete"},{"position":{"x":6,"y":0},"name":"refined-concrete"},{"position":{"x":6,"y":1},"name":"refined-concrete"},{"position":{"x":6,"y":2},"name":"refined-concrete"},{"position":{"x":6,"y":3},"name":"refined-concrete"},{"position":{"x":6,"y":4},"name":"refined-concrete"},{"position":{"x":6,"y":5},"name":"refined-concrete"},{"position":{"x":6,"y":6},"name":"refined-concrete"},{"position":{"x":6,"y":7},"name":"refined-concrete"},{"position":{"x":6,"y":8},"name":"refined-concrete"},{"position":{"x":6,"y":9},"name":"refined-concrete"},{"position":{"x":6,"y":10},"name":"refined-concrete"},{"position":{"x":6,"y":11},"name":"refined-concrete"},{"position":{"x":6,"y":12},"name":"refined-concrete"},{"position":{"x":7,"y":-11},"name":"refined-concrete"},{"position":{"x":7,"y":-10},"name":"refined-concrete"},{"position":{"x":7,"y":-9},"name":"refined-concrete"},{"position":{"x":7,"y":-8},"name":"refined-concrete"},{"position":{"x":7,"y":-7},"name":"refined-concrete"},{"position":{"x":7,"y":-6},"name":"refined-concrete"},{"position":{"x":7,"y":-5},"name":"refined-concrete"},{"position":{"x":7,"y":-4},"name":"refined-concrete"},{"position":{"x":7,"y":-3},"name":"refined-concrete"},{"position":{"x":7,"y":-2},"name":"refined-concrete"},{"position":{"x":7,"y":-1},"name":"refined-concrete"},{"position":{"x":7,"y":0},"name":"refined-concrete"},{"position":{"x":7,"y":1},"name":"refined-concrete"},{"position":{"x":7,"y":2},"name":"refined-concrete"},{"position":{"x":7,"y":3},"name":"refined-concrete"},{"position":{"x":7,"y":4},"name":"refined-concrete"},{"position":{"x":7,"y":5},"name":"refined-concrete"},{"position":{"x":7,"y":6},"name":"refined-concrete"},{"position":{"x":7,"y":7},"name":"refined-concrete"},{"position":{"x":7,"y":8},"name":"refined-concrete"},{"position":{"x":7,"y":9},"name":"refined-concrete"},{"position":{"x":7,"y":10},"name":"refined-concrete"},{"position":{"x":7,"y":11},"name":"refined-concrete"},{"position":{"x":7,"y":12},"name":"refined-concrete"},{"position":{"x":8,"y":-11},"name":"refined-concrete"},{"position":{"x":8,"y":-10},"name":"refined-concrete"},{"position":{"x":8,"y":-9},"name":"refined-concrete"},{"position":{"x":8,"y":-8},"name":"refined-concrete"},{"position":{"x":8,"y":-7},"name":"refined-concrete"},{"position":{"x":8,"y":-6},"name":"refined-concrete"},{"position":{"x":8,"y":-5},"name":"refined-concrete"},{"position":{"x":8,"y":-4},"name":"refined-concrete"},{"position":{"x":8,"y":-3},"name":"refined-concrete"},{"position":{"x":8,"y":-2},"name":"refined-concrete"},{"position":{"x":8,"y":-1},"name":"refined-concrete"},{"position":{"x":8,"y":0},"name":"refined-concrete"},{"position":{"x":8,"y":1},"name":"refined-concrete"},{"position":{"x":8,"y":2},"name":"refined-concrete"},{"position":{"x":8,"y":3},"name":"refined-concrete"},{"position":{"x":8,"y":4},"name":"refined-concrete"},{"position":{"x":8,"y":5},"name":"refined-concrete"},{"position":{"x":8,"y":6},"name":"refined-concrete"},{"position":{"x":8,"y":7},"name":"refined-concrete"},{"position":{"x":8,"y":8},"name":"refined-concrete"},{"position":{"x":8,"y":9},"name":"refined-concrete"},{"position":{"x":8,"y":10},"name":"refined-concrete"},{"position":{"x":8,"y":11},"name":"refined-concrete"},{"position":{"x":8,"y":12},"name":"refined-concrete"},{"position":{"x":9,"y":-11},"name":"refined-concrete"},{"position":{"x":9,"y":-10},"name":"refined-concrete"},{"position":{"x":9,"y":-9},"name":"refined-concrete"},{"position":{"x":9,"y":-8},"name":"refined-concrete"},{"position":{"x":9,"y":-7},"name":"refined-concrete"},{"position":{"x":9,"y":-6},"name":"refined-concrete"},{"position":{"x":9,"y":-5},"name":"refined-concrete"},{"position":{"x":9,"y":-4},"name":"refined-concrete"},{"position":{"x":9,"y":-3},"name":"refined-concrete"},{"position":{"x":9,"y":-2},"name":"refined-concrete"},{"position":{"x":9,"y":-1},"name":"refined-concrete"},{"position":{"x":9,"y":0},"name":"refined-concrete"},{"position":{"x":9,"y":1},"name":"refined-concrete"},{"position":{"x":9,"y":2},"name":"refined-concrete"},{"position":{"x":9,"y":3},"name":"refined-concrete"},{"position":{"x":9,"y":4},"name":"refined-concrete"},{"position":{"x":9,"y":5},"name":"refined-concrete"},{"position":{"x":9,"y":6},"name":"refined-concrete"},{"position":{"x":9,"y":7},"name":"refined-concrete"},{"position":{"x":9,"y":8},"name":"refined-concrete"},{"position":{"x":9,"y":9},"name":"refined-concrete"},{"position":{"x":9,"y":10},"name":"refined-concrete"},{"position":{"x":9,"y":11},"name":"refined-concrete"},{"position":{"x":9,"y":12},"name":"refined-concrete"},{"position":{"x":10,"y":-10},"name":"refined-concrete"},{"position":{"x":10,"y":-9},"name":"refined-concrete"},{"position":{"x":10,"y":-8},"name":"refined-concrete"},{"position":{"x":10,"y":-7},"name":"refined-concrete"},{"position":{"x":10,"y":-6},"name":"refined-concrete"},{"position":{"x":10,"y":-5},"name":"refined-concrete"},{"position":{"x":10,"y":-4},"name":"refined-concrete"},{"position":{"x":10,"y":-3},"name":"refined-concrete"},{"position":{"x":10,"y":-2},"name":"refined-concrete"},{"position":{"x":10,"y":-1},"name":"refined-concrete"},{"position":{"x":10,"y":0},"name":"refined-concrete"},{"position":{"x":10,"y":1},"name":"refined-concrete"},{"position":{"x":10,"y":2},"name":"refined-concrete"},{"position":{"x":10,"y":3},"name":"refined-concrete"},{"position":{"x":10,"y":4},"name":"refined-concrete"},{"position":{"x":10,"y":5},"name":"refined-concrete"},{"position":{"x":10,"y":6},"name":"refined-concrete"},{"position":{"x":10,"y":7},"name":"refined-concrete"},{"position":{"x":10,"y":8},"name":"refined-concrete"},{"position":{"x":10,"y":9},"name":"refined-concrete"},{"position":{"x":10,"y":10},"name":"refined-concrete"},{"position":{"x":10,"y":11},"name":"refined-concrete"},{"position":{"x":10,"y":12},"name":"refined-concrete"},{"position":{"x":11,"y":-10},"name":"refined-concrete"},{"position":{"x":11,"y":-9},"name":"refined-concrete"},{"position":{"x":11,"y":-8},"name":"refined-concrete"},{"position":{"x":11,"y":-7},"name":"refined-concrete"},{"position":{"x":11,"y":-6},"name":"refined-concrete"},{"position":{"x":11,"y":-5},"name":"refined-concrete"},{"position":{"x":11,"y":-4},"name":"refined-concrete"},{"position":{"x":11,"y":-3},"name":"refined-concrete"},{"position":{"x":11,"y":-2},"name":"refined-concrete"},{"position":{"x":11,"y":-1},"name":"refined-concrete"},{"position":{"x":11,"y":0},"name":"refined-concrete"},{"position":{"x":11,"y":1},"name":"refined-concrete"},{"position":{"x":11,"y":2},"name":"refined-concrete"},{"position":{"x":11,"y":3},"name":"refined-concrete"},{"position":{"x":11,"y":4},"name":"refined-concrete"},{"position":{"x":11,"y":5},"name":"refined-concrete"},{"position":{"x":11,"y":6},"name":"refined-concrete"},{"position":{"x":11,"y":7},"name":"refined-concrete"},{"position":{"x":11,"y":8},"name":"refined-concrete"},{"position":{"x":11,"y":9},"name":"refined-concrete"},{"position":{"x":11,"y":10},"name":"refined-concrete"},{"position":{"x":11,"y":11},"name":"refined-concrete"},{"position":{"x":11,"y":12},"name":"refined-concrete"},{"position":{"x":12,"y":-9},"name":"refined-concrete"},{"position":{"x":12,"y":-8},"name":"refined-concrete"},{"position":{"x":12,"y":-7},"name":"refined-concrete"},{"position":{"x":12,"y":-6},"name":"refined-concrete"},{"position":{"x":12,"y":-5},"name":"refined-concrete"},{"position":{"x":12,"y":-4},"name":"refined-concrete"},{"position":{"x":12,"y":-3},"name":"refined-concrete"},{"position":{"x":12,"y":-2},"name":"refined-concrete"},{"position":{"x":12,"y":-1},"name":"refined-concrete"},{"position":{"x":12,"y":0},"name":"refined-concrete"},{"position":{"x":12,"y":1},"name":"refined-concrete"},{"position":{"x":12,"y":2},"name":"refined-concrete"},{"position":{"x":12,"y":3},"name":"refined-concrete"},{"position":{"x":12,"y":4},"name":"refined-concrete"},{"position":{"x":12,"y":5},"name":"refined-concrete"},{"position":{"x":12,"y":6},"name":"refined-concrete"},{"position":{"x":12,"y":7},"name":"refined-concrete"},{"position":{"x":12,"y":8},"name":"refined-concrete"},{"position":{"x":12,"y":9},"name":"refined-concrete"},{"position":{"x":12,"y":10},"name":"refined-concrete"},{"position":{"x":12,"y":11},"name":"refined-concrete"},{"position":{"x":12,"y":12},"name":"refined-concrete"},{"position":{"x":13,"y":-8},"name":"refined-concrete"},{"position":{"x":13,"y":-7},"name":"refined-concrete"},{"position":{"x":13,"y":-6},"name":"refined-concrete"},{"position":{"x":13,"y":-5},"name":"refined-concrete"},{"position":{"x":13,"y":-4},"name":"refined-concrete"},{"position":{"x":13,"y":-3},"name":"refined-concrete"},{"position":{"x":13,"y":-2},"name":"refined-concrete"},{"position":{"x":13,"y":-1},"name":"refined-concrete"},{"position":{"x":13,"y":0},"name":"refined-concrete"},{"position":{"x":13,"y":1},"name":"refined-concrete"},{"position":{"x":13,"y":2},"name":"refined-concrete"},{"position":{"x":13,"y":3},"name":"refined-concrete"},{"position":{"x":13,"y":9},"name":"refined-concrete"}],"item":"blueprint","version":73018507264}}' diff --git a/maps/tank_conquest/blueprint_poi_spot_two_json.lua b/maps/tank_conquest/blueprint_poi_spot_two_json.lua deleted file mode 100644 index 23f20fecc..000000000 --- a/maps/tank_conquest/blueprint_poi_spot_two_json.lua +++ /dev/null @@ -1 +0,0 @@ -return '{"blueprint":{"icons":[{"signal":{"type":"item","name":"land-mine"},"index":1},{"signal":{"type":"item","name":"stone-wall"},"index":2}],"entities":[{"entity_number":1,"name":"land-mine","position":{"x":-2.9375,"y":-13.20703125}},{"entity_number":2,"name":"land-mine","position":{"x":-0.9375,"y":-13.20703125}},{"entity_number":3,"name":"land-mine","position":{"x":3.0625,"y":-13.20703125}},{"entity_number":4,"name":"land-mine","position":{"x":5.0625,"y":-13.20703125}},{"entity_number":5,"name":"land-mine","position":{"x":7.0625,"y":-13.20703125}},{"entity_number":6,"name":"land-mine","position":{"x":9.0625,"y":-13.20703125}},{"entity_number":7,"name":"land-mine","position":{"x":-9.1171875,"y":-12.71875}},{"entity_number":8,"name":"stone-wall","position":{"x":-8,"y":-13}},{"entity_number":9,"name":"land-mine","position":{"x":-8.796875,"y":-11.18359375}},{"entity_number":10,"name":"stone-wall","position":{"x":-9,"y":-12}},{"entity_number":11,"name":"land-mine","position":{"x":-7.984375,"y":-12.00390625}},{"entity_number":12,"name":"land-mine","position":{"x":-5.92578125,"y":-12.12890625}},{"entity_number":13,"name":"stone-wall","position":{"x":-7,"y":-12}},{"entity_number":14,"name":"land-mine","position":{"x":-3.92578125,"y":-12.12890625}},{"entity_number":15,"name":"stone-wall","position":{"x":-4,"y":-13}},{"entity_number":16,"name":"stone-wall","position":{"x":-5,"y":-12}},{"entity_number":17,"name":"land-mine","position":{"x":-1.92578125,"y":-12.12890625}},{"entity_number":18,"name":"stone-wall","position":{"x":-2,"y":-13}},{"entity_number":19,"name":"stone-wall","position":{"x":-3,"y":-12}},{"entity_number":20,"name":"land-mine","position":{"x":0.07421875,"y":-12.12890625}},{"entity_number":21,"name":"stone-wall","position":{"x":0,"y":-13}},{"entity_number":22,"name":"stone-wall","position":{"x":-1,"y":-12}},{"entity_number":23,"name":"land-mine","position":{"x":0.91796875,"y":-13.0703125}},{"entity_number":24,"name":"land-mine","position":{"x":2.07421875,"y":-12.12890625}},{"entity_number":25,"name":"stone-wall","position":{"x":2,"y":-13}},{"entity_number":26,"name":"stone-wall","position":{"x":1,"y":-12}},{"entity_number":27,"name":"land-mine","position":{"x":4.07421875,"y":-12.12890625}},{"entity_number":28,"name":"stone-wall","position":{"x":4,"y":-13}},{"entity_number":29,"name":"stone-wall","position":{"x":3,"y":-12}},{"entity_number":30,"name":"stone-wall","position":{"x":6,"y":-13}},{"entity_number":31,"name":"land-mine","position":{"x":5.859375,"y":-12.02734375}},{"entity_number":32,"name":"stone-wall","position":{"x":5,"y":-12}},{"entity_number":33,"name":"land-mine","position":{"x":8.07421875,"y":-12.12890625}},{"entity_number":34,"name":"stone-wall","position":{"x":8,"y":-13}},{"entity_number":35,"name":"stone-wall","position":{"x":7,"y":-12}},{"entity_number":36,"name":"stone-wall","position":{"x":10,"y":-13}},{"entity_number":37,"name":"stone-wall","position":{"x":9,"y":-12}},{"entity_number":38,"name":"land-mine","position":{"x":9.94140625,"y":-11.88671875}},{"entity_number":39,"name":"stone-wall","position":{"x":11,"y":-12}},{"entity_number":40,"name":"land-mine","position":{"x":12.11328125,"y":-11.78515625}},{"entity_number":41,"name":"land-mine","position":{"x":-10.296875,"y":-10.296875}},{"entity_number":42,"name":"stone-wall","position":{"x":-10,"y":-11}},{"entity_number":43,"name":"stone-wall","position":{"x":-11,"y":-10}},{"entity_number":44,"name":"stone-wall","position":{"x":-8,"y":-11}},{"entity_number":45,"name":"stone-wall","position":{"x":-9,"y":-10}},{"entity_number":46,"name":"land-mine","position":{"x":-7.90234375,"y":-10.078125}},{"entity_number":47,"name":"land-mine","position":{"x":-6.9765625,"y":-11.0546875}},{"entity_number":48,"name":"stone-wall","position":{"x":-6,"y":-11}},{"entity_number":49,"name":"stone-wall","position":{"x":-7,"y":-10}},{"entity_number":50,"name":"land-mine","position":{"x":-5.90234375,"y":-10.078125}},{"entity_number":51,"name":"land-mine","position":{"x":-4.9765625,"y":-11.0546875}},{"entity_number":52,"name":"stone-wall","position":{"x":-4,"y":-11}},{"entity_number":53,"name":"stone-wall","position":{"x":-5,"y":-10}},{"entity_number":54,"name":"land-mine","position":{"x":-3.90234375,"y":-10.078125}},{"entity_number":55,"name":"land-mine","position":{"x":-2.9765625,"y":-11.09765625}},{"entity_number":56,"name":"stone-wall","position":{"x":-2,"y":-11}},{"entity_number":57,"name":"stone-wall","position":{"x":-3,"y":-10}},{"entity_number":58,"name":"land-mine","position":{"x":-1.90234375,"y":-10.078125}},{"entity_number":59,"name":"land-mine","position":{"x":-0.9765625,"y":-11.0546875}},{"entity_number":60,"name":"stone-wall","position":{"x":0,"y":-11}},{"entity_number":61,"name":"stone-wall","position":{"x":-1,"y":-10}},{"entity_number":62,"name":"land-mine","position":{"x":0.09765625,"y":-10.078125}},{"entity_number":63,"name":"land-mine","position":{"x":1.0234375,"y":-11.0546875}},{"entity_number":64,"name":"stone-wall","position":{"x":2,"y":-11}},{"entity_number":65,"name":"stone-wall","position":{"x":1,"y":-10}},{"entity_number":66,"name":"land-mine","position":{"x":2.09765625,"y":-10.078125}},{"entity_number":67,"name":"land-mine","position":{"x":3.0234375,"y":-11.0546875}},{"entity_number":68,"name":"land-mine","position":{"x":4.046875,"y":-10.16796875}},{"entity_number":69,"name":"stone-wall","position":{"x":4,"y":-11}},{"entity_number":70,"name":"stone-wall","position":{"x":3,"y":-10}},{"entity_number":71,"name":"land-mine","position":{"x":5.0234375,"y":-11.0546875}},{"entity_number":72,"name":"stone-wall","position":{"x":6,"y":-11}},{"entity_number":73,"name":"stone-wall","position":{"x":5,"y":-10}},{"entity_number":74,"name":"land-mine","position":{"x":6.09765625,"y":-10.078125}},{"entity_number":75,"name":"land-mine","position":{"x":7.0234375,"y":-11.0546875}},{"entity_number":76,"name":"land-mine","position":{"x":8.7265625,"y":-10.9765625}},{"entity_number":77,"name":"stone-wall","position":{"x":8,"y":-11}},{"entity_number":78,"name":"stone-wall","position":{"x":7,"y":-10}},{"entity_number":79,"name":"land-mine","position":{"x":8.09765625,"y":-10.078125}},{"entity_number":80,"name":"land-mine","position":{"x":9.93359375,"y":-10.16796875}},{"entity_number":81,"name":"stone-wall","position":{"x":10,"y":-11}},{"entity_number":82,"name":"stone-wall","position":{"x":9,"y":-10}},{"entity_number":83,"name":"land-mine","position":{"x":10.984375,"y":-10.6953125}},{"entity_number":84,"name":"stone-wall","position":{"x":12,"y":-11}},{"entity_number":85,"name":"land-mine","position":{"x":10.95703125,"y":-9.1953125}},{"entity_number":86,"name":"stone-wall","position":{"x":11,"y":-10}},{"entity_number":87,"name":"land-mine","position":{"x":11.91015625,"y":-10.078125}},{"entity_number":88,"name":"land-mine","position":{"x":13.03515625,"y":-9.28515625}},{"entity_number":89,"name":"stone-wall","position":{"x":13,"y":-10}},{"entity_number":90,"name":"land-mine","position":{"x":-11.2578125,"y":-9.05859375}},{"entity_number":91,"name":"land-mine","position":{"x":-11.1171875,"y":-7.18359375}},{"entity_number":92,"name":"land-mine","position":{"x":-9.96484375,"y":-8.21875}},{"entity_number":93,"name":"stone-wall","position":{"x":-10,"y":-9}},{"entity_number":94,"name":"stone-wall","position":{"x":-11,"y":-8}},{"entity_number":95,"name":"land-mine","position":{"x":-8.9921875,"y":-8.70703125}},{"entity_number":96,"name":"stone-wall","position":{"x":-8,"y":-9}},{"entity_number":97,"name":"stone-wall","position":{"x":-9,"y":-8}},{"entity_number":98,"name":"stone-wall","position":{"x":-8,"y":-8}},{"entity_number":99,"name":"stone-wall","position":{"x":-7,"y":-9}},{"entity_number":100,"name":"stone-wall","position":{"x":-6,"y":-9}},{"entity_number":101,"name":"gun-turret","position":{"x":-3.5,"y":-7.5}},{"entity_number":102,"name":"stone-wall","position":{"x":-5,"y":-9}},{"entity_number":103,"name":"stone-wall","position":{"x":-4,"y":-9}},{"entity_number":104,"name":"inserter","position":{"x":-2,"y":-8},"direction":2},{"entity_number":105,"name":"stone-wall","position":{"x":-3,"y":-9}},{"entity_number":106,"name":"stone-wall","position":{"x":-2,"y":-9}},{"entity_number":107,"name":"infinity-chest","position":{"x":-1,"y":-8},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":108,"name":"stone-wall","position":{"x":-1,"y":-9}},{"entity_number":109,"name":"stone-wall","position":{"x":0,"y":-9}},{"entity_number":110,"name":"infinity-chest","position":{"x":2,"y":-8},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":111,"name":"stone-wall","position":{"x":1,"y":-9}},{"entity_number":112,"name":"stone-wall","position":{"x":2,"y":-9}},{"entity_number":113,"name":"inserter","position":{"x":3,"y":-8},"direction":6},{"entity_number":114,"name":"gun-turret","position":{"x":4.5,"y":-7.5}},{"entity_number":115,"name":"stone-wall","position":{"x":3,"y":-9}},{"entity_number":116,"name":"stone-wall","position":{"x":4,"y":-9}},{"entity_number":117,"name":"stone-wall","position":{"x":5,"y":-9}},{"entity_number":118,"name":"stone-wall","position":{"x":6,"y":-9}},{"entity_number":119,"name":"stone-wall","position":{"x":7,"y":-9}},{"entity_number":120,"name":"stone-wall","position":{"x":8,"y":-9}},{"entity_number":121,"name":"stone-wall","position":{"x":9,"y":-9}},{"entity_number":122,"name":"land-mine","position":{"x":9.93359375,"y":-8.16796875}},{"entity_number":123,"name":"stone-wall","position":{"x":10,"y":-9}},{"entity_number":124,"name":"stone-wall","position":{"x":9,"y":-8}},{"entity_number":125,"name":"stone-wall","position":{"x":12,"y":-9}},{"entity_number":126,"name":"land-mine","position":{"x":11.77734375,"y":-7.796875}},{"entity_number":127,"name":"land-mine","position":{"x":10.95703125,"y":-7.1953125}},{"entity_number":128,"name":"stone-wall","position":{"x":11,"y":-8}},{"entity_number":129,"name":"stone-wall","position":{"x":13,"y":-8}},{"entity_number":130,"name":"land-mine","position":{"x":-11.1171875,"y":-5.18359375}},{"entity_number":131,"name":"land-mine","position":{"x":-10.1171875,"y":-6.26953125}},{"entity_number":132,"name":"stone-wall","position":{"x":-10,"y":-7}},{"entity_number":133,"name":"stone-wall","position":{"x":-11,"y":-6}},{"entity_number":134,"name":"land-mine","position":{"x":-8.9375,"y":-6.875}},{"entity_number":135,"name":"stone-wall","position":{"x":-8,"y":-7}},{"entity_number":136,"name":"stone-wall","position":{"x":-9,"y":-6}},{"entity_number":137,"name":"stone-wall","position":{"x":-8,"y":-6}},{"entity_number":138,"name":"stone-wall","position":{"x":9,"y":-7}},{"entity_number":139,"name":"land-mine","position":{"x":9.93359375,"y":-6.16796875}},{"entity_number":140,"name":"stone-wall","position":{"x":10,"y":-7}},{"entity_number":141,"name":"stone-wall","position":{"x":9,"y":-6}},{"entity_number":142,"name":"land-mine","position":{"x":12.86328125,"y":-7.03515625}},{"entity_number":143,"name":"stone-wall","position":{"x":12,"y":-7}},{"entity_number":144,"name":"land-mine","position":{"x":11.77734375,"y":-5.796875}},{"entity_number":145,"name":"stone-wall","position":{"x":11,"y":-6}},{"entity_number":146,"name":"land-mine","position":{"x":13.03515625,"y":-5.28515625}},{"entity_number":147,"name":"stone-wall","position":{"x":13,"y":-6}},{"entity_number":148,"name":"stone-wall","position":{"x":-12,"y":-5}},{"entity_number":149,"name":"land-mine","position":{"x":-12.1171875,"y":-3.7578125}},{"entity_number":150,"name":"land-mine","position":{"x":-11.1171875,"y":-3.18359375}},{"entity_number":151,"name":"stone-wall","position":{"x":-10,"y":-5}},{"entity_number":152,"name":"land-mine","position":{"x":-10.1171875,"y":-4.02734375}},{"entity_number":153,"name":"stone-wall","position":{"x":-11,"y":-4}},{"entity_number":154,"name":"land-mine","position":{"x":-9.02734375,"y":-5.0234375}},{"entity_number":155,"name":"stone-wall","position":{"x":-8,"y":-5}},{"entity_number":156,"name":"stone-wall","position":{"x":-9,"y":-4}},{"entity_number":157,"name":"stone-wall","position":{"x":-8,"y":-4}},{"entity_number":158,"name":"solar-panel","position":{"x":-6,"y":-4}},{"entity_number":159,"name":"accumulator","position":{"x":0.5,"y":-4.5}},{"entity_number":160,"name":"solar-panel","position":{"x":7,"y":-4}},{"entity_number":161,"name":"stone-wall","position":{"x":9,"y":-5}},{"entity_number":162,"name":"land-mine","position":{"x":9.93359375,"y":-4.16796875}},{"entity_number":163,"name":"stone-wall","position":{"x":10,"y":-5}},{"entity_number":164,"name":"stone-wall","position":{"x":9,"y":-4}},{"entity_number":165,"name":"land-mine","position":{"x":10.9140625,"y":-5.015625}},{"entity_number":166,"name":"stone-wall","position":{"x":12,"y":-5}},{"entity_number":167,"name":"land-mine","position":{"x":11.77734375,"y":-3.796875}},{"entity_number":168,"name":"land-mine","position":{"x":10.95703125,"y":-3.1953125}},{"entity_number":169,"name":"stone-wall","position":{"x":11,"y":-4}},{"entity_number":170,"name":"stone-wall","position":{"x":13,"y":-4}},{"entity_number":171,"name":"stone-wall","position":{"x":-12,"y":-3}},{"entity_number":172,"name":"land-mine","position":{"x":-11.1171875,"y":-1.18359375}},{"entity_number":173,"name":"land-mine","position":{"x":-12.0234375,"y":-1.98046875}},{"entity_number":174,"name":"stone-wall","position":{"x":-10,"y":-3}},{"entity_number":175,"name":"stone-wall","position":{"x":-11,"y":-2}},{"entity_number":176,"name":"land-mine","position":{"x":-10.09375,"y":-1.84765625}},{"entity_number":177,"name":"land-mine","position":{"x":-8.8125,"y":-2.91015625}},{"entity_number":178,"name":"stone-wall","position":{"x":-8,"y":-3}},{"entity_number":179,"name":"stone-wall","position":{"x":-9,"y":-2}},{"entity_number":180,"name":"stone-wall","position":{"x":-8,"y":-2}},{"entity_number":181,"name":"accumulator","position":{"x":0.5,"y":-2.5}},{"entity_number":182,"name":"stone-wall","position":{"x":9,"y":-3}},{"entity_number":183,"name":"land-mine","position":{"x":9.93359375,"y":-2.16796875}},{"entity_number":184,"name":"stone-wall","position":{"x":10,"y":-3}},{"entity_number":185,"name":"stone-wall","position":{"x":9,"y":-2}},{"entity_number":186,"name":"land-mine","position":{"x":11.77734375,"y":-2.296875}},{"entity_number":187,"name":"stone-wall","position":{"x":12,"y":-3}},{"entity_number":188,"name":"land-mine","position":{"x":10.984375,"y":-1.1953125}},{"entity_number":189,"name":"stone-wall","position":{"x":11,"y":-2}},{"entity_number":190,"name":"land-mine","position":{"x":12.93359375,"y":-3.01953125}},{"entity_number":191,"name":"land-mine","position":{"x":13.03515625,"y":-1.28515625}},{"entity_number":192,"name":"stone-wall","position":{"x":13,"y":-2}},{"entity_number":193,"name":"land-mine","position":{"x":-12.1953125,"y":0.2421875}},{"entity_number":194,"name":"land-mine","position":{"x":-11.1171875,"y":0.81640625}},{"entity_number":195,"name":"stone-wall","position":{"x":-10,"y":-1}},{"entity_number":196,"name":"stone-wall","position":{"x":-11,"y":0}},{"entity_number":197,"name":"land-mine","position":{"x":-10.09375,"y":0.17578125}},{"entity_number":198,"name":"land-mine","position":{"x":-8.8125,"y":-1.0390625}},{"entity_number":199,"name":"stone-wall","position":{"x":-8,"y":-1}},{"entity_number":200,"name":"stone-wall","position":{"x":-9,"y":0}},{"entity_number":201,"name":"stone-wall","position":{"x":-8,"y":0}},{"entity_number":202,"name":"solar-panel","position":{"x":-6,"y":0}},{"entity_number":203,"name":"substation","position":{"x":0.5,"y":-0.5}},{"entity_number":204,"name":"solar-panel","position":{"x":7,"y":0}},{"entity_number":205,"name":"stone-wall","position":{"x":9,"y":-1}},{"entity_number":206,"name":"land-mine","position":{"x":9.93359375,"y":-0.16796875}},{"entity_number":207,"name":"stone-wall","position":{"x":10,"y":-1}},{"entity_number":208,"name":"stone-wall","position":{"x":9,"y":0}},{"entity_number":209,"name":"land-mine","position":{"x":11.77734375,"y":-0.296875}},{"entity_number":210,"name":"stone-wall","position":{"x":12,"y":-1}},{"entity_number":211,"name":"land-mine","position":{"x":11.02734375,"y":0.83203125}},{"entity_number":212,"name":"stone-wall","position":{"x":11,"y":0}},{"entity_number":213,"name":"land-mine","position":{"x":13.03515625,"y":0.71484375}},{"entity_number":214,"name":"stone-wall","position":{"x":13,"y":0}},{"entity_number":215,"name":"land-mine","position":{"x":-12.34765625,"y":1.84375}},{"entity_number":216,"name":"stone-wall","position":{"x":-12,"y":1}},{"entity_number":217,"name":"land-mine","position":{"x":-11.1171875,"y":2.87109375}},{"entity_number":218,"name":"stone-wall","position":{"x":-10,"y":1}},{"entity_number":219,"name":"stone-wall","position":{"x":-11,"y":2}},{"entity_number":220,"name":"land-mine","position":{"x":-10.09375,"y":2.17578125}},{"entity_number":221,"name":"land-mine","position":{"x":-8.8125,"y":0.9609375}},{"entity_number":222,"name":"stone-wall","position":{"x":-8,"y":1}},{"entity_number":223,"name":"stone-wall","position":{"x":-9,"y":2}},{"entity_number":224,"name":"stone-wall","position":{"x":-8,"y":2}},{"entity_number":225,"name":"stone-wall","position":{"x":9,"y":1}},{"entity_number":226,"name":"land-mine","position":{"x":9.93359375,"y":1.83203125}},{"entity_number":227,"name":"stone-wall","position":{"x":10,"y":1}},{"entity_number":228,"name":"stone-wall","position":{"x":9,"y":2}},{"entity_number":229,"name":"land-mine","position":{"x":11.77734375,"y":1.703125}},{"entity_number":230,"name":"stone-wall","position":{"x":12,"y":1}},{"entity_number":231,"name":"land-mine","position":{"x":10.984375,"y":2.8046875}},{"entity_number":232,"name":"stone-wall","position":{"x":11,"y":2}},{"entity_number":233,"name":"land-mine","position":{"x":13.03515625,"y":2.71484375}},{"entity_number":234,"name":"stone-wall","position":{"x":13,"y":2}},{"entity_number":235,"name":"land-mine","position":{"x":-9.91015625,"y":3.8671875}},{"entity_number":236,"name":"stone-wall","position":{"x":-10,"y":3}},{"entity_number":237,"name":"stone-wall","position":{"x":-11,"y":4}},{"entity_number":238,"name":"land-mine","position":{"x":-8.8125,"y":2.93359375}},{"entity_number":239,"name":"stone-wall","position":{"x":-8,"y":3}},{"entity_number":240,"name":"stone-wall","position":{"x":-9,"y":4}},{"entity_number":241,"name":"stone-wall","position":{"x":-8,"y":4}},{"entity_number":242,"name":"inserter","position":{"x":-4,"y":3},"direction":6},{"entity_number":243,"name":"infinity-chest","position":{"x":-5,"y":3},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"grenade","count":1,"mode":"at-least","index":1}]}},{"entity_number":244,"name":"infinity-chest","position":{"x":-5,"y":4},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"cannon-shell","count":1,"mode":"at-least","index":1}]}},{"entity_number":245,"name":"inserter","position":{"x":-4,"y":4},"direction":6},{"entity_number":246,"name":"wooden-chest","position":{"x":-3,"y":3},"bar":1},{"entity_number":247,"name":"wooden-chest","position":{"x":-3,"y":4},"bar":1},{"entity_number":248,"name":"wooden-chest","position":{"x":5,"y":4},"bar":1},{"entity_number":249,"name":"wooden-chest","position":{"x":5,"y":3},"bar":1},{"entity_number":250,"name":"inserter","position":{"x":6,"y":4},"direction":2},{"entity_number":251,"name":"inserter","position":{"x":6,"y":3},"direction":2},{"entity_number":252,"name":"infinity-chest","position":{"x":7,"y":4},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"wood","count":1,"mode":"at-least","index":1}]}},{"entity_number":253,"name":"infinity-chest","position":{"x":7,"y":3},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"raw-fish","count":1,"mode":"at-least","index":1}]}},{"entity_number":254,"name":"stone-wall","position":{"x":9,"y":3}},{"entity_number":255,"name":"land-mine","position":{"x":9.93359375,"y":3.83203125}},{"entity_number":256,"name":"stone-wall","position":{"x":10,"y":3}},{"entity_number":257,"name":"stone-wall","position":{"x":9,"y":4}},{"entity_number":258,"name":"land-mine","position":{"x":11.77734375,"y":3.703125}},{"entity_number":259,"name":"stone-wall","position":{"x":12,"y":3}},{"entity_number":260,"name":"stone-wall","position":{"x":11,"y":4}},{"entity_number":261,"name":"stone-wall","position":{"x":13,"y":4}},{"entity_number":262,"name":"land-mine","position":{"x":-11.09375,"y":5.0234375}},{"entity_number":263,"name":"land-mine","position":{"x":-10.09375,"y":5.83203125}},{"entity_number":264,"name":"stone-wall","position":{"x":-10,"y":5}},{"entity_number":265,"name":"stone-wall","position":{"x":-11,"y":6}},{"entity_number":266,"name":"land-mine","position":{"x":-9.2734375,"y":6.89453125}},{"entity_number":267,"name":"land-mine","position":{"x":-8.8125,"y":4.93359375}},{"entity_number":268,"name":"stone-wall","position":{"x":-8,"y":5}},{"entity_number":269,"name":"stone-wall","position":{"x":-9,"y":6}},{"entity_number":270,"name":"stone-wall","position":{"x":-8,"y":6}},{"entity_number":271,"name":"gun-turret","position":{"x":-3.5,"y":6.5}},{"entity_number":272,"name":"gun-turret","position":{"x":4.5,"y":6.5}},{"entity_number":273,"name":"stone-wall","position":{"x":9,"y":5}},{"entity_number":274,"name":"land-mine","position":{"x":9.93359375,"y":5.83203125}},{"entity_number":275,"name":"stone-wall","position":{"x":10,"y":5}},{"entity_number":276,"name":"stone-wall","position":{"x":9,"y":6}},{"entity_number":277,"name":"land-mine","position":{"x":11.12109375,"y":4.93359375}},{"entity_number":278,"name":"stone-wall","position":{"x":12,"y":5}},{"entity_number":279,"name":"land-mine","position":{"x":10.984375,"y":6.8046875}},{"entity_number":280,"name":"stone-wall","position":{"x":11,"y":6}},{"entity_number":281,"name":"land-mine","position":{"x":-11.1953125,"y":7.0234375}},{"entity_number":282,"name":"stone-wall","position":{"x":-12,"y":7}},{"entity_number":283,"name":"land-mine","position":{"x":-11.96484375,"y":8.1640625}},{"entity_number":284,"name":"land-mine","position":{"x":-9.8125,"y":7.79296875}},{"entity_number":285,"name":"stone-wall","position":{"x":-10,"y":7}},{"entity_number":286,"name":"land-mine","position":{"x":-11.046875,"y":8.80859375}},{"entity_number":287,"name":"stone-wall","position":{"x":-11,"y":8}},{"entity_number":288,"name":"stone-wall","position":{"x":-8,"y":7}},{"entity_number":289,"name":"stone-wall","position":{"x":-9,"y":8}},{"entity_number":290,"name":"stone-wall","position":{"x":-8,"y":8}},{"entity_number":291,"name":"infinity-chest","position":{"x":-6,"y":7},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":292,"name":"stone-wall","position":{"x":-7,"y":8}},{"entity_number":293,"name":"stone-wall","position":{"x":-6,"y":8}},{"entity_number":294,"name":"inserter","position":{"x":-5,"y":7},"direction":6},{"entity_number":295,"name":"stone-wall","position":{"x":-5,"y":8}},{"entity_number":296,"name":"stone-wall","position":{"x":-4,"y":8}},{"entity_number":297,"name":"gate","position":{"x":-2,"y":8},"direction":2},{"entity_number":298,"name":"stone-wall","position":{"x":-3,"y":8}},{"entity_number":299,"name":"gate","position":{"x":-1,"y":8},"direction":2},{"entity_number":300,"name":"gate","position":{"x":0,"y":8},"direction":2},{"entity_number":301,"name":"gate","position":{"x":1,"y":8},"direction":2},{"entity_number":302,"name":"gate","position":{"x":2,"y":8},"direction":2},{"entity_number":303,"name":"gate","position":{"x":3,"y":8},"direction":2},{"entity_number":304,"name":"stone-wall","position":{"x":4,"y":8}},{"entity_number":305,"name":"inserter","position":{"x":6,"y":7},"direction":2},{"entity_number":306,"name":"stone-wall","position":{"x":5,"y":8}},{"entity_number":307,"name":"stone-wall","position":{"x":6,"y":8}},{"entity_number":308,"name":"infinity-chest","position":{"x":7,"y":7},"bar":1,"infinity_settings":{"remove_unfiltered_items":false,"filters":[{"name":"firearm-magazine","count":1,"mode":"at-least","index":1}]}},{"entity_number":309,"name":"stone-wall","position":{"x":7,"y":8}},{"entity_number":310,"name":"stone-wall","position":{"x":8,"y":8}},{"entity_number":311,"name":"stone-wall","position":{"x":9,"y":7}},{"entity_number":312,"name":"land-mine","position":{"x":9.93359375,"y":7.83203125}},{"entity_number":313,"name":"stone-wall","position":{"x":10,"y":7}},{"entity_number":314,"name":"stone-wall","position":{"x":9,"y":8}},{"entity_number":315,"name":"land-mine","position":{"x":11.77734375,"y":7.703125}},{"entity_number":316,"name":"stone-wall","position":{"x":12,"y":7}},{"entity_number":317,"name":"stone-wall","position":{"x":11,"y":8}},{"entity_number":318,"name":"stone-wall","position":{"x":13,"y":8}},{"entity_number":319,"name":"stone-wall","position":{"x":-12,"y":9}},{"entity_number":320,"name":"land-mine","position":{"x":-9.1171875,"y":9.23046875}},{"entity_number":321,"name":"stone-wall","position":{"x":-10,"y":9}},{"entity_number":322,"name":"land-mine","position":{"x":-10.8125,"y":10.765625}},{"entity_number":323,"name":"stone-wall","position":{"x":-11,"y":10}},{"entity_number":324,"name":"land-mine","position":{"x":-9.9140625,"y":10.125}},{"entity_number":325,"name":"stone-wall","position":{"x":-8,"y":9}},{"entity_number":326,"name":"stone-wall","position":{"x":-9,"y":10}},{"entity_number":327,"name":"land-mine","position":{"x":-7.984375,"y":10.0859375}},{"entity_number":328,"name":"land-mine","position":{"x":-6.86328125,"y":9.23046875}},{"entity_number":329,"name":"stone-wall","position":{"x":-6,"y":9}},{"entity_number":330,"name":"land-mine","position":{"x":-6.88671875,"y":10.79296875}},{"entity_number":331,"name":"stone-wall","position":{"x":-7,"y":10}},{"entity_number":332,"name":"land-mine","position":{"x":-5.78515625,"y":10.23046875}},{"entity_number":333,"name":"land-mine","position":{"x":-4.9921875,"y":9.23046875}},{"entity_number":334,"name":"land-mine","position":{"x":-4.04296875,"y":9.71484375}},{"entity_number":335,"name":"land-mine","position":{"x":-3.22265625,"y":9.3046875}},{"entity_number":336,"name":"stone-wall","position":{"x":-4,"y":9}},{"entity_number":337,"name":"stone-wall","position":{"x":-5,"y":10}},{"entity_number":338,"name":"land-mine","position":{"x":-2.140625,"y":9.06640625}},{"entity_number":339,"name":"land-mine","position":{"x":-2.0546875,"y":10.0546875}},{"entity_number":340,"name":"stone-wall","position":{"x":-3,"y":10}},{"entity_number":341,"name":"land-mine","position":{"x":-0.01171875,"y":10.0078125}},{"entity_number":342,"name":"land-mine","position":{"x":-1.0546875,"y":10.03125}},{"entity_number":343,"name":"land-mine","position":{"x":-0.01171875,"y":9.078125}},{"entity_number":344,"name":"land-mine","position":{"x":-0.91796875,"y":9.078125}},{"entity_number":345,"name":"land-mine","position":{"x":2.73046875,"y":9.984375}},{"entity_number":346,"name":"land-mine","position":{"x":1.89453125,"y":9.9609375}},{"entity_number":347,"name":"land-mine","position":{"x":0.96484375,"y":9.9609375}},{"entity_number":348,"name":"land-mine","position":{"x":2.8203125,"y":9.078125}},{"entity_number":349,"name":"land-mine","position":{"x":2.0078125,"y":9.1015625}},{"entity_number":350,"name":"land-mine","position":{"x":1.1953125,"y":9.1015625}},{"entity_number":351,"name":"land-mine","position":{"x":3.609375,"y":9.9375}},{"entity_number":352,"name":"land-mine","position":{"x":4.7265625,"y":9.01171875}},{"entity_number":353,"name":"stone-wall","position":{"x":4,"y":9}},{"entity_number":354,"name":"land-mine","position":{"x":6.11328125,"y":9.703125}},{"entity_number":355,"name":"stone-wall","position":{"x":6,"y":9}},{"entity_number":356,"name":"land-mine","position":{"x":4.95703125,"y":10.75390625}},{"entity_number":357,"name":"stone-wall","position":{"x":5,"y":10}},{"entity_number":358,"name":"land-mine","position":{"x":7.11328125,"y":9.1640625}},{"entity_number":359,"name":"stone-wall","position":{"x":8,"y":9}},{"entity_number":360,"name":"stone-wall","position":{"x":7,"y":10}},{"entity_number":361,"name":"land-mine","position":{"x":7.90625,"y":10.03515625}},{"entity_number":362,"name":"land-mine","position":{"x":9.23828125,"y":8.984375}},{"entity_number":363,"name":"stone-wall","position":{"x":10,"y":9}},{"entity_number":364,"name":"stone-wall","position":{"x":9,"y":10}},{"entity_number":365,"name":"land-mine","position":{"x":9.90234375,"y":10.03125}},{"entity_number":366,"name":"land-mine","position":{"x":11.23828125,"y":8.95703125}},{"entity_number":367,"name":"land-mine","position":{"x":12.86328125,"y":9.08984375}},{"entity_number":368,"name":"stone-wall","position":{"x":12,"y":9}},{"entity_number":369,"name":"land-mine","position":{"x":11.87890625,"y":10.29296875}},{"entity_number":370,"name":"land-mine","position":{"x":10.93359375,"y":10.83203125}},{"entity_number":371,"name":"stone-wall","position":{"x":11,"y":10}},{"entity_number":372,"name":"stone-wall","position":{"x":13,"y":10}},{"entity_number":373,"name":"stone-wall","position":{"x":-10,"y":11}},{"entity_number":374,"name":"stone-wall","position":{"x":-11,"y":12}},{"entity_number":375,"name":"land-mine","position":{"x":-9.8125,"y":12.1015625}},{"entity_number":376,"name":"land-mine","position":{"x":-8.734375,"y":11.17578125}},{"entity_number":377,"name":"land-mine","position":{"x":-7.70703125,"y":11.89453125}},{"entity_number":378,"name":"stone-wall","position":{"x":-8,"y":11}},{"entity_number":379,"name":"stone-wall","position":{"x":-9,"y":12}},{"entity_number":380,"name":"stone-wall","position":{"x":-6,"y":11}},{"entity_number":381,"name":"stone-wall","position":{"x":-7,"y":12}},{"entity_number":382,"name":"land-mine","position":{"x":-4.91796875,"y":10.96875}},{"entity_number":383,"name":"land-mine","position":{"x":-3.2734375,"y":11.3046875}},{"entity_number":384,"name":"stone-wall","position":{"x":-4,"y":11}},{"entity_number":385,"name":"land-mine","position":{"x":-2.06640625,"y":11.203125}},{"entity_number":386,"name":"land-mine","position":{"x":-1.2421875,"y":12.21484375}},{"entity_number":387,"name":"land-mine","position":{"x":-2.21875,"y":12.23828125}},{"entity_number":388,"name":"land-mine","position":{"x":0.6171875,"y":12.19140625}},{"entity_number":389,"name":"land-mine","position":{"x":-0.1953125,"y":12.19140625}},{"entity_number":390,"name":"land-mine","position":{"x":-0.05859375,"y":11.14453125}},{"entity_number":391,"name":"land-mine","position":{"x":-1.0078125,"y":11.16796875}},{"entity_number":392,"name":"land-mine","position":{"x":2.3359375,"y":12.09765625}},{"entity_number":393,"name":"land-mine","position":{"x":1.4765625,"y":12.21484375}},{"entity_number":394,"name":"land-mine","position":{"x":2.796875,"y":10.9609375}},{"entity_number":395,"name":"land-mine","position":{"x":1.9609375,"y":11.1015625}},{"entity_number":396,"name":"land-mine","position":{"x":0.96484375,"y":11.1015625}},{"entity_number":397,"name":"land-mine","position":{"x":4.00390625,"y":12.19140625}},{"entity_number":398,"name":"land-mine","position":{"x":3.1484375,"y":12.12109375}},{"entity_number":399,"name":"stone-wall","position":{"x":4,"y":11}},{"entity_number":400,"name":"land-mine","position":{"x":5.77734375,"y":11.85546875}},{"entity_number":401,"name":"land-mine","position":{"x":6.8828125,"y":11.09765625}},{"entity_number":402,"name":"stone-wall","position":{"x":6,"y":11}},{"entity_number":403,"name":"stone-wall","position":{"x":5,"y":12}},{"entity_number":404,"name":"land-mine","position":{"x":8.03515625,"y":11.75390625}},{"entity_number":405,"name":"stone-wall","position":{"x":8,"y":11}},{"entity_number":406,"name":"stone-wall","position":{"x":7,"y":12}},{"entity_number":407,"name":"land-mine","position":{"x":9.85546875,"y":11.703125}},{"entity_number":408,"name":"stone-wall","position":{"x":10,"y":11}},{"entity_number":409,"name":"stone-wall","position":{"x":9,"y":12}},{"entity_number":410,"name":"stone-wall","position":{"x":12,"y":11}},{"entity_number":411,"name":"stone-wall","position":{"x":11,"y":12}}],"tiles":[{"position":{"x":-12,"y":-5},"name":"refined-concrete"},{"position":{"x":-12,"y":-4},"name":"refined-concrete"},{"position":{"x":-12,"y":-3},"name":"refined-concrete"},{"position":{"x":-12,"y":-2},"name":"refined-concrete"},{"position":{"x":-12,"y":0},"name":"refined-concrete"},{"position":{"x":-12,"y":1},"name":"refined-concrete"},{"position":{"x":-12,"y":2},"name":"refined-concrete"},{"position":{"x":-12,"y":7},"name":"refined-concrete"},{"position":{"x":-12,"y":8},"name":"refined-concrete"},{"position":{"x":-12,"y":9},"name":"refined-concrete"},{"position":{"x":-12,"y":10},"name":"refined-concrete"},{"position":{"x":-11,"y":-10},"name":"refined-concrete"},{"position":{"x":-11,"y":-9},"name":"refined-concrete"},{"position":{"x":-11,"y":-8},"name":"refined-concrete"},{"position":{"x":-11,"y":-7},"name":"refined-concrete"},{"position":{"x":-11,"y":-6},"name":"refined-concrete"},{"position":{"x":-11,"y":-5},"name":"refined-concrete"},{"position":{"x":-11,"y":-4},"name":"refined-concrete"},{"position":{"x":-11,"y":-3},"name":"refined-concrete"},{"position":{"x":-11,"y":-2},"name":"refined-concrete"},{"position":{"x":-11,"y":-1},"name":"refined-concrete"},{"position":{"x":-11,"y":0},"name":"refined-concrete"},{"position":{"x":-11,"y":1},"name":"refined-concrete"},{"position":{"x":-11,"y":2},"name":"refined-concrete"},{"position":{"x":-11,"y":3},"name":"refined-concrete"},{"position":{"x":-11,"y":4},"name":"refined-concrete"},{"position":{"x":-11,"y":5},"name":"refined-concrete"},{"position":{"x":-11,"y":6},"name":"refined-concrete"},{"position":{"x":-11,"y":7},"name":"refined-concrete"},{"position":{"x":-11,"y":8},"name":"refined-concrete"},{"position":{"x":-11,"y":9},"name":"refined-concrete"},{"position":{"x":-11,"y":10},"name":"refined-concrete"},{"position":{"x":-11,"y":11},"name":"refined-concrete"},{"position":{"x":-11,"y":12},"name":"refined-concrete"},{"position":{"x":-10,"y":-12},"name":"refined-concrete"},{"position":{"x":-10,"y":-11},"name":"refined-concrete"},{"position":{"x":-10,"y":-10},"name":"refined-concrete"},{"position":{"x":-10,"y":-9},"name":"refined-concrete"},{"position":{"x":-10,"y":-8},"name":"refined-concrete"},{"position":{"x":-10,"y":-7},"name":"refined-concrete"},{"position":{"x":-10,"y":-6},"name":"refined-concrete"},{"position":{"x":-10,"y":-5},"name":"refined-concrete"},{"position":{"x":-10,"y":-4},"name":"refined-concrete"},{"position":{"x":-10,"y":-3},"name":"refined-concrete"},{"position":{"x":-10,"y":-2},"name":"refined-concrete"},{"position":{"x":-10,"y":-1},"name":"refined-concrete"},{"position":{"x":-10,"y":0},"name":"refined-concrete"},{"position":{"x":-10,"y":1},"name":"refined-concrete"},{"position":{"x":-10,"y":2},"name":"refined-concrete"},{"position":{"x":-10,"y":3},"name":"refined-concrete"},{"position":{"x":-10,"y":4},"name":"refined-concrete"},{"position":{"x":-10,"y":5},"name":"refined-concrete"},{"position":{"x":-10,"y":6},"name":"refined-concrete"},{"position":{"x":-10,"y":7},"name":"refined-concrete"},{"position":{"x":-10,"y":8},"name":"refined-concrete"},{"position":{"x":-10,"y":9},"name":"refined-concrete"},{"position":{"x":-10,"y":10},"name":"refined-concrete"},{"position":{"x":-10,"y":11},"name":"refined-concrete"},{"position":{"x":-10,"y":12},"name":"refined-concrete"},{"position":{"x":-9,"y":-12},"name":"refined-concrete"},{"position":{"x":-9,"y":-11},"name":"refined-concrete"},{"position":{"x":-9,"y":-10},"name":"refined-concrete"},{"position":{"x":-9,"y":-9},"name":"refined-concrete"},{"position":{"x":-9,"y":-8},"name":"refined-concrete"},{"position":{"x":-9,"y":-7},"name":"refined-concrete"},{"position":{"x":-9,"y":-6},"name":"refined-concrete"},{"position":{"x":-9,"y":-5},"name":"refined-concrete"},{"position":{"x":-9,"y":-4},"name":"refined-concrete"},{"position":{"x":-9,"y":-3},"name":"refined-concrete"},{"position":{"x":-9,"y":-2},"name":"refined-concrete"},{"position":{"x":-9,"y":-1},"name":"refined-concrete"},{"position":{"x":-9,"y":0},"name":"refined-concrete"},{"position":{"x":-9,"y":1},"name":"refined-concrete"},{"position":{"x":-9,"y":2},"name":"refined-concrete"},{"position":{"x":-9,"y":3},"name":"refined-concrete"},{"position":{"x":-9,"y":4},"name":"refined-concrete"},{"position":{"x":-9,"y":5},"name":"refined-concrete"},{"position":{"x":-9,"y":6},"name":"refined-concrete"},{"position":{"x":-9,"y":7},"name":"refined-concrete"},{"position":{"x":-9,"y":8},"name":"refined-concrete"},{"position":{"x":-9,"y":9},"name":"refined-concrete"},{"position":{"x":-9,"y":10},"name":"refined-concrete"},{"position":{"x":-9,"y":11},"name":"refined-concrete"},{"position":{"x":-9,"y":12},"name":"refined-concrete"},{"position":{"x":-8,"y":-13},"name":"refined-concrete"},{"position":{"x":-8,"y":-12},"name":"refined-concrete"},{"position":{"x":-8,"y":-11},"name":"refined-concrete"},{"position":{"x":-8,"y":-10},"name":"refined-concrete"},{"position":{"x":-8,"y":-9},"name":"refined-concrete"},{"position":{"x":-8,"y":-8},"name":"refined-concrete"},{"position":{"x":-8,"y":-7},"name":"refined-concrete"},{"position":{"x":-8,"y":-6},"name":"refined-concrete"},{"position":{"x":-8,"y":-5},"name":"refined-concrete"},{"position":{"x":-8,"y":-4},"name":"refined-concrete"},{"position":{"x":-8,"y":-3},"name":"refined-concrete"},{"position":{"x":-8,"y":-2},"name":"refined-concrete"},{"position":{"x":-8,"y":-1},"name":"refined-concrete"},{"position":{"x":-8,"y":0},"name":"refined-concrete"},{"position":{"x":-8,"y":1},"name":"refined-concrete"},{"position":{"x":-8,"y":2},"name":"refined-concrete"},{"position":{"x":-8,"y":3},"name":"refined-concrete"},{"position":{"x":-8,"y":4},"name":"refined-concrete"},{"position":{"x":-8,"y":5},"name":"refined-concrete"},{"position":{"x":-8,"y":6},"name":"refined-concrete"},{"position":{"x":-8,"y":7},"name":"refined-concrete"},{"position":{"x":-8,"y":8},"name":"refined-concrete"},{"position":{"x":-8,"y":9},"name":"refined-concrete"},{"position":{"x":-8,"y":10},"name":"refined-concrete"},{"position":{"x":-8,"y":11},"name":"refined-concrete"},{"position":{"x":-8,"y":12},"name":"refined-concrete"},{"position":{"x":-7,"y":-12},"name":"refined-concrete"},{"position":{"x":-7,"y":-11},"name":"refined-concrete"},{"position":{"x":-7,"y":-10},"name":"refined-concrete"},{"position":{"x":-7,"y":-9},"name":"refined-concrete"},{"position":{"x":-7,"y":-8},"name":"refined-concrete"},{"position":{"x":-7,"y":-7},"name":"refined-concrete"},{"position":{"x":-7,"y":-6},"name":"refined-concrete"},{"position":{"x":-7,"y":-5},"name":"refined-concrete"},{"position":{"x":-7,"y":-4},"name":"refined-concrete"},{"position":{"x":-7,"y":-3},"name":"refined-concrete"},{"position":{"x":-7,"y":-2},"name":"refined-concrete"},{"position":{"x":-7,"y":-1},"name":"refined-concrete"},{"position":{"x":-7,"y":0},"name":"refined-concrete"},{"position":{"x":-7,"y":1},"name":"refined-concrete"},{"position":{"x":-7,"y":2},"name":"refined-concrete"},{"position":{"x":-7,"y":3},"name":"refined-concrete"},{"position":{"x":-7,"y":4},"name":"refined-concrete"},{"position":{"x":-7,"y":5},"name":"refined-concrete"},{"position":{"x":-7,"y":6},"name":"refined-concrete"},{"position":{"x":-7,"y":7},"name":"refined-concrete"},{"position":{"x":-7,"y":8},"name":"refined-concrete"},{"position":{"x":-7,"y":9},"name":"refined-concrete"},{"position":{"x":-7,"y":10},"name":"refined-concrete"},{"position":{"x":-7,"y":11},"name":"refined-concrete"},{"position":{"x":-7,"y":12},"name":"refined-concrete"},{"position":{"x":-6,"y":-12},"name":"refined-concrete"},{"position":{"x":-6,"y":-11},"name":"refined-concrete"},{"position":{"x":-6,"y":-10},"name":"refined-concrete"},{"position":{"x":-6,"y":-9},"name":"refined-concrete"},{"position":{"x":-6,"y":-8},"name":"refined-concrete"},{"position":{"x":-6,"y":-7},"name":"refined-concrete"},{"position":{"x":-6,"y":-6},"name":"refined-concrete"},{"position":{"x":-6,"y":-5},"name":"refined-concrete"},{"position":{"x":-6,"y":-4},"name":"refined-concrete"},{"position":{"x":-6,"y":-3},"name":"refined-concrete"},{"position":{"x":-6,"y":-2},"name":"refined-concrete"},{"position":{"x":-6,"y":-1},"name":"refined-concrete"},{"position":{"x":-6,"y":0},"name":"refined-concrete"},{"position":{"x":-6,"y":1},"name":"refined-concrete"},{"position":{"x":-6,"y":2},"name":"refined-concrete"},{"position":{"x":-6,"y":3},"name":"refined-concrete"},{"position":{"x":-6,"y":4},"name":"refined-concrete"},{"position":{"x":-6,"y":5},"name":"refined-concrete"},{"position":{"x":-6,"y":6},"name":"refined-concrete"},{"position":{"x":-6,"y":7},"name":"refined-concrete"},{"position":{"x":-6,"y":8},"name":"refined-concrete"},{"position":{"x":-6,"y":9},"name":"refined-concrete"},{"position":{"x":-6,"y":10},"name":"refined-concrete"},{"position":{"x":-6,"y":11},"name":"refined-concrete"},{"position":{"x":-5,"y":-12},"name":"refined-concrete"},{"position":{"x":-5,"y":-11},"name":"refined-concrete"},{"position":{"x":-5,"y":-10},"name":"refined-concrete"},{"position":{"x":-5,"y":-9},"name":"refined-concrete"},{"position":{"x":-5,"y":-8},"name":"refined-concrete"},{"position":{"x":-5,"y":-7},"name":"refined-concrete"},{"position":{"x":-5,"y":-6},"name":"refined-concrete"},{"position":{"x":-5,"y":-5},"name":"refined-concrete"},{"position":{"x":-5,"y":-4},"name":"refined-concrete"},{"position":{"x":-5,"y":-3},"name":"refined-concrete"},{"position":{"x":-5,"y":-2},"name":"refined-concrete"},{"position":{"x":-5,"y":-1},"name":"refined-concrete"},{"position":{"x":-5,"y":0},"name":"refined-concrete"},{"position":{"x":-5,"y":1},"name":"refined-concrete"},{"position":{"x":-5,"y":2},"name":"refined-concrete"},{"position":{"x":-5,"y":3},"name":"refined-concrete"},{"position":{"x":-5,"y":4},"name":"refined-concrete"},{"position":{"x":-5,"y":5},"name":"refined-concrete"},{"position":{"x":-5,"y":6},"name":"refined-concrete"},{"position":{"x":-5,"y":7},"name":"refined-concrete"},{"position":{"x":-5,"y":8},"name":"refined-concrete"},{"position":{"x":-5,"y":9},"name":"refined-concrete"},{"position":{"x":-5,"y":10},"name":"refined-concrete"},{"position":{"x":-5,"y":11},"name":"refined-concrete"},{"position":{"x":-4,"y":-13},"name":"refined-concrete"},{"position":{"x":-4,"y":-12},"name":"refined-concrete"},{"position":{"x":-4,"y":-11},"name":"refined-concrete"},{"position":{"x":-4,"y":-10},"name":"refined-concrete"},{"position":{"x":-4,"y":-9},"name":"refined-concrete"},{"position":{"x":-4,"y":-8},"name":"refined-concrete"},{"position":{"x":-4,"y":-7},"name":"refined-concrete"},{"position":{"x":-4,"y":-6},"name":"refined-concrete"},{"position":{"x":-4,"y":-5},"name":"refined-concrete"},{"position":{"x":-4,"y":-4},"name":"refined-concrete"},{"position":{"x":-4,"y":-3},"name":"refined-concrete"},{"position":{"x":-4,"y":-2},"name":"refined-concrete"},{"position":{"x":-4,"y":-1},"name":"refined-concrete"},{"position":{"x":-4,"y":0},"name":"refined-concrete"},{"position":{"x":-4,"y":1},"name":"refined-concrete"},{"position":{"x":-4,"y":2},"name":"refined-concrete"},{"position":{"x":-4,"y":3},"name":"refined-concrete"},{"position":{"x":-4,"y":4},"name":"refined-concrete"},{"position":{"x":-4,"y":5},"name":"refined-concrete"},{"position":{"x":-4,"y":6},"name":"refined-concrete"},{"position":{"x":-4,"y":7},"name":"refined-concrete"},{"position":{"x":-4,"y":8},"name":"refined-concrete"},{"position":{"x":-4,"y":9},"name":"refined-concrete"},{"position":{"x":-4,"y":10},"name":"refined-concrete"},{"position":{"x":-4,"y":11},"name":"refined-concrete"},{"position":{"x":-3,"y":-13},"name":"refined-concrete"},{"position":{"x":-3,"y":-12},"name":"refined-concrete"},{"position":{"x":-3,"y":-11},"name":"refined-concrete"},{"position":{"x":-3,"y":-10},"name":"refined-concrete"},{"position":{"x":-3,"y":-9},"name":"refined-concrete"},{"position":{"x":-3,"y":-8},"name":"refined-concrete"},{"position":{"x":-3,"y":-7},"name":"refined-concrete"},{"position":{"x":-3,"y":-6},"name":"refined-concrete"},{"position":{"x":-3,"y":-5},"name":"refined-concrete"},{"position":{"x":-3,"y":-4},"name":"refined-concrete"},{"position":{"x":-3,"y":-3},"name":"refined-concrete"},{"position":{"x":-3,"y":-2},"name":"refined-concrete"},{"position":{"x":-3,"y":-1},"name":"refined-concrete"},{"position":{"x":-3,"y":0},"name":"refined-concrete"},{"position":{"x":-3,"y":1},"name":"refined-concrete"},{"position":{"x":-3,"y":2},"name":"refined-concrete"},{"position":{"x":-3,"y":3},"name":"refined-concrete"},{"position":{"x":-3,"y":4},"name":"refined-concrete"},{"position":{"x":-3,"y":5},"name":"refined-concrete"},{"position":{"x":-3,"y":6},"name":"refined-concrete"},{"position":{"x":-3,"y":7},"name":"refined-concrete"},{"position":{"x":-3,"y":8},"name":"refined-concrete"},{"position":{"x":-3,"y":9},"name":"refined-concrete"},{"position":{"x":-3,"y":10},"name":"refined-concrete"},{"position":{"x":-3,"y":11},"name":"refined-concrete"},{"position":{"x":-2,"y":-13},"name":"refined-concrete"},{"position":{"x":-2,"y":-12},"name":"refined-concrete"},{"position":{"x":-2,"y":-11},"name":"refined-concrete"},{"position":{"x":-2,"y":-10},"name":"refined-concrete"},{"position":{"x":-2,"y":-9},"name":"refined-concrete"},{"position":{"x":-2,"y":-8},"name":"refined-concrete"},{"position":{"x":-2,"y":-7},"name":"refined-concrete"},{"position":{"x":-2,"y":-6},"name":"refined-concrete"},{"position":{"x":-2,"y":-5},"name":"refined-concrete"},{"position":{"x":-2,"y":-4},"name":"refined-concrete"},{"position":{"x":-2,"y":-3},"name":"refined-concrete"},{"position":{"x":-2,"y":-2},"name":"refined-concrete"},{"position":{"x":-2,"y":-1},"name":"refined-concrete"},{"position":{"x":-2,"y":0},"name":"refined-concrete"},{"position":{"x":-2,"y":1},"name":"refined-concrete"},{"position":{"x":-2,"y":2},"name":"refined-concrete"},{"position":{"x":-2,"y":3},"name":"refined-concrete"},{"position":{"x":-2,"y":4},"name":"refined-concrete"},{"position":{"x":-2,"y":5},"name":"refined-concrete"},{"position":{"x":-2,"y":6},"name":"refined-concrete"},{"position":{"x":-2,"y":7},"name":"refined-concrete"},{"position":{"x":-2,"y":8},"name":"refined-concrete"},{"position":{"x":-2,"y":9},"name":"refined-concrete"},{"position":{"x":-2,"y":10},"name":"refined-concrete"},{"position":{"x":-2,"y":11},"name":"refined-concrete"},{"position":{"x":-2,"y":12},"name":"refined-concrete"},{"position":{"x":-1,"y":-13},"name":"refined-concrete"},{"position":{"x":-1,"y":-12},"name":"refined-concrete"},{"position":{"x":-1,"y":-11},"name":"refined-concrete"},{"position":{"x":-1,"y":-10},"name":"refined-concrete"},{"position":{"x":-1,"y":-9},"name":"refined-concrete"},{"position":{"x":-1,"y":-8},"name":"refined-concrete"},{"position":{"x":-1,"y":-7},"name":"refined-concrete"},{"position":{"x":-1,"y":-6},"name":"refined-concrete"},{"position":{"x":-1,"y":-5},"name":"refined-concrete"},{"position":{"x":-1,"y":-4},"name":"refined-concrete"},{"position":{"x":-1,"y":-3},"name":"refined-concrete"},{"position":{"x":-1,"y":-2},"name":"refined-concrete"},{"position":{"x":-1,"y":-1},"name":"refined-concrete"},{"position":{"x":-1,"y":0},"name":"refined-concrete"},{"position":{"x":-1,"y":1},"name":"refined-concrete"},{"position":{"x":-1,"y":2},"name":"refined-concrete"},{"position":{"x":-1,"y":3},"name":"refined-concrete"},{"position":{"x":-1,"y":4},"name":"refined-concrete"},{"position":{"x":-1,"y":5},"name":"refined-concrete"},{"position":{"x":-1,"y":6},"name":"refined-concrete"},{"position":{"x":-1,"y":7},"name":"refined-concrete"},{"position":{"x":-1,"y":8},"name":"refined-concrete"},{"position":{"x":-1,"y":9},"name":"refined-concrete"},{"position":{"x":-1,"y":10},"name":"refined-concrete"},{"position":{"x":-1,"y":11},"name":"refined-concrete"},{"position":{"x":-1,"y":12},"name":"refined-concrete"},{"position":{"x":0,"y":-13},"name":"refined-concrete"},{"position":{"x":0,"y":-12},"name":"refined-concrete"},{"position":{"x":0,"y":-11},"name":"refined-concrete"},{"position":{"x":0,"y":-10},"name":"refined-concrete"},{"position":{"x":0,"y":-9},"name":"refined-concrete"},{"position":{"x":0,"y":-8},"name":"refined-concrete"},{"position":{"x":0,"y":-7},"name":"refined-concrete"},{"position":{"x":0,"y":-6},"name":"refined-concrete"},{"position":{"x":0,"y":-5},"name":"refined-concrete"},{"position":{"x":0,"y":-4},"name":"refined-concrete"},{"position":{"x":0,"y":-3},"name":"refined-concrete"},{"position":{"x":0,"y":-2},"name":"refined-concrete"},{"position":{"x":0,"y":-1},"name":"refined-concrete"},{"position":{"x":0,"y":0},"name":"refined-concrete"},{"position":{"x":0,"y":1},"name":"refined-concrete"},{"position":{"x":0,"y":2},"name":"refined-concrete"},{"position":{"x":0,"y":3},"name":"refined-concrete"},{"position":{"x":0,"y":4},"name":"refined-concrete"},{"position":{"x":0,"y":5},"name":"refined-concrete"},{"position":{"x":0,"y":6},"name":"refined-concrete"},{"position":{"x":0,"y":7},"name":"refined-concrete"},{"position":{"x":0,"y":8},"name":"refined-concrete"},{"position":{"x":0,"y":9},"name":"refined-concrete"},{"position":{"x":0,"y":10},"name":"refined-concrete"},{"position":{"x":0,"y":11},"name":"refined-concrete"},{"position":{"x":0,"y":12},"name":"refined-concrete"},{"position":{"x":1,"y":-13},"name":"refined-concrete"},{"position":{"x":1,"y":-12},"name":"refined-concrete"},{"position":{"x":1,"y":-11},"name":"refined-concrete"},{"position":{"x":1,"y":-10},"name":"refined-concrete"},{"position":{"x":1,"y":-9},"name":"refined-concrete"},{"position":{"x":1,"y":-8},"name":"refined-concrete"},{"position":{"x":1,"y":-7},"name":"refined-concrete"},{"position":{"x":1,"y":-6},"name":"refined-concrete"},{"position":{"x":1,"y":-5},"name":"refined-concrete"},{"position":{"x":1,"y":-4},"name":"refined-concrete"},{"position":{"x":1,"y":-3},"name":"refined-concrete"},{"position":{"x":1,"y":-2},"name":"refined-concrete"},{"position":{"x":1,"y":-1},"name":"refined-concrete"},{"position":{"x":1,"y":0},"name":"refined-concrete"},{"position":{"x":1,"y":1},"name":"refined-concrete"},{"position":{"x":1,"y":2},"name":"refined-concrete"},{"position":{"x":1,"y":3},"name":"refined-concrete"},{"position":{"x":1,"y":4},"name":"refined-concrete"},{"position":{"x":1,"y":5},"name":"refined-concrete"},{"position":{"x":1,"y":6},"name":"refined-concrete"},{"position":{"x":1,"y":7},"name":"refined-concrete"},{"position":{"x":1,"y":8},"name":"refined-concrete"},{"position":{"x":1,"y":9},"name":"refined-concrete"},{"position":{"x":1,"y":10},"name":"refined-concrete"},{"position":{"x":1,"y":11},"name":"refined-concrete"},{"position":{"x":1,"y":12},"name":"refined-concrete"},{"position":{"x":2,"y":-13},"name":"refined-concrete"},{"position":{"x":2,"y":-12},"name":"refined-concrete"},{"position":{"x":2,"y":-11},"name":"refined-concrete"},{"position":{"x":2,"y":-10},"name":"refined-concrete"},{"position":{"x":2,"y":-9},"name":"refined-concrete"},{"position":{"x":2,"y":-8},"name":"refined-concrete"},{"position":{"x":2,"y":-7},"name":"refined-concrete"},{"position":{"x":2,"y":-6},"name":"refined-concrete"},{"position":{"x":2,"y":-5},"name":"refined-concrete"},{"position":{"x":2,"y":-4},"name":"refined-concrete"},{"position":{"x":2,"y":-3},"name":"refined-concrete"},{"position":{"x":2,"y":-2},"name":"refined-concrete"},{"position":{"x":2,"y":-1},"name":"refined-concrete"},{"position":{"x":2,"y":0},"name":"refined-concrete"},{"position":{"x":2,"y":1},"name":"refined-concrete"},{"position":{"x":2,"y":2},"name":"refined-concrete"},{"position":{"x":2,"y":3},"name":"refined-concrete"},{"position":{"x":2,"y":4},"name":"refined-concrete"},{"position":{"x":2,"y":5},"name":"refined-concrete"},{"position":{"x":2,"y":6},"name":"refined-concrete"},{"position":{"x":2,"y":7},"name":"refined-concrete"},{"position":{"x":2,"y":8},"name":"refined-concrete"},{"position":{"x":2,"y":9},"name":"refined-concrete"},{"position":{"x":2,"y":10},"name":"refined-concrete"},{"position":{"x":2,"y":11},"name":"refined-concrete"},{"position":{"x":2,"y":12},"name":"refined-concrete"},{"position":{"x":3,"y":-13},"name":"refined-concrete"},{"position":{"x":3,"y":-12},"name":"refined-concrete"},{"position":{"x":3,"y":-11},"name":"refined-concrete"},{"position":{"x":3,"y":-10},"name":"refined-concrete"},{"position":{"x":3,"y":-9},"name":"refined-concrete"},{"position":{"x":3,"y":-8},"name":"refined-concrete"},{"position":{"x":3,"y":-7},"name":"refined-concrete"},{"position":{"x":3,"y":-6},"name":"refined-concrete"},{"position":{"x":3,"y":-5},"name":"refined-concrete"},{"position":{"x":3,"y":-4},"name":"refined-concrete"},{"position":{"x":3,"y":-3},"name":"refined-concrete"},{"position":{"x":3,"y":-2},"name":"refined-concrete"},{"position":{"x":3,"y":-1},"name":"refined-concrete"},{"position":{"x":3,"y":0},"name":"refined-concrete"},{"position":{"x":3,"y":1},"name":"refined-concrete"},{"position":{"x":3,"y":2},"name":"refined-concrete"},{"position":{"x":3,"y":3},"name":"refined-concrete"},{"position":{"x":3,"y":4},"name":"refined-concrete"},{"position":{"x":3,"y":5},"name":"refined-concrete"},{"position":{"x":3,"y":6},"name":"refined-concrete"},{"position":{"x":3,"y":7},"name":"refined-concrete"},{"position":{"x":3,"y":8},"name":"refined-concrete"},{"position":{"x":3,"y":9},"name":"refined-concrete"},{"position":{"x":3,"y":10},"name":"refined-concrete"},{"position":{"x":3,"y":11},"name":"refined-concrete"},{"position":{"x":3,"y":12},"name":"refined-concrete"},{"position":{"x":4,"y":-13},"name":"refined-concrete"},{"position":{"x":4,"y":-12},"name":"refined-concrete"},{"position":{"x":4,"y":-11},"name":"refined-concrete"},{"position":{"x":4,"y":-10},"name":"refined-concrete"},{"position":{"x":4,"y":-9},"name":"refined-concrete"},{"position":{"x":4,"y":-8},"name":"refined-concrete"},{"position":{"x":4,"y":-7},"name":"refined-concrete"},{"position":{"x":4,"y":-6},"name":"refined-concrete"},{"position":{"x":4,"y":-5},"name":"refined-concrete"},{"position":{"x":4,"y":-4},"name":"refined-concrete"},{"position":{"x":4,"y":-3},"name":"refined-concrete"},{"position":{"x":4,"y":-2},"name":"refined-concrete"},{"position":{"x":4,"y":-1},"name":"refined-concrete"},{"position":{"x":4,"y":0},"name":"refined-concrete"},{"position":{"x":4,"y":1},"name":"refined-concrete"},{"position":{"x":4,"y":2},"name":"refined-concrete"},{"position":{"x":4,"y":3},"name":"refined-concrete"},{"position":{"x":4,"y":4},"name":"refined-concrete"},{"position":{"x":4,"y":5},"name":"refined-concrete"},{"position":{"x":4,"y":6},"name":"refined-concrete"},{"position":{"x":4,"y":7},"name":"refined-concrete"},{"position":{"x":4,"y":8},"name":"refined-concrete"},{"position":{"x":4,"y":9},"name":"refined-concrete"},{"position":{"x":4,"y":10},"name":"refined-concrete"},{"position":{"x":4,"y":11},"name":"refined-concrete"},{"position":{"x":4,"y":12},"name":"refined-concrete"},{"position":{"x":5,"y":-13},"name":"refined-concrete"},{"position":{"x":5,"y":-12},"name":"refined-concrete"},{"position":{"x":5,"y":-11},"name":"refined-concrete"},{"position":{"x":5,"y":-10},"name":"refined-concrete"},{"position":{"x":5,"y":-9},"name":"refined-concrete"},{"position":{"x":5,"y":-8},"name":"refined-concrete"},{"position":{"x":5,"y":-7},"name":"refined-concrete"},{"position":{"x":5,"y":-6},"name":"refined-concrete"},{"position":{"x":5,"y":-5},"name":"refined-concrete"},{"position":{"x":5,"y":-4},"name":"refined-concrete"},{"position":{"x":5,"y":-3},"name":"refined-concrete"},{"position":{"x":5,"y":-2},"name":"refined-concrete"},{"position":{"x":5,"y":-1},"name":"refined-concrete"},{"position":{"x":5,"y":0},"name":"refined-concrete"},{"position":{"x":5,"y":1},"name":"refined-concrete"},{"position":{"x":5,"y":2},"name":"refined-concrete"},{"position":{"x":5,"y":3},"name":"refined-concrete"},{"position":{"x":5,"y":4},"name":"refined-concrete"},{"position":{"x":5,"y":5},"name":"refined-concrete"},{"position":{"x":5,"y":6},"name":"refined-concrete"},{"position":{"x":5,"y":7},"name":"refined-concrete"},{"position":{"x":5,"y":8},"name":"refined-concrete"},{"position":{"x":5,"y":9},"name":"refined-concrete"},{"position":{"x":5,"y":10},"name":"refined-concrete"},{"position":{"x":5,"y":11},"name":"refined-concrete"},{"position":{"x":5,"y":12},"name":"refined-concrete"},{"position":{"x":6,"y":-13},"name":"refined-concrete"},{"position":{"x":6,"y":-12},"name":"refined-concrete"},{"position":{"x":6,"y":-11},"name":"refined-concrete"},{"position":{"x":6,"y":-10},"name":"refined-concrete"},{"position":{"x":6,"y":-9},"name":"refined-concrete"},{"position":{"x":6,"y":-8},"name":"refined-concrete"},{"position":{"x":6,"y":-7},"name":"refined-concrete"},{"position":{"x":6,"y":-6},"name":"refined-concrete"},{"position":{"x":6,"y":-5},"name":"refined-concrete"},{"position":{"x":6,"y":-4},"name":"refined-concrete"},{"position":{"x":6,"y":-3},"name":"refined-concrete"},{"position":{"x":6,"y":-2},"name":"refined-concrete"},{"position":{"x":6,"y":-1},"name":"refined-concrete"},{"position":{"x":6,"y":0},"name":"refined-concrete"},{"position":{"x":6,"y":1},"name":"refined-concrete"},{"position":{"x":6,"y":2},"name":"refined-concrete"},{"position":{"x":6,"y":3},"name":"refined-concrete"},{"position":{"x":6,"y":4},"name":"refined-concrete"},{"position":{"x":6,"y":5},"name":"refined-concrete"},{"position":{"x":6,"y":6},"name":"refined-concrete"},{"position":{"x":6,"y":7},"name":"refined-concrete"},{"position":{"x":6,"y":8},"name":"refined-concrete"},{"position":{"x":6,"y":9},"name":"refined-concrete"},{"position":{"x":6,"y":10},"name":"refined-concrete"},{"position":{"x":6,"y":11},"name":"refined-concrete"},{"position":{"x":6,"y":12},"name":"refined-concrete"},{"position":{"x":7,"y":-12},"name":"refined-concrete"},{"position":{"x":7,"y":-11},"name":"refined-concrete"},{"position":{"x":7,"y":-10},"name":"refined-concrete"},{"position":{"x":7,"y":-9},"name":"refined-concrete"},{"position":{"x":7,"y":-8},"name":"refined-concrete"},{"position":{"x":7,"y":-7},"name":"refined-concrete"},{"position":{"x":7,"y":-6},"name":"refined-concrete"},{"position":{"x":7,"y":-5},"name":"refined-concrete"},{"position":{"x":7,"y":-4},"name":"refined-concrete"},{"position":{"x":7,"y":-3},"name":"refined-concrete"},{"position":{"x":7,"y":-2},"name":"refined-concrete"},{"position":{"x":7,"y":-1},"name":"refined-concrete"},{"position":{"x":7,"y":0},"name":"refined-concrete"},{"position":{"x":7,"y":1},"name":"refined-concrete"},{"position":{"x":7,"y":2},"name":"refined-concrete"},{"position":{"x":7,"y":3},"name":"refined-concrete"},{"position":{"x":7,"y":4},"name":"refined-concrete"},{"position":{"x":7,"y":5},"name":"refined-concrete"},{"position":{"x":7,"y":6},"name":"refined-concrete"},{"position":{"x":7,"y":7},"name":"refined-concrete"},{"position":{"x":7,"y":8},"name":"refined-concrete"},{"position":{"x":7,"y":9},"name":"refined-concrete"},{"position":{"x":7,"y":10},"name":"refined-concrete"},{"position":{"x":7,"y":11},"name":"refined-concrete"},{"position":{"x":7,"y":12},"name":"refined-concrete"},{"position":{"x":8,"y":-13},"name":"refined-concrete"},{"position":{"x":8,"y":-12},"name":"refined-concrete"},{"position":{"x":8,"y":-11},"name":"refined-concrete"},{"position":{"x":8,"y":-10},"name":"refined-concrete"},{"position":{"x":8,"y":-9},"name":"refined-concrete"},{"position":{"x":8,"y":-8},"name":"refined-concrete"},{"position":{"x":8,"y":-7},"name":"refined-concrete"},{"position":{"x":8,"y":-6},"name":"refined-concrete"},{"position":{"x":8,"y":-5},"name":"refined-concrete"},{"position":{"x":8,"y":-4},"name":"refined-concrete"},{"position":{"x":8,"y":-3},"name":"refined-concrete"},{"position":{"x":8,"y":-2},"name":"refined-concrete"},{"position":{"x":8,"y":-1},"name":"refined-concrete"},{"position":{"x":8,"y":0},"name":"refined-concrete"},{"position":{"x":8,"y":1},"name":"refined-concrete"},{"position":{"x":8,"y":2},"name":"refined-concrete"},{"position":{"x":8,"y":3},"name":"refined-concrete"},{"position":{"x":8,"y":4},"name":"refined-concrete"},{"position":{"x":8,"y":5},"name":"refined-concrete"},{"position":{"x":8,"y":6},"name":"refined-concrete"},{"position":{"x":8,"y":7},"name":"refined-concrete"},{"position":{"x":8,"y":8},"name":"refined-concrete"},{"position":{"x":8,"y":9},"name":"refined-concrete"},{"position":{"x":8,"y":10},"name":"refined-concrete"},{"position":{"x":8,"y":11},"name":"refined-concrete"},{"position":{"x":8,"y":12},"name":"refined-concrete"},{"position":{"x":9,"y":-13},"name":"refined-concrete"},{"position":{"x":9,"y":-12},"name":"refined-concrete"},{"position":{"x":9,"y":-11},"name":"refined-concrete"},{"position":{"x":9,"y":-10},"name":"refined-concrete"},{"position":{"x":9,"y":-9},"name":"refined-concrete"},{"position":{"x":9,"y":-8},"name":"refined-concrete"},{"position":{"x":9,"y":-7},"name":"refined-concrete"},{"position":{"x":9,"y":-6},"name":"refined-concrete"},{"position":{"x":9,"y":-5},"name":"refined-concrete"},{"position":{"x":9,"y":-4},"name":"refined-concrete"},{"position":{"x":9,"y":-3},"name":"refined-concrete"},{"position":{"x":9,"y":-2},"name":"refined-concrete"},{"position":{"x":9,"y":-1},"name":"refined-concrete"},{"position":{"x":9,"y":0},"name":"refined-concrete"},{"position":{"x":9,"y":1},"name":"refined-concrete"},{"position":{"x":9,"y":2},"name":"refined-concrete"},{"position":{"x":9,"y":3},"name":"refined-concrete"},{"position":{"x":9,"y":4},"name":"refined-concrete"},{"position":{"x":9,"y":5},"name":"refined-concrete"},{"position":{"x":9,"y":6},"name":"refined-concrete"},{"position":{"x":9,"y":7},"name":"refined-concrete"},{"position":{"x":9,"y":8},"name":"refined-concrete"},{"position":{"x":9,"y":9},"name":"refined-concrete"},{"position":{"x":9,"y":10},"name":"refined-concrete"},{"position":{"x":9,"y":11},"name":"refined-concrete"},{"position":{"x":9,"y":12},"name":"refined-concrete"},{"position":{"x":10,"y":-13},"name":"refined-concrete"},{"position":{"x":10,"y":-12},"name":"refined-concrete"},{"position":{"x":10,"y":-11},"name":"refined-concrete"},{"position":{"x":10,"y":-10},"name":"refined-concrete"},{"position":{"x":10,"y":-9},"name":"refined-concrete"},{"position":{"x":10,"y":-8},"name":"refined-concrete"},{"position":{"x":10,"y":-7},"name":"refined-concrete"},{"position":{"x":10,"y":-6},"name":"refined-concrete"},{"position":{"x":10,"y":-5},"name":"refined-concrete"},{"position":{"x":10,"y":-4},"name":"refined-concrete"},{"position":{"x":10,"y":-3},"name":"refined-concrete"},{"position":{"x":10,"y":-2},"name":"refined-concrete"},{"position":{"x":10,"y":-1},"name":"refined-concrete"},{"position":{"x":10,"y":0},"name":"refined-concrete"},{"position":{"x":10,"y":1},"name":"refined-concrete"},{"position":{"x":10,"y":2},"name":"refined-concrete"},{"position":{"x":10,"y":3},"name":"refined-concrete"},{"position":{"x":10,"y":4},"name":"refined-concrete"},{"position":{"x":10,"y":5},"name":"refined-concrete"},{"position":{"x":10,"y":6},"name":"refined-concrete"},{"position":{"x":10,"y":7},"name":"refined-concrete"},{"position":{"x":10,"y":8},"name":"refined-concrete"},{"position":{"x":10,"y":9},"name":"refined-concrete"},{"position":{"x":10,"y":10},"name":"refined-concrete"},{"position":{"x":10,"y":11},"name":"refined-concrete"},{"position":{"x":10,"y":12},"name":"refined-concrete"},{"position":{"x":11,"y":-12},"name":"refined-concrete"},{"position":{"x":11,"y":-11},"name":"refined-concrete"},{"position":{"x":11,"y":-10},"name":"refined-concrete"},{"position":{"x":11,"y":-9},"name":"refined-concrete"},{"position":{"x":11,"y":-8},"name":"refined-concrete"},{"position":{"x":11,"y":-7},"name":"refined-concrete"},{"position":{"x":11,"y":-6},"name":"refined-concrete"},{"position":{"x":11,"y":-5},"name":"refined-concrete"},{"position":{"x":11,"y":-4},"name":"refined-concrete"},{"position":{"x":11,"y":-3},"name":"refined-concrete"},{"position":{"x":11,"y":-2},"name":"refined-concrete"},{"position":{"x":11,"y":-1},"name":"refined-concrete"},{"position":{"x":11,"y":0},"name":"refined-concrete"},{"position":{"x":11,"y":1},"name":"refined-concrete"},{"position":{"x":11,"y":2},"name":"refined-concrete"},{"position":{"x":11,"y":3},"name":"refined-concrete"},{"position":{"x":11,"y":4},"name":"refined-concrete"},{"position":{"x":11,"y":5},"name":"refined-concrete"},{"position":{"x":11,"y":6},"name":"refined-concrete"},{"position":{"x":11,"y":7},"name":"refined-concrete"},{"position":{"x":11,"y":8},"name":"refined-concrete"},{"position":{"x":11,"y":9},"name":"refined-concrete"},{"position":{"x":11,"y":10},"name":"refined-concrete"},{"position":{"x":11,"y":11},"name":"refined-concrete"},{"position":{"x":11,"y":12},"name":"refined-concrete"},{"position":{"x":12,"y":-12},"name":"refined-concrete"},{"position":{"x":12,"y":-11},"name":"refined-concrete"},{"position":{"x":12,"y":-10},"name":"refined-concrete"},{"position":{"x":12,"y":-9},"name":"refined-concrete"},{"position":{"x":12,"y":-8},"name":"refined-concrete"},{"position":{"x":12,"y":-7},"name":"refined-concrete"},{"position":{"x":12,"y":-6},"name":"refined-concrete"},{"position":{"x":12,"y":-5},"name":"refined-concrete"},{"position":{"x":12,"y":-4},"name":"refined-concrete"},{"position":{"x":12,"y":-3},"name":"refined-concrete"},{"position":{"x":12,"y":-2},"name":"refined-concrete"},{"position":{"x":12,"y":-1},"name":"refined-concrete"},{"position":{"x":12,"y":0},"name":"refined-concrete"},{"position":{"x":12,"y":1},"name":"refined-concrete"},{"position":{"x":12,"y":2},"name":"refined-concrete"},{"position":{"x":12,"y":3},"name":"refined-concrete"},{"position":{"x":12,"y":4},"name":"refined-concrete"},{"position":{"x":12,"y":5},"name":"refined-concrete"},{"position":{"x":12,"y":6},"name":"refined-concrete"},{"position":{"x":12,"y":7},"name":"refined-concrete"},{"position":{"x":12,"y":8},"name":"refined-concrete"},{"position":{"x":12,"y":9},"name":"refined-concrete"},{"position":{"x":12,"y":10},"name":"refined-concrete"},{"position":{"x":12,"y":11},"name":"refined-concrete"},{"position":{"x":13,"y":-10},"name":"refined-concrete"},{"position":{"x":13,"y":-9},"name":"refined-concrete"},{"position":{"x":13,"y":-8},"name":"refined-concrete"},{"position":{"x":13,"y":-7},"name":"refined-concrete"},{"position":{"x":13,"y":-6},"name":"refined-concrete"},{"position":{"x":13,"y":-5},"name":"refined-concrete"},{"position":{"x":13,"y":-4},"name":"refined-concrete"},{"position":{"x":13,"y":-3},"name":"refined-concrete"},{"position":{"x":13,"y":-2},"name":"refined-concrete"},{"position":{"x":13,"y":-1},"name":"refined-concrete"},{"position":{"x":13,"y":0},"name":"refined-concrete"},{"position":{"x":13,"y":1},"name":"refined-concrete"},{"position":{"x":13,"y":2},"name":"refined-concrete"},{"position":{"x":13,"y":3},"name":"refined-concrete"},{"position":{"x":13,"y":4},"name":"refined-concrete"},{"position":{"x":13,"y":8},"name":"refined-concrete"},{"position":{"x":13,"y":9},"name":"refined-concrete"},{"position":{"x":13,"y":10},"name":"refined-concrete"}],"item":"blueprint","version":73018507264}}' diff --git a/maps/tank_conquest/tank_conquest.lua b/maps/tank_conquest/tank_conquest.lua deleted file mode 100644 index 7d711114f..000000000 --- a/maps/tank_conquest/tank_conquest.lua +++ /dev/null @@ -1,1914 +0,0 @@ ---luacheck: ignore --- factorio scenario -- tank conquest -- xalpha made this -- - -local blueprint_poi_base_json = require 'maps.tank_conquest.blueprint_poi_base_json' - -local blueprint_poi_spot_one_json = require 'maps.tank_conquest.blueprint_poi_spot_one_json' - -local blueprint_poi_spot_two_json = require 'maps.tank_conquest.blueprint_poi_spot_two_json' - -local blueprint_poi_spot_three_json = require 'maps.tank_conquest.blueprint_poi_spot_three_json' - -local blueprint_poi_fire_json = require 'maps.tank_conquest.blueprint_poi_fire_json' - -local blueprint_poi_laser_json = require 'maps.tank_conquest.blueprint_poi_laser_json' - -storage.table_of_properties = {} - -storage.table_of_properties.required_number_of_players = 2 - -storage.table_of_properties.countdown_in_seconds = 28800 - -storage.table_of_properties.wait_in_seconds = 2 - -storage.table_of_properties.size_of_the_battlefield = 2000 - -storage.table_of_properties.amount_of_tickets = 800 - -storage.table_of_properties.conquest_speed = 5 - -storage.table_of_properties.acceleration_value = 0.05 - -storage.table_of_properties.game_stage = 'lobby' - -storage.table_of_tanks = {} - -storage.table_of_scores = {} - -storage.table_of_spots = {} - -storage.table_of_spawns = {} - -storage.table_of_squads = {} - -storage.table_of_drawings = {} - -storage.table_of_delays = {} - -local table_of_colors = -{ - squad = { r = 75, g = 155, b = 45 }, - team = { r = 65, g = 120, b = 200 }, - enemy = { r = 190, g = 55, b = 50 }, - neutral = { r = 77, g = 77, b = 77 }, - damage = { r = 255, g = 0, b = 255 }, - white = { r = 255, g = 255, b = 255 } -} - -local table_of_loots = -{ - { name = 'iron-ore', count = 50 }, - { name = 'copper-ore', count = 50 }, - { name = 'stone', count = 50 }, - { name = 'coal', count = 50 }, - { name = 'defender-capsule', count = 10 }, - { name = 'land-mine', count = 20 }, - { name = 'gun-turret', count = 5 }, - { name = 'piercing-rounds-magazine', count = 50 }, - { name = 'uranium-rounds-magazine', count = 10 }, - { name = 'combat-shotgun', count = 1 }, - { name = 'shotgun-shell', count = 20 }, - { name = 'piercing-shotgun-shell', count = 20 }, - { name = 'flamethrower', count = 1 }, - { name = 'flamethrower-ammo', count = 20 }, - { name = 'rocket-launcher', count = 1 }, - { name = 'rocket', count = 20 }, - { name = 'explosive-rocket', count = 10 }, - { name = 'atomic-bomb', count = 1 }, - { name = 'grenade', count = 20 }, - { name = 'cluster-grenade', count = 10 }, - { name = 'cannon-shell', count = 20 }, - { name = 'explosive-cannon-shell', count = 10 }, - { name = 'uranium-cannon-shell', count = 5 }, - { name = 'explosive-uranium-cannon-shell', count = 5 }, - { name = 'modular-armor', count = 1 }, - { name = 'power-armor', count = 1 }, - { name = 'power-armor-mk2', count = 1 }, - { name = 'exoskeleton-equipment', count = 1 }, - { name = 'battery-mk2-equipment', count = 1 }, - { name = 'energy-shield-equipment', count = 1 }, - { name = 'fusion-reactor-equipment', count = 1 }, - { name = 'solid-fuel', count = 20 }, - { name = 'rocket-fuel', count = 10 }, - { name = 'nuclear-fuel', count = 1 }, - { name = 'gate', count = 10 }, - { name = 'stone-wall', count = 20 } -} - -local table_of_slots = -{ - 'stone-wall', - 'gun-turret', - 'wood', - 'repair-pack', - 'raw-fish', - 'defender-capsule', - 'rocket', - 'explosive-rocket', - 'atomic-bomb', - 'flamethrower-ammo', - 'land-mine', - 'firearm-magazine', - 'piercing-rounds-magazine', - 'uranium-rounds-magazine', - 'grenade', - 'cluster-grenade', - 'cannon-shell', - 'explosive-cannon-shell', - 'uranium-cannon-shell', - 'explosive-uranium-cannon-shell' -} - -local table_of_ores = { 'iron-ore', 'copper-ore', 'stone', 'coal' } - -local map_functions = require 'utils.tools.map_functions' - -local event = require 'utils.event' - -local map_intro = -[[ - - - T A N K C O N Q U E S T - - - - - When the round is running, the ticket overview is shown in the header. Your objective - is to defend your team's tickets and withdraw the tickets from the opposing team as - quickly as possible. - - There are two ways to withdraw the tickets from the opposing team. First, by killing - the player and second, by taking the spots. A spot withdraw 0.05 tickets per second - from the opposing team. - - The battlefield has two special features: First, there is a point of interest in the - north and south. And second, there are loot boxes scattered throughout the battlefield. - - PvP battles and the conquest of the spots are the deciding factor to win the round. - - The battlefield is created when at least two players are online. - - There is no biter evolution from pollution, time or destruction.]] - -local function draw_gui_intro_button(player) - if player.gui.top['draw_gui_intro_button'] then - return - end - - local element_button = player.gui.top.add({ type = 'sprite-button', name = 'draw_gui_intro_button', caption = '?', tooltip = 'Map Intro' }) - - element_button.style.width = 38 - - element_button.style.height = 38 - - element_button.style.font_color = { r = 0.5, g = 0.3, b = 0.99 } - - element_button.style.font = 'heading-1' -end - -local function draw_gui_intro_frame(player) - if player.gui.center['draw_gui_intro_frame'] then - player.gui.center['draw_gui_intro_frame'].destroy() - end - - local element_frame = player.gui.center.add({ type = 'frame', name = 'draw_gui_intro_frame', direction = 'vertical' }) - - element_frame = element_frame.add({ type = 'frame' }) - - local element_label = element_frame.add({ type = 'label', name = 'draw_gui_intro_content', caption = map_intro }) - - element_label.style.top_padding = 15 - - element_label.style.single_line = false - - element_label.style.font = 'heading-2' - - element_label.style.font_color = { r = 0.7, g = 0.6, b = 0.99 } -end - -local function initialize_forces() - game.create_force('force_player_one') - - game.create_force('force_player_two') - - game.create_force('force_biter_one') - - game.create_force('force_biter_two') - - game.create_force('force_spectator') - - local force = game.forces.force_player_one - - if storage.table_of_properties[force.name] == nil then - storage.table_of_properties[force.name] = { name = force.name, enemy = 'force_player_two', icon = '☠', available_tickets = storage.table_of_properties.amount_of_tickets } - end - - force.set_friend('force_biter_two', true) - - force.set_friend('force_spectator', true) - - force.set_cease_fire('player', true) - - local force = game.forces.force_player_two - - if storage.table_of_properties[force.name] == nil then - storage.table_of_properties[force.name] = { name = force.name, enemy = 'force_player_one', icon = '☢', available_tickets = storage.table_of_properties.amount_of_tickets } - end - - force.set_friend('force_biter_one', true) - - force.set_friend('force_spectator', true) - - force.set_cease_fire('player', true) - - local force = game.forces['force_biter_one'] - - force.set_friend('force_player_two', true) - - force.set_friend('force_biter_two', true) - - force.set_friend('force_spectator', true) - - force.set_friend('player', true) - - local force = game.forces['force_biter_two'] - - force.set_friend('force_player_one', true) - - force.set_friend('force_biter_one', true) - - force.set_friend('force_spectator', true) - - force.set_friend('player', true) - - local force = game.forces.force_spectator - - force.set_spawn_position({ x = 0, y = 0 }, game.surfaces.nauvis) - - force.technologies['toolbelt'].researched = true - - force.set_friend('force_player_one', true) - - force.set_friend('force_player_two', true) - - force.set_cease_fire('force_biter_one', true) - - force.set_cease_fire('force_biter_two', true) - - force.set_cease_fire('player', true) - - force.set_cease_fire('enemy', true) - - local force = game.forces['player'] - - force.set_cease_fire('force_player_one', true) - - force.set_cease_fire('force_player_two', true) - - force.set_cease_fire('force_biter_one', true) - - force.set_cease_fire('force_biter_two', true) - - force.set_cease_fire('force_spectator', true) - - local spectator = game.permissions.create_group('permission_spectator') - - for action_name, _ in pairs(defines.input_action) do - spectator.set_allows_action(defines.input_action[action_name], false) - end - - local table_of_definitions = - { - defines.input_action.write_to_console, - defines.input_action.gui_click, - defines.input_action.gui_selection_state_changed, - defines.input_action.gui_checked_state_changed, - defines.input_action.gui_elem_changed, - defines.input_action.gui_text_changed, - defines.input_action.gui_value_changed, - defines.input_action.start_walking, - defines.input_action.open_kills_gui, - defines.input_action.toggle_show_entity_info - } - - for _, define in pairs(table_of_definitions) do - spectator.set_allows_action(define, true) - end - - for _, force in pairs(game.forces) do - game.forces[force.name].technologies['artillery'].enabled = false - - game.forces[force.name].technologies['artillery-shell-range-1'].enabled = false - - game.forces[force.name].technologies['artillery-shell-speed-1'].enabled = false - - game.forces[force.name].technologies['follower-robot-count-1'].researched = true - - game.forces[force.name].technologies['atomic-bomb'].enabled = false - - game.forces[force.name].set_turret_attack_modifier('flamethrower-turret', 4) - - game.forces[force.name].set_turret_attack_modifier('laser-turret', 2) - - game.forces[force.name].set_turret_attack_modifier('gun-turret', 4) - - game.forces[force.name].set_ammo_damage_modifier('cannon-shell', 1) - - game.forces[force.name].set_ammo_damage_modifier('grenade', 1) - - game.forces[force.name].friendly_fire = false - - game.forces[force.name].share_chart = true - end - - game.permissions.get_group('Default').set_allows_action(defines.input_action.grab_blueprint_record, false) - - game.permissions.get_group('Default').set_allows_action(defines.input_action.import_blueprint_string, false) - - game.permissions.get_group('Default').set_allows_action(defines.input_action.import_blueprint, false) - - game.forces['enemy'].evolution_factor = 0.4 -end - -function initialize_surface() - game.map_settings.enemy_evolution.time_factor = 0 - - game.map_settings.enemy_evolution.destroy_factor = 0 - - game.map_settings.enemy_evolution.pollution_factor = 0 - - game.map_settings.pollution.enabled = false - - game.map_settings.enemy_expansion.enabled = true - - game.map_settings.enemy_expansion.settler_group_min_size = 8 - - game.map_settings.enemy_expansion.settler_group_max_size = 16 - - game.map_settings.enemy_expansion.min_expansion_cooldown = 54000 - - game.map_settings.enemy_expansion.max_expansion_cooldown = 108000 - - local map_gen_settings = {} - - map_gen_settings.width = storage.table_of_properties.size_of_the_battlefield - - map_gen_settings.height = storage.table_of_properties.size_of_the_battlefield - - map_gen_settings.seed = math.random(1, 2097152) - - map_gen_settings.water = 'none' - - map_gen_settings.starting_area = 'none' - - map_gen_settings.cliff_settings = { name = 'cliff', cliff_elevation_0 = 0, cliff_elevation_interval = 0 } - - map_gen_settings.autoplace_controls = - { - ['trees'] = { frequency = 'normal', size = 'normal', richness = 'normal' }, - ['coal'] = { frequency = 'very-high', size = 'very-low', richness = 'normal' }, - ['stone'] = { frequency = 'very-high', size = 'very-low', richness = 'normal' }, - ['copper-ore'] = { frequency = 'very-high', size = 'very-low', richness = 'normal' }, - ['uranium-ore'] = { frequency = 'very-high', size = 'very-low', richness = 'normal' }, - ['iron-ore'] = { frequency = 'very-high', size = 'very-low', richness = 'normal' }, - ['crude-oil'] = { frequency = 'very-high', size = 'very-low', richness = 'normal' }, - ['enemy-base'] = { frequency = 'normal', size = 'normal', richness = 'normal' } - } - - -- map_gen_settings.autoplace_settings = { entity = { treat_missing_as_default = false, settings = { frequency = 'none', size = 'none', richness = 'none' } }, decorative = { treat_missing_as_default = true, settings = { frequency = 'none', size = 'none', richness = 'none' } } } - - -- map_gen_settings.default_enable_all_autoplace_controls = false - - if game.surfaces.tank_conquest == nil then - game.create_surface('tank_conquest', map_gen_settings) - else - rendering.clear() - - game.surfaces.tank_conquest.clear() - - game.surfaces.tank_conquest.map_gen_settings = map_gen_settings - end -end - -function draw_gui_button(player) - if player.gui.top['draw_gui_button'] then - player.gui.top['draw_gui_button'].destroy() - end - - player.gui.top.add({ type = 'sprite-button', name = 'draw_gui_button', sprite = 'item/tank', tooltip = 'MENU' }) - - -- player.gui.top.add( { type = 'sprite-button', name = 'draw_gui_button_score', sprite = 'item/heavy-armor', tooltip = 'SCORE' } ) - - -- player.gui.top.add( { type = 'sprite-button', name = 'draw_gui_button_squad', sprite = 'item/personal-roboport-equipment', tooltip = 'SQUAD' } ) -end - -function draw_gui_status(player) - if player.gui.top['draw_gui_status'] then - player.gui.top['draw_gui_status'].destroy() - end - - if storage.table_of_properties.game_stage ~= 'ongoing_game' then - return - end - - if player.force.name == 'force_spectator' then - return - end - - if #storage.table_of_spots == 0 then - return - end - - local element_frame = player.gui.top.add({ type = 'frame', name = 'draw_gui_status', direction = 'horizontal' }) - - element_frame.style.height = 38 - - element_frame.style.margin = 0 - - element_frame.style.padding = 0 - - element_frame.style.left_padding = 20 - - element_frame.style.right_padding = 20 - - element_frame.style.vertical_align = 'center' - - local element_progressbar = element_frame.add({ type = 'progressbar', value = 100 }) - - element_progressbar.style.width = 125 - - element_progressbar.style.right_padding = 20 - - element_progressbar.style.top_padding = 10 - - element_progressbar.style.color = table_of_colors.team - - element_progressbar.style.height = 20 - - local element_label = element_frame.add({ type = 'label', caption = math.floor(storage.table_of_properties[player.force.name].available_tickets) }) - - element_label.style.font_color = table_of_colors.white - - local element_label = element_frame.add({ type = 'label', caption = storage.table_of_properties[player.force.name].icon }) - - element_label.style.left_padding = 20 - - element_label.style.font_color = table_of_colors.white - - local element_label = element_frame.add({ type = 'label', caption = seconds_to_clock(storage.table_of_properties.countdown_in_seconds) }) - - element_label.style.left_padding = 20 - - element_label.style.right_padding = 20 - - element_label.style.font_color = table_of_colors.white - - local element_label = element_frame.add({ type = 'label', caption = storage.table_of_properties[storage.table_of_properties[player.force.name].enemy].icon }) - - element_label.style.font_color = table_of_colors.white - - local element_label = element_frame.add({ type = 'label', caption = math.floor(storage.table_of_properties[storage.table_of_properties[player.force.name].enemy].available_tickets) }) - - element_label.style.left_padding = 20 - - element_label.style.font_color = table_of_colors.white - - local element_progressbar = element_frame.add({ type = 'progressbar', value = 100 }) - - element_progressbar.style.width = 125 - - element_progressbar.style.left_padding = 20 - - element_progressbar.style.top_padding = 10 - - element_progressbar.style.color = table_of_colors.enemy - - element_progressbar.style.height = 20 - - for _, element_item in pairs(element_frame.children) do - element_item.style.font = 'heading-1' - end -end - -function draw_gui_spots(player) - if player.gui.top['draw_gui_spots'] then - player.gui.top['draw_gui_spots'].destroy() - end - - if storage.table_of_properties.game_stage ~= 'ongoing_game' then - return - end - - if player.force.name == 'force_spectator' then - return - end - - if #storage.table_of_spots == 0 then - return - end - - local element_frame = player.gui.top.add({ type = 'frame', name = 'draw_gui_spots', direction = 'horizontal' }) - - element_frame.style.height = 38 - - element_frame.style.margin = 0 - - element_frame.style.padding = 0 - - element_frame.style.vertical_align = 'center' - - element_frame.style.horizontal_align = 'center' - - for _, spot in pairs(storage.table_of_spots) do - local element_label = element_frame.add({ type = 'label', caption = spot.properties.name }) - - element_label.style.width = 38 - - element_label.style.height = 38 - - element_label.style.margin = 0 - - element_label.style.padding = 0 - - element_label.style.vertical_align = 'top' - - element_label.style.horizontal_align = 'center' - - element_label.style.font = 'heading-1' - - local color = table_of_colors.white - - if player.force.name ~= 'force_spectator' then - color = table_of_colors.neutral - - if spot.properties.force.name == storage.table_of_properties[player.force.name].name and spot.properties.value == 100 then - color = table_of_colors.team - end - - if spot.properties.force.name == storage.table_of_properties[player.force.name].enemy and spot.properties.value == 100 then - color = table_of_colors.enemy - end - end - - element_label.style.font_color = color - end -end - -function draw_gui_menu(player) - if player.gui.center['draw_gui_menu'] then - player.gui.center['draw_gui_menu'].destroy() - end - - local element_frame = player.gui.center.add({ type = 'frame', name = 'draw_gui_menu', direction = 'vertical' }) - - element_frame.style.padding = 0 - - element_frame.style.margin = 0 - - if game.permissions.get_group('Default').players[player.index] == nil then - element_frame.add({ type = 'sprite-button', name = 'event_on_click_join', caption = 'JOIN' }) - else - element_frame.add({ type = 'sprite-button', name = 'event_on_click_lobby', caption = 'LOBBY' }) - end - - for _, element_item in pairs(element_frame.children) do - element_item.style.padding = 0 - - element_item.style.margin = 0 - - element_item.style.minimal_width = 170 - - element_item.style.minimal_height = 170 - - element_item.style.font = 'heading-1' - - element_item.style.font_color = table_of_colors.white - end -end - -function draw_gui_score(player) - if player.gui.center['draw_gui_score'] then - player.gui.center['draw_gui_score'].destroy() - end - - local element_frame = player.gui.center.add({ type = 'frame', name = 'draw_gui_score', direction = 'vertical' }) - - element_frame.style.padding = 0 - - element_frame.style.margin = 0 - - element_frame.style.vertical_align = 'center' - - element_frame.style.horizontal_align = 'center' - - local element_table = element_frame.add({ type = 'table', column_count = 14, draw_horizontal_lines = true }) - - element_table.style.padding = 0 - - element_table.style.top_padding = 5 - - element_table.style.left_padding = 10 - - element_table.style.bottom_padding = 5 - - element_table.style.margin = 0 - - element_table.style.vertical_align = 'center' - - element_table.style.horizontal_align = 'center' - - local element_label = element_table.add({ type = 'label', caption = storage.table_of_properties[player.force.name].icon }) - - local element_label = element_table.add({ type = 'label', caption = '#' }) - - local element_label = element_table.add({ type = 'label', caption = 'NAME' }) - - local element_label = element_table.add({ type = 'label', caption = 'CLASS' }) - - local element_label = element_table.add({ type = 'label', caption = 'K' }) - - local element_label = element_table.add({ type = 'label', caption = 'D' }) - - local element_label = element_table.add({ type = 'label', caption = 'POINTS' }) - - local element_label = element_table.add({ type = 'label', caption = storage.table_of_properties[storage.table_of_properties[player.force.name].enemy].icon }) - - local element_label = element_table.add({ type = 'label', caption = '#' }) - - local element_label = element_table.add({ type = 'label', caption = 'NAME' }) - - local element_label = element_table.add({ type = 'label', caption = 'CLASS' }) - - local element_label = element_table.add({ type = 'label', caption = 'K' }) - - local element_label = element_table.add({ type = 'label', caption = 'D' }) - - local element_label = element_table.add({ type = 'label', caption = 'POINTS' }) - - for index = 1, 28 do - local element_label = element_table.add({ type = 'label', caption = '•' }) - end - - for _, element_item in pairs(element_table.children) do - element_item.style.padding = 0 - - element_item.style.right_padding = 10 - - element_item.style.margin = 0 - - element_item.style.vertical_align = 'center' - - element_item.style.font = 'heading-2' - - element_item.style.font_color = table_of_colors.white - end -end - -function draw_gui_squad(player) - if player.gui.left['draw_gui_squad'] then - player.gui.left['draw_gui_squad'].destroy() - end - - if storage.table_of_properties.game_stage ~= 'ongoing_game' then - return - end - - local element_frame = player.gui.left.add({ type = 'frame', name = 'draw_gui_squad', direction = 'vertical' }) - - element_frame.style.minimal_width = 50 - - element_frame.style.padding = 0 - - element_frame.style.margin = 0 - - element_frame.style.top_margin = 5 - - element_frame.style.left_margin = 5 - - local element_table = element_frame.add({ type = 'table', column_count = 4 }) - - element_table.style.padding = 0 - - element_table.style.margin = 0 - - for index = 1, 8 do - local element_label = element_table.add({ type = 'label', caption = 'SQUAD ' .. index }) - - local element_label = element_table.add({ type = 'label' }) - - local element_label = element_table.add({ type = 'label' }) - - local element_button = element_table.add({ type = 'sprite-button', name = 'aaa_' .. index, caption = 'JOIN' }) - - element_button.style.width = 50 - - element_button.style.height = 25 - - local element_label = element_table.add({ type = 'label', caption = '•' }) - - local element_label = element_table.add({ type = 'label', caption = '•' }) - - local element_label = element_table.add({ type = 'label', caption = '•' }) - - local element_label = element_table.add({ type = 'label', caption = '•' }) - end - - for _, element_item in pairs(element_table.children) do - element_item.style.minimal_width = 50 - - element_item.style.padding = 0 - - element_item.style.margin = 0 - - element_item.style.vertical_align = 'center' - - element_item.style.horizontal_align = 'center' - - element_item.style.font = 'heading-2' - - element_item.style.font_color = table_of_colors.white - end -end - -function draw_gui_spawn(player) - if player.gui.center['draw_gui_spawn'] then - player.gui.center['draw_gui_spawn'].destroy() - end - - if storage.table_of_properties.game_stage ~= 'ongoing_game' then - return - end - - local element_frame = player.gui.center.add({ type = 'frame', name = 'draw_gui_spawn', direction = 'horizontal' }) - - local element_button = element_frame.add({ type = 'button', name = 'event_on_click_spawn_base', caption = 'BASE' }) - - -- element_button.style.color = table_of_colors.damage - - element_button.style.font_color = table_of_colors.white - - for index, spot in pairs(storage.table_of_spots) do - local element_button = element_frame.add({ type = 'button', name = 'event_on_click_spawn_' .. index, caption = spot.properties.name }) - - -- element_button.enabled = false - - local color = table_of_colors.neutral - - -- if spot.properties.force.name == storage.table_of_properties[ player.force.name ].name and spot.properties.value >= 50 then element_button.enabled = true end - - if spot.properties.force.name == storage.table_of_properties[player.force.name].name and spot.properties.value > 0 then - color = table_of_colors.team - end - - if spot.properties.force.name == storage.table_of_properties[player.force.name].enemy and spot.properties.value > 0 then - color = table_of_colors.enemy - end - - element_button.style.font_color = color - end - - for _, element_item in pairs(element_frame.children) do - element_item.style.width = 100 - - element_item.style.height = 100 - - element_item.style.padding = 0 - - element_item.style.margin = 0 - - element_item.style.vertical_align = 'center' - - element_item.style.horizontal_align = 'center' - - element_item.style.font = 'heading-2' - end -end - -function create_a_tank(player) - player.insert({ name = 'light-armor', count = 1 }) - - player.insert({ name = 'submachine-gun', count = 1 }) - - player.insert({ name = 'firearm-magazine', count = 50 }) - - player.insert({ name = 'raw-fish', count = 10 }) - - player.insert({ name = 'explosive-cannon-shell', count = 5 }) - - local table_of_entities = player.surface.find_entities_filtered({ name = 'tank', force = player.force.name }) - - if #table_of_entities < #player.force.connected_players then - local position = player.surface.find_non_colliding_position('tank', player.position, 64, 4) - - if not position then - position = { 0, 0 } - end - - local entity = player.surface.create_entity({ name = 'tank', position = position, force = player.force.name }) - - if not entity then - return - end - - entity.minable = false - - entity.last_user = player.name - - entity.insert({ name = 'wood', count = 50 }) - - entity.insert({ name = 'cannon-shell', count = 50 }) - - entity.set_driver(player) - - storage.table_of_tanks[player.index] = entity - end -end - -function create_a_base(force_name, base_position) - local surface = game.surfaces.tank_conquest - - local table_of_items = helpers.json_to_table(blueprint_poi_base_json) - - for _, tile in pairs(table_of_items.blueprint.tiles) do - tile.position = { x = tile.position.x + base_position.x, y = tile.position.y + base_position.y + 10 } - end - - surface.set_tiles(table_of_items.blueprint.tiles, true) - - for _, object in pairs(table_of_items.blueprint.entities) do - object.force = game.forces[force_name] - - object.position = { x = object.position.x + base_position.x, y = object.position.y + base_position.y + 10 } - - local entity = surface.create_entity(object) - - if not entity then - return - end - - if - object.name == 'infinity-chest' or object.name == 'substation' or object.name == 'big-electric-pole' or object.name == 'medium-electric-pole' or object.name == 'inserter' or object.name == 'accumulator' or object.name == 'solar-panel' or - object.name == 'gun-turret' - then - entity.destructible = false - - entity.minable = false - - entity.rotatable = false - - entity.operable = false - end - - if object.name == 'wooden-chest' then - entity.destructible = false - - entity.minable = false - - entity.rotatable = false - end - - if object.name == 'stone-wall' or object.name == 'gate' or object.name == 'land-mine' then - entity.destructible = false - - entity.minable = false - end - end -end - -function create_a_spot(spot_name, spot_position, spot_blueprint) - local surface = game.surfaces.tank_conquest - - local spot = { name = spot_name, position = spot_position, force = { name = 'neutral' }, value = 0, color = table_of_colors.white } - - local table_of_positions = {} - - for x = 1, 18 do - for y = 1, 18 do - table.insert(table_of_positions, { x = math.floor(spot.position.x + x - 9), y = math.floor(spot.position.y + y - 9) }) - end - end - - local table_of_players = {} - - local draw_spot_border = - rendering.draw_rectangle( - { - surface = surface, - target = spot.position, - color = spot.color, - left_top = { spot.position.x - 9, spot.position.y - 9 }, - right_bottom = { spot.position.x + 9, spot.position.y + 9 }, - width = 5, - filled = false, - draw_on_ground = true - } - ) - - local draw_spot_force = rendering.draw_text({ text = spot.force.name, surface = surface, target = { spot.position.x, spot.position.y + 0.5 }, color = spot.color, scale = 5, alignment = 'center' }) - - local draw_spot_value = rendering.draw_text({ text = spot.value, surface = surface, target = { spot.position.x, spot.position.y - 4 }, color = spot.color, scale = 5, alignment = 'center' }) - - local draw_spot_name = rendering.draw_text({ text = spot.name, surface = surface, target = { spot.position.x, spot.position.y - 2 }, color = spot.color, scale = 5, alignment = 'center' }) - - local table_of_drawings = { name = draw_spot_name, value = draw_spot_value, force = draw_spot_force, border = draw_spot_border } - - local table_of_properties = { name = spot.name, position = spot.position, value = spot.value, force = spot.force, color = spot.color } - - local table_of_entities = {} - - local table_of_items = helpers.json_to_table(spot_blueprint) - - for _, tile in pairs(table_of_items.blueprint.tiles) do - tile.position = { x = tile.position.x + spot.position.x - 1, y = tile.position.y + spot.position.y - 1 } - end - - surface.set_tiles(table_of_items.blueprint.tiles, true) - - for _, object in pairs(table_of_items.blueprint.entities) do - object.force = 'enemy' - - object.position = { x = object.position.x + spot.position.x - 1, y = object.position.y + spot.position.y - 1 } - - local entity = surface.create_entity(object) - - if not entity then - return - end - - if object.name == 'infinity-chest' or object.name == 'substation' or object.name == 'inserter' or object.name == 'accumulator' or object.name == 'solar-panel' then - entity.destructible = false - - entity.minable = false - - entity.rotatable = false - - entity.operable = false - end - - if object.name == 'wooden-chest' then - entity.force = 'neutral' - - entity.destructible = false - - entity.minable = false - - entity.rotatable = false - end - - if object.name == 'stone-wall' or object.name == 'gate' or object.name == 'land-mine' then - entity.minable = false - end - - table.insert(table_of_entities, entity) - end - - table.insert(storage.table_of_spots, { properties = table_of_properties, drawings = table_of_drawings, players = table_of_players, positions = table_of_positions, entities = table_of_entities }) -end - -function create_a_point_of_interest(poi_blueprint, poi_position) - local surface = game.surfaces.tank_conquest - - local table_of_items = helpers.json_to_table(poi_blueprint) - - for _, tile in pairs(table_of_items.blueprint.tiles) do - tile.position = { x = tile.position.x + poi_position.x, y = tile.position.y + poi_position.y } - end - - surface.set_tiles(table_of_items.blueprint.tiles, true) - - for _, object in pairs(table_of_items.blueprint.entities) do - object.force = 'enemy' - - object.position = { x = object.position.x + poi_position.x, y = object.position.y + poi_position.y } - - local entity = surface.create_entity(object) - - if not entity then - return - end - - if object.name == 'infinity-chest' or object.name == 'substation' or object.name == 'inserter' or object.name == 'accumulator' or object.name == 'solar-panel' then - entity.destructible = false - - entity.minable = false - - entity.rotatable = false - - entity.operable = false - end - - if object.name == 'wooden-chest' then - entity.force = 'neutral' - - entity.destructible = false - - entity.minable = false - - entity.rotatable = false - end - - if object.name == 'stone-wall' or object.name == 'gate' or object.name == 'land-mine' then - entity.minable = false - end - end -end - -function seconds_to_clock(seconds) - local seconds = tonumber(seconds) - - if seconds <= 0 then - return '00:00:00' - else - local hours = string.format('%02.f', math.floor(seconds / 3600)) - - local minutes = string.format('%02.f', math.floor(seconds / 60 - (hours * 60))) - - seconds = string.format('%02.f', math.floor(seconds - hours * 3600 - minutes * 60)) - - return hours .. ':' .. minutes .. ':' .. seconds - end -end - -function draw_a_polygon(position, radius, angle, sides) - if not type(position) == 'table' then - return - end - - if not type(radius) == 'number' then - return - end - - if not type(angle) == 'number' then - return - end - - if not type(sides) == 'number' then - return - end - - local table_of_positions = {} - - table.insert(table_of_positions, { x = position.x, y = position.y }) - - for index = 1, sides + 1 do - local x = table_of_positions[1].x + (radius * math.cos(angle + (index + index - 1) * math.pi / sides)) - - local y = table_of_positions[1].y + (radius * math.sin(angle + (index + index - 1) * math.pi / sides)) - - table.insert(table_of_positions, { x = x, y = y }) - end - - return table_of_positions -end - -function draw_circle_lobby(surface, spawn_diameter, spawn_position) - for x = -spawn_diameter, spawn_diameter do - for y = -spawn_diameter, spawn_diameter do - local tile_position = { x = spawn_position.x + x, y = spawn_position.y + y } - - local distance_to_center = math.sqrt(tile_position.x ^ 2 + tile_position.y ^ 2) - - local tile_name = false - - if distance_to_center < spawn_diameter then - tile_name = 'deepwater' - - if math.random(1, 48) == 1 then - surface.create_entity({ name = 'fish', position = tile_position }) - end - end - - if distance_to_center < 9.5 then - tile_name = 'refined-concrete' - end - - if distance_to_center < 7 then - tile_name = 'sand-1' - end - - if tile_name then - surface.set_tiles({ { name = tile_name, position = tile_position } }, true) - end - end - end -end - -function event_on_click_join(player) - if storage.table_of_properties.game_stage ~= 'ongoing_game' then - return - end - - local surface = game.surfaces.tank_conquest - - if not surface then - return - end - - if not player.character then - return - end - - game.permissions.get_group('Default').add_player(player) - - if player.force.name == 'force_spectator' then - if #game.forces.force_player_one.connected_players == #game.forces.force_player_two.connected_players then - local table_of_forces = { 'force_player_one', 'force_player_two' } - - player.force = game.forces[table_of_forces[math.random(1, #table_of_forces)]] - elseif #game.forces.force_player_one.connected_players < #game.forces.force_player_two.connected_players then - player.force = game.forces.force_player_one - else - player.force = game.forces.force_player_two - end - end - - local position = player.force.get_spawn_position(surface) - - storage.table_of_spawns[player.index] = position - - if surface.is_chunk_generated(position) then - player.teleport(surface.find_non_colliding_position('character', position, 3, 0.5), surface) - else - player.teleport(position, surface) - end - - player.character.destructible = true - - player_icon_add(player) - - create_a_tank(player) - - -- draw_gui_spawn( player ) -- only for tests - - for _, spot in pairs(storage.table_of_spots) do - player.force.chart(game.surfaces.tank_conquest, { { x = spot.properties.position.x - 10, y = spot.properties.position.y - 10 }, { x = spot.properties.position.x + 10, y = spot.properties.position.y + 10 } }) - end - - game.print(player.name .. ' joined ' .. storage.table_of_properties[player.force.name].icon) -end - -function event_on_click_lobby(player) - local surface = game.surfaces.nauvis - - if storage.table_of_properties.game_stage == 'ongoing_game' then - surface = game.surfaces.tank_conquest - end - - if not player.character then - return - end - - game.permissions.get_group('permission_spectator').add_player(player) - - player.force = game.forces.force_spectator - - if storage.table_of_tanks[player.index] ~= nil and storage.table_of_tanks[player.index].valid then - storage.table_of_tanks[player.index].clear_items_inside() - - storage.table_of_tanks[player.index].destroy() - end - - storage.table_of_tanks[player.index] = nil - - local position = { x = 0, y = 0 } - - storage.table_of_spawns[player.index] = position - - if surface.is_chunk_generated(position) then - player.teleport(surface.find_non_colliding_position('character', position, 3, 0.5), surface) - else - player.teleport(position, surface) - end - - player.character.destructible = false - - player_icon_remove(player) - - player.character.clear_items_inside() -end - -function event_on_click_spawn(player) - game.print('A') -end - -function shuffle(table_of_items) - local length_of_items = #table_of_items - - for index = length_of_items, 1, -1 do - local random = math.random(length_of_items) - - table_of_items[index], table_of_items[random] = table_of_items[random], table_of_items[index] - end - - return table_of_items -end - -local function on_init(surface) - game.surfaces.nauvis.clear() - - game.surfaces.nauvis.map_gen_settings = { width = 1, height = 1 } - - game.create_surface('tank_conquest', { width = 1, height = 1 }) - - initialize_forces() - - -- storage.table_of_properties.game_stage = 'do_nothing' -end - -event.on_init(on_init) - -local function on_tick(event) - if game.tick % 30 == 0 and storage.table_of_damages ~= nil then - for _, item in pairs(storage.table_of_damages) do - item.surface.create_entity({ name = 'flying-text', position = item.position, text = math.ceil(item.damage), color = table_of_colors.damage }) - end - - storage.table_of_damages = nil - end - - if game.tick % 60 == 0 then - if storage.table_of_properties.game_stage == 'ongoing_game' then - for _, spot in pairs(storage.table_of_spots) do - if spot.properties.value == 100 then - local enemy = storage.table_of_properties[spot.properties.force.name].enemy - - if storage.table_of_properties[enemy].available_tickets >= 0 then - storage.table_of_properties[enemy].available_tickets = storage.table_of_properties[enemy].available_tickets - storage.table_of_properties.acceleration_value - end - end - - for _, player in pairs(game.connected_players) do - if player.force.name == spot.properties.force.name and spot.properties.value > 0 then - player.force.chart(game.surfaces.tank_conquest, { { x = spot.properties.position.x - 10, y = spot.properties.position.y - 10 }, { x = spot.properties.position.x + 10, y = spot.properties.position.y + 10 } }) - end - end - - for _, player in pairs(spot.players) do - if spot.properties.force.name == 'neutral' and spot.properties.value == 0 then - spot.properties.force.name = player.force.name - - for _, entity in pairs(spot.entities) do - if entity.valid then - entity.force = player.force.name - - if entity.name == 'stone-wall' or entity.name == 'gate' or entity.name == 'land-mine' then - entity.minable = true - end - end - end - end - - if spot.properties.force.name == 'neutral' or spot.properties.force.name == player.force.name and spot.properties.value < 100 then - spot.properties.value = spot.properties.value + 1 * storage.table_of_properties.conquest_speed - end - - if spot.properties.force.name ~= player.force.name and spot.properties.value > 0 then - spot.properties.value = spot.properties.value - 1 * storage.table_of_properties.conquest_speed - end - - if spot.properties.value == 0 then - spot.properties.force.name = 'neutral' - end - - local force_label = spot.properties.force.name - - if force_label ~= 'neutral' then - force_label = storage.table_of_properties[force_label].icon - end - - rendering.set_text(spot.drawings.force, force_label) - - rendering.set_text(spot.drawings.value, spot.properties.value) - end - end - - if storage.table_of_properties.countdown_in_seconds == 60 then - game.print('The round is in the hot phase, there are still 60 seconds left.') - end - - if storage.table_of_properties.countdown_in_seconds >= 0 then - storage.table_of_properties.countdown_in_seconds = storage.table_of_properties.countdown_in_seconds - 1 - end - - if storage.table_of_properties.countdown_in_seconds < 0 or storage.table_of_properties.force_player_one.available_tickets < 0 or storage.table_of_properties.force_player_two.available_tickets < 0 then - if storage.table_of_properties.force_player_one.available_tickets == storage.table_of_properties.force_player_two.available_tickets then - game.print('The battle is over. The round ended in a draw.') - elseif storage.table_of_properties.force_player_one.available_tickets > storage.table_of_properties.force_player_two.available_tickets then - game.print('The battle is over. Force ' .. storage.table_of_properties.force_player_one.icon .. ' has won the round.') - else - game.print('The battle is over. Force ' .. storage.table_of_properties.force_player_two.icon .. ' has won the round.') - end - - game.forces.force_spectator.set_spawn_position({ x = 0, y = 0 }, game.surfaces.nauvis) - - storage.table_of_spots = {} - - storage.table_of_properties.force_player_one.available_tickets = storage.table_of_properties.amount_of_tickets - - storage.table_of_properties.force_player_two.available_tickets = storage.table_of_properties.amount_of_tickets - - storage.table_of_properties.countdown_in_seconds = 28800 - - storage.table_of_properties.wait_in_seconds = 30 - - storage.table_of_properties.game_stage = 'lobby' - - game.print('You are now in the lobby, please make yourself comfortable, it continues immediately.') - - for _, player in pairs(game.connected_players) do - if player.gui.top['draw_gui_button'] then - player.gui.top['draw_gui_button'].destroy() - end - - if player.gui.top['draw_gui_status'] then - player.gui.top['draw_gui_status'].destroy() - end - - if player.gui.top['draw_gui_spots'] then - player.gui.top['draw_gui_spots'].destroy() - end - - -- if player.gui.left[ 'draw_gui_squad' ] then player.gui.left[ 'draw_gui_squad' ].destroy() end - - -- if player.gui.center[ 'draw_gui_menu' ] then player.gui.center[ 'draw_gui_menu' ].destroy() end - - -- draw_gui_score( player ) - - event_on_click_lobby(player) - end - end - - for _, player in pairs(game.connected_players) do - draw_gui_status(player) - - draw_gui_spots(player) - end - end - - if storage.table_of_properties.game_stage == 'regenerate_facilities' then - table_of_ores = shuffle(table_of_ores) - - local position = game.forces.force_spectator.get_spawn_position(game.surfaces.tank_conquest) - - draw_circle_lobby(game.surfaces.tank_conquest, 28, position) - - local position = game.forces.force_player_one.get_spawn_position(game.surfaces.tank_conquest) - - map_functions.draw_noise_tile_circle({ x = position.x - 50, y = 10 }, 'water', game.surfaces.tank_conquest, math.random(8, 10)) - - local radius, angle, sides = 10, 1, #table_of_ores - - local table_of_positions = draw_a_polygon({ x = position.x - 50, y = 10 }, radius, angle, sides) - - for index = 1, #table_of_positions do - map_functions.draw_smoothed_out_ore_circle(table_of_positions[index + 1], table_of_ores[index], game.surfaces.tank_conquest, 15, 3000) - end - - create_a_base('force_player_one', position) - - local position = game.forces.force_player_two.get_spawn_position(game.surfaces.tank_conquest) - - map_functions.draw_noise_tile_circle({ x = position.x + 50, y = 10 }, 'water', game.surfaces.tank_conquest, math.random(8, 10)) - - local radius, angle, sides = 10, 1, #table_of_ores - - local table_of_positions = draw_a_polygon({ x = position.x + 50, y = 10 }, radius, angle, sides) - - for index = 1, #table_of_positions do - map_functions.draw_smoothed_out_ore_circle(table_of_positions[index + 1], table_of_ores[index], game.surfaces.tank_conquest, 15, 3000) - end - - create_a_base('force_player_two', position) - - local position = { x = 0, y = -500 } - - create_a_point_of_interest(blueprint_poi_laser_json, position) - - local position = { x = 0, y = 500 } - - create_a_point_of_interest(blueprint_poi_fire_json, position) - - local table_of_blueprints = { blueprint_poi_spot_one_json, blueprint_poi_spot_two_json, blueprint_poi_spot_three_json } - - local table_of_names = { 'A', 'B', 'C', 'D', 'E', 'F', 'G' } - - local length_of_names = math.random(3, #table_of_names) - - local position, radius, angle, sides = { x = 0, y = 0 }, math.random(150, 250), math.random(0.1, 6.3), length_of_names - - local table_of_positions = draw_a_polygon(position, radius, angle, sides) - - for index = 1, length_of_names do - create_a_spot(table_of_names[index], table_of_positions[index + 1], table_of_blueprints[math.random(1, #table_of_blueprints)]) - end - - game.print('A new battlefield was created. Make yourself comfortable, but be vigilant.') - - storage.table_of_properties.game_stage = 'ongoing_game' - - for _, player in pairs(game.connected_players) do - -- if player.gui.left[ 'draw_gui_squad' ] then player.gui.left[ 'draw_gui_squad' ].destroy() end - - -- if player.gui.center[ 'draw_gui_score' ] then player.gui.center[ 'draw_gui_score' ].destroy() end - - if player.gui.center['draw_gui_menu'] then - player.gui.center['draw_gui_menu'].destroy() - end - - draw_gui_button(player) - - event_on_click_join(player) - end - end - - if storage.table_of_properties.game_stage == 'preparing_spawn_positions' then - game.forces.force_player_one.set_spawn_position({ x = -500, y = 0 }, game.surfaces.tank_conquest) - - game.forces.force_player_two.set_spawn_position({ x = 500, y = 0 }, game.surfaces.tank_conquest) - - game.forces.force_spectator.set_spawn_position({ x = 0, y = 0 }, game.surfaces.tank_conquest) - - storage.table_of_scores = {} - - for _, player in pairs(game.connected_players) do - if player.character then - player.character.destroy() - - player.character = nil - end - - player.create_character() - end - - storage.table_of_properties.game_stage = 'regenerate_facilities' - end - - if storage.table_of_properties.game_stage == 'check_the_process_of_creating_the_map' then - if game.surfaces.tank_conquest.is_chunk_generated({ x = 0, y = 0 }) then - storage.table_of_properties.game_stage = 'preparing_spawn_positions' - else - game.surfaces.tank_conquest.request_to_generate_chunks({ 0, 0 }, 1) - - game.surfaces.tank_conquest.request_to_generate_chunks({ -500, 0 }, 1) - - game.surfaces.tank_conquest.request_to_generate_chunks({ 500, 0 }, 1) - - game.surfaces.tank_conquest.request_to_generate_chunks({ 0, -500 }, 1) - - game.surfaces.tank_conquest.request_to_generate_chunks({ 0, 500 }, 1) - end - end - - if storage.table_of_properties.game_stage == 'regenerate_battlefield' and storage.table_of_properties.wait_in_seconds == 0 then - initialize_surface() - - game.surfaces.tank_conquest.force_generate_chunk_requests() - - storage.table_of_properties.game_stage = 'check_the_process_of_creating_the_map' - end - - if storage.table_of_properties.game_stage == 'lobby' then - if #game.connected_players >= storage.table_of_properties.required_number_of_players and storage.table_of_properties.wait_in_seconds > 0 then - if storage.table_of_properties.wait_in_seconds % 10 == 0 then - game.print('The round starts in ' .. storage.table_of_properties.wait_in_seconds .. ' seconds.') - end - - storage.table_of_properties.wait_in_seconds = storage.table_of_properties.wait_in_seconds - 1 - end - - if storage.table_of_properties.wait_in_seconds == 0 then - storage.table_of_properties.game_stage = 'regenerate_battlefield' - end - end - end - - if game.tick % 1800 == 0 then - if game.surfaces.tank_conquest ~= nil and #game.connected_players and #storage.table_of_spots then - for _, player in pairs(game.connected_players) do - for _, spot in pairs(storage.table_of_spots) do - if player.force.is_chunk_charted(game.surfaces.tank_conquest, { x = math.floor(spot.properties.position.x / 32), y = math.floor(spot.properties.position.y / 32) }) then - local chart_tags = player.force.find_chart_tags(game.surfaces.tank_conquest, { { spot.properties.position.x - 1, spot.properties.position.y - 1 }, { spot.properties.position.x + 1, spot.properties.position.y + 1 } }) - - if #chart_tags == 0 then - player.force.add_chart_tag(game.surfaces.tank_conquest, { icon = { type = 'virtual', name = 'signal-' .. spot.properties.name }, position = spot.properties.position }) - end - end - end - end - end - end - - if game.tick == 60 then - draw_circle_lobby(game.surfaces.nauvis, 28, { x = 0, y = 0 }) - - for _, player in pairs(game.connected_players) do - if player.character == nil then - player.create_character() - end - end - end -end - -event.add(defines.events.on_tick, on_tick) - -local function on_gui_click(event) - local player = game.players[event.player_index] - - if event.element.valid and event.element.name == 'draw_gui_intro_content' then - player.gui.center['draw_gui_intro_frame'].destroy() - return - end - - if event.element.valid and event.element.name == 'draw_gui_intro_button' then - if player.gui.center['draw_gui_intro_frame'] then - player.gui.center['draw_gui_intro_frame'].destroy() - else - draw_gui_intro_frame(player) - end - end - - if event.element.valid and event.element.name == 'draw_gui_button' then - if player.gui.center['draw_gui_menu'] then - player.gui.center['draw_gui_menu'].destroy() - else - draw_gui_menu(player) - end - end - - if event.element.valid and event.element.name == 'event_on_click_score' then - if player.gui.center['draw_gui_score'] then - player.gui.center['draw_gui_score'].destroy() - else - draw_gui_score(player) - end - end - - if event.element.valid and event.element.name == 'event_on_click_squad' then - if player.gui.left['draw_gui_squad'] then - player.gui.left['draw_gui_squad'].destroy() - else - draw_gui_squad(player) - end - end - - if event.element.valid and event.element.name == 'event_on_click_lobby' then - storage.table_of_delays[player.index] = game.tick - - game.print(player.name .. ' is spectating') - - event_on_click_lobby(player) - - if player.gui.center['draw_gui_menu'] then - player.gui.center['draw_gui_menu'].destroy() - end - end - - if event.element.valid and event.element.name == 'event_on_click_join' then - if game.tick - storage.table_of_delays[player.index] < 3600 then - player.print('Not ready to return. Please wait ' .. 60 - (math.floor((game.tick - storage.table_of_delays[player.index]) / 60)) .. ' seconds.') - else - storage.table_of_delays[player.index] = nil - - event_on_click_join(player) - - if player.gui.center['draw_gui_menu'] then - player.gui.center['draw_gui_menu'].destroy() - end - end - end - - if event.element.valid and event.element.name == 'event_on_click_spawn_1' then - event_on_click_spawn(player) - end -end - -event.add(defines.events.on_gui_click, on_gui_click) - -local function on_console_chat(event) - if not event.message then - return - end - - if not event.player_index then - return - end - - local player = game.players[event.player_index] - - local color = { r = player.color.r * 0.6 + 0.35, g = player.color.g * 0.6 + 0.35, b = player.color.b * 0.6 + 0.35, a = 1 } - - if player.force.name == 'force_player_one' then - game.forces.force_player_two.print(storage.table_of_properties[player.force.name].icon .. ' ' .. player.name .. ': ' .. event.message, color) - - game.forces.force_spectator.print(storage.table_of_properties[player.force.name].icon .. ' ' .. player.name .. ': ' .. event.message, color) - end - - if player.force.name == 'force_player_two' then - game.forces.force_player_one.print(storage.table_of_properties[player.force.name].icon .. ' ' .. player.name .. ': ' .. event.message, color) - - game.forces.force_spectator.print(storage.table_of_properties[player.force.name].icon .. ' ' .. player.name .. ': ' .. event.message, color) - end - - if player.force.name == 'force_spectator' then - game.forces.force_player_one.print('(Spectator) ' .. player.name .. ': ' .. event.message, color) - - game.forces.force_player_two.print('(Spectator) ' .. player.name .. ': ' .. event.message, color) - end -end - -event.add(defines.events.on_console_chat, on_console_chat) - -local function on_chunk_generated(event) - local chunk_position = { x = event.area.left_top.x, y = event.area.left_top.y } - - for x = 0, 31 do - for y = 0, 31 do - local tile_position = { x = chunk_position.x + x, y = chunk_position.y + y } - - if math.random(1, 3000) == 1 and event.surface.can_place_entity({ name = 'wooden-chest', force = 'enemy', position = tile_position }) then - event.surface.create_entity({ name = 'wooden-chest', force = 'enemy', position = tile_position }) - end - end - end -end - -event.add(defines.events.on_chunk_generated, on_chunk_generated) - -local function on_entity_damaged(event) - if storage.table_of_properties.game_stage ~= 'ongoing_game' then - return - end - - if event.entity.name == 'wooden-chest' then - return - end - - if not event.entity.unit_number then - return - end - - if event.final_damage_amount < 1 then - return - end - - if storage.table_of_damages == nil then - storage.table_of_damages = {} - end - - if storage.table_of_damages[event.entity.unit_number] == nil then - storage.table_of_damages[event.entity.unit_number] = { surface = event.entity.surface, position = event.entity.position, damage = 0 } - end - - storage.table_of_damages[event.entity.unit_number].damage = storage.table_of_damages[event.entity.unit_number].damage + event.final_damage_amount -end - -event.add(defines.events.on_entity_damaged, on_entity_damaged) - -local function on_entity_died(event) - if storage.table_of_properties.game_stage ~= 'ongoing_game' then - return - end - - if event.entity.name == 'wooden-chest' and event.entity.force.name == 'enemy' then - local loot = table_of_loots[math.random(1, #table_of_loots)] - - event.entity.surface.spill_item_stack(event.entity.position, loot, true) - - event.entity.surface.create_entity({ name = 'flying-text', position = event.entity.position, text = '+' .. loot.count .. ' ' .. loot.name, color = table_of_colors.white }) - end -end - -event.add(defines.events.on_entity_died, on_entity_died) - -local function on_player_changed_position(event) - if storage.table_of_properties.game_stage ~= 'ongoing_game' then - return - end - - local player = game.players[event.player_index] - - for spot_index, spot_item in pairs(storage.table_of_spots) do - if storage.table_of_spots[spot_index].players[player.index] ~= nil then - storage.table_of_spots[spot_index].players[player.index] = nil - end - - for _, position in pairs(spot_item.positions) do - if math.floor(player.position.x) == position.x and math.floor(player.position.y) == position.y or math.ceil(player.position.x) == position.x and math.ceil(player.position.y) == position.y then - if storage.table_of_spots[spot_index].players[player.index] == nil then - storage.table_of_spots[spot_index].players[player.index] = player - - break - end - end - end - - if storage.table_of_spots[spot_index].players[player.index] ~= nil then - break - end - end -end - -event.add(defines.events.on_player_changed_position, on_player_changed_position) - -local function on_player_respawned(event) - if storage.table_of_properties.game_stage ~= 'ongoing_game' then - return - end - - local player = game.players[event.player_index] - - local surface = player.surface - - if player.gui.center['draw_gui_spawn'] then - player.gui.center['draw_gui_spawn'].destroy() - end - - local position = storage.table_of_spawns[player.index] - - if surface.is_chunk_generated(position) then - player.teleport(surface.find_non_colliding_position('character', position, 3, 0.5), surface) - else - player.teleport(position, surface) - end - - player_icon_add(player) - - create_a_tank(player) -end - -event.add(defines.events.on_player_respawned, on_player_respawned) - -local function on_player_died(event) - if storage.table_of_properties.game_stage ~= 'ongoing_game' then - return - end - - local player = game.players[event.player_index] - - storage.table_of_spawns[player.index] = player.force.get_spawn_position(player.surface) - - local table_of_entities = player.surface.find_entities_filtered({ name = 'character-corpse' }) - - for _, entity in pairs(table_of_entities) do - entity.clear_items_inside() - - entity.destroy() - end - - -- draw_gui_spawn( player ) - - player_icon_remove(player) - - if storage.table_of_tanks[player.index] ~= nil and storage.table_of_tanks[player.index].valid then - storage.table_of_tanks[player.index].clear_items_inside() - - storage.table_of_tanks[player.index].destroy() - end - - storage.table_of_tanks[player.index] = nil - - local force = storage.table_of_properties[player.force.name] - - if force ~= nil and force.available_tickets > 0 then - force.available_tickets = force.available_tickets - 1 - end - - for _, spot in pairs(storage.table_of_spots) do - if spot.players[player.index] ~= nil then - spot.players[player.index] = nil - end - end - - local player_death_message = storage.table_of_properties[player.force.name].icon .. ' ' .. player.name .. ' was killed.' - - if event.cause and event.cause.valid then - if event.cause.name == 'character' then - player_death_message = storage.table_of_properties[player.force.name].icon .. ' ' .. player.name .. ' was killed by ' .. storage.table_of_properties[event.cause.player.force.name].icon .. ' ' .. event.cause.player.name .. '.' - elseif event.cause.name == 'car' or event.cause.name == 'tank' or event.cause.name == 'train' then - local driver = event.cause.get_driver() - - if driver.player then - player_death_message = storage.table_of_properties[player.force.name].icon .. ' ' .. player.name .. ' was killed with a vehicle by ' .. storage.table_of_properties[driver.player.force.name].icon .. ' ' .. driver.player.name .. '.' - else - player_death_message = storage.table_of_properties[player.force.name].icon .. ' ' .. player.name .. ' was killed by run over.' - end - elseif event.cause.name then - player_death_message = storage.table_of_properties[player.force.name].icon .. ' ' .. player.name .. ' was killed by ' .. event.cause.name .. '.' - end - end - - for _, p in pairs(game.connected_players) do - if p.force.name ~= player.force.name and p.name ~= event.cause.player.name and p.name ~= driver.player.name then - p.print(player_death_message, table_of_colors.damage) - end - end -end - -event.add(defines.events.on_player_died, on_player_died) - -local function on_player_left_game(event) - if storage.table_of_properties.game_stage ~= 'ongoing_game' then - return - end - - local player = game.players[event.player_index] - - player_icon_remove(player) - - if storage.table_of_tanks[player.index] ~= nil and storage.table_of_tanks[player.index].valid then - storage.table_of_tanks[player.index].clear_items_inside() - - storage.table_of_tanks[player.index].destroy() - end - - storage.table_of_tanks[player.index] = nil - - storage.table_of_spawns[player.index] = nil - - for _, spot in pairs(storage.table_of_spots) do - if spot.players[player.index] ~= nil then - spot.players[player.index] = nil - end - end -end - -event.add(defines.events.on_player_left_game, on_player_left_game) - -local function on_player_joined_game(event) - local surface = game.surfaces.nauvis - - local player = game.players[event.player_index] - - player.force = game.forces.force_spectator - - draw_gui_intro_button(player) - - if player.online_time == 0 then - draw_gui_intro_frame(player) - - local position = player.force.get_spawn_position(surface) - - if surface.is_chunk_generated(position) then - player.teleport(surface.find_non_colliding_position('character', position, 3, 0.5), surface) - else - player.teleport(position, surface) - end - - player.character.destructible = false - - game.permissions.get_group('permission_spectator').add_player(player) - elseif player.surface.name == 'tank_conquest' then - player.character.clear_items_inside() - - draw_gui_button(player) - - event_on_click_join(player) - end - - if player.online_time == 0 and storage.table_of_properties.game_stage == 'ongoing_game' then - draw_gui_button(player) - - draw_gui_menu(player) - end - - for index, slot in pairs(table_of_slots) do - player.set_quick_bar_slot(index, slot) - end -end - -event.add(defines.events.on_player_joined_game, on_player_joined_game) - -function player_icon_add(player) - if storage.table_of_drawings[player.index] == nil then - -- local icon = rendering.draw_circle( { target = player.character, target_offset = { x = 0, y = - 3.7 }, force = game.forces.force_player_one, surface = player.surface, color = table_of_colors.team, radius = 0.3, filled = true, only_in_alt_mode = false } ) - - -- local color = { r = player.color.r * 0.6 + 0.35, g = player.color.g * 0.6 + 0.35, b = player.color.b * 0.6 + 0.35, a = 1 } - - local icon = - rendering.draw_text( - { - text = storage.table_of_properties[player.force.name].icon, - target = - { - entity = player.character, - offset = { 0, -3.7 }, - }, - surface = player.surface, - color = table_of_colors.white, - scale = 2, - alignment = 'center' - } - ) - - storage.table_of_drawings[player.index] = icon - end -end - -function player_icon_change(player) - if storage.table_of_drawings[player.index] ~= nil then - local icon = storage.table_of_drawings[player.index] - end -end - -function player_icon_remove(player) - if storage.table_of_drawings[player.index] ~= nil then - rendering.destroy(storage.table_of_drawings[player.index]) - - storage.table_of_drawings[player.index] = nil - end -end diff --git a/maps/territorial_control.lua b/maps/territorial_control.lua index 8047192ac..9fdde391a 100644 --- a/maps/territorial_control.lua +++ b/maps/territorial_control.lua @@ -1,7 +1,10 @@ --luacheck: ignore -- territorial control by Gerkiz -local Map = require 'modules.map_info' +if script.active_mods['space-age'] then + error('This map is incompatible with the Space Age mod. Disable Space Age to run this map.', 2) +end + require 'modules.fish_respawner' storage.fish_respawner_water_tiles_per_fish = 16 @@ -14,15 +17,14 @@ require 'modules.rocks_broken_paint_tiles' require 'modules.rocks_yield_ore' require 'modules.biters_yield_coins' require 'modules.mineable_wreckage_yields_scrap' - -local shapes = require 'utils.tools.shapes' +local Map = require 'modules.map_info' +local Shapes = require 'utils.tools.shapes' local Event = require 'utils.event' -local unearthing_worm = require 'utils.functions.unearthing_worm' -local unearthing_biters = require 'utils.functions.unearthing_biters' -local tick_tack_trap = require 'utils.functions.tick_tack_trap' -local map_functions = require 'utils.tools.map_functions' -local simplex_noise = require 'utils.math.simplex_noise' -simplex_noise = simplex_noise.d2 +local UnearthingWorm = require 'utils.functions.unearthing_worm' +local UnearthingBiter = require 'utils.functions.unearthing_biters' +local TickTackTrap = require 'utils.functions.tick_tack_trap' +local MapFunctions = require 'utils.tools.map_functions' +local SimplexNoise = require 'utils.math.simplex_noise'.d2 local math_random = math.random local insert = table.insert @@ -37,7 +39,8 @@ local function shuffle(tbl) return tbl end -local worm_raffle_table = { +local worm_raffle_table = +{ [1] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret' }, [2] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret' }, [3] = { 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'small-worm-turret', 'medium-worm-turret', 'medium-worm-turret' }, @@ -50,7 +53,8 @@ local worm_raffle_table = { [10] = { 'medium-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret', 'big-worm-turret' } } -local biters_in_the_void = { +local biters_in_the_void = +{ [1] = { 'small-biter', 'small-biter', 'small-biter', 'small-biter', 'small-spitter', 'small-spitter' }, [2] = { 'small-biter', 'small-biter', 'small-biter', 'small-spitter', 'small-spitter', 'medium-biter' }, [3] = { 'small-biter', 'small-biter', 'small-biter', 'small-biter', 'medium-biter', 'medium-spitter' }, @@ -73,7 +77,8 @@ local biters_in_the_void = { [20] = { 'behemoth-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-biter', 'behemoth-spitter', 'behemoth-spitter' } } -local ore_spawn_raffle = { +local ore_spawn_raffle = +{ 'iron-ore', 'iron-ore', 'iron-ore', @@ -104,20 +109,14 @@ local ore_spawn_raffle = { } local rock_raffle = { 'big-sand-rock', 'big-sand-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'big-rock', 'huge-rock' } -local rock_raffle_valid = { - ['big-sand-rock'] = true, +local rock_raffle_valid = +{ ['big-sand-rock'] = true, ['big-rock'] = true, - ['big-rock'] = true, - ['big-rock'] = true, - ['big-rock'] = true, - ['big-rock'] = true, - ['big-rock'] = true, - ['big-rock'] = true, - ['big-rock'] = true, ['huge-rock'] = true } -local tree_raffle = { +local tree_raffle = +{ 'tree-02-red', 'tree-09-red', 'tree-02-red', @@ -132,46 +131,47 @@ local tree_raffle = { } local function secret_shop(pos, surface) - local secret_market_items = { - { price = { { 'coin', math_random(75, 125) } }, offer = { type = 'give-item', item = 'combat-shotgun' } }, - { price = { { 'coin', math_random(40, 60) } }, offer = { type = 'give-item', item = 'rocket-launcher' } }, - { price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, - { price = { { 'coin', math_random(3, 6) } }, offer = { type = 'give-item', item = 'uranium-rounds-magazine' } }, - { price = { { 'coin', math_random(1, 4) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } }, - { price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'rocket' } }, - { price = { { 'coin', math_random(2, 3) } }, offer = { type = 'give-item', item = 'explosive-rocket' } }, - { price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'explosive-cannon-shell' } }, - { price = { { 'coin', math_random(3, 6) } }, offer = { type = 'give-item', item = 'explosive-uranium-cannon-shell' } }, - { price = { { 'coin', math_random(4, 8) } }, offer = { type = 'give-item', item = 'cluster-grenade' } }, - { price = { { 'coin', math_random(1, 2) } }, offer = { type = 'give-item', item = 'land-mine' } }, - { price = { { 'coin', math_random(25, 50) } }, offer = { type = 'give-item', item = 'heavy-armor' } }, - { price = { { 'coin', math_random(125, 250) } }, offer = { type = 'give-item', item = 'modular-armor' } }, - { price = { { 'coin', math_random(300, 600) } }, offer = { type = 'give-item', item = 'power-armor' } }, - { price = { { 'coin', math_random(300, 600) } }, offer = { type = 'give-item', item = 'fusion-reactor-equipment' } }, - { price = { { 'coin', math_random(20, 40) } }, offer = { type = 'give-item', item = 'battery-equipment' } }, - { price = { { 'coin', math_random(100, 150) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } }, - { price = { { 'coin', math_random(40, 80) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } }, - { price = { { 'coin', math_random(60, 120) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } }, - { price = { { 'coin', math_random(60, 120) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } }, - { price = { { 'coin', math_random(3, 9) } }, offer = { type = 'give-item', item = 'construction-robot' } }, - { price = { { 'coin', math_random(100, 200) } }, offer = { type = 'give-item', item = 'energy-shield-equipment' } }, - { price = { { 'coin', math_random(200, 400) } }, offer = { type = 'give-item', item = 'personal-laser-defense-equipment' } }, - { price = { { 'coin', math_random(30, 60) } }, offer = { type = 'give-item', item = 'loader' } }, - { price = { { 'coin', math_random(50, 80) } }, offer = { type = 'give-item', item = 'fast-loader' } }, - { price = { { 'coin', math_random(70, 100) } }, offer = { type = 'give-item', item = 'express-loader' } }, - { price = { { 'coin', math_random(30, 60) } }, offer = { type = 'give-item', item = 'locomotive' } }, - { price = { { 'coin', math_random(15, 35) } }, offer = { type = 'give-item', item = 'cargo-wagon' } }, - { price = { { 'coin', math_random(1, 4) } }, offer = { type = 'give-item', item = 'grenade' } }, - { price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'rail', count = 4 } }, - { price = { { 'coin', 5 } }, offer = { type = 'give-item', item = 'train-stop' } }, - { price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'small-lamp' } }, - { price = { { 'coin', 2 } }, offer = { type = 'give-item', item = 'firearm-magazine' } }, - { price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'wood', count = math_random(25, 75) } }, - { price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'iron-ore', count = math_random(25, 75) } }, - { price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'copper-ore', count = math_random(25, 75) } }, - { price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'stone', count = math_random(25, 75) } }, - { price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'coal', count = math_random(25, 75) } }, - { price = { { 'coin', 1 } }, offer = { type = 'give-item', item = 'uranium-ore', count = math_random(25, 75) } } + local secret_market_items = + { + { price = { { name = 'coin', count = math_random(75, 125) } }, offer = { type = 'give-item', item = 'combat-shotgun' } }, + { price = { { name = 'coin', count = math_random(40, 60) } }, offer = { type = 'give-item', item = 'rocket-launcher' } }, + { price = { { name = 'coin', count = math_random(1, 2) } }, offer = { type = 'give-item', item = 'piercing-rounds-magazine' } }, + { price = { { name = 'coin', count = math_random(3, 6) } }, offer = { type = 'give-item', item = 'uranium-rounds-magazine' } }, + { price = { { name = 'coin', count = math_random(1, 4) } }, offer = { type = 'give-item', item = 'piercing-shotgun-shell' } }, + { price = { { name = 'coin', count = math_random(1, 2) } }, offer = { type = 'give-item', item = 'rocket' } }, + { price = { { name = 'coin', count = math_random(2, 3) } }, offer = { type = 'give-item', item = 'explosive-rocket' } }, + { price = { { name = 'coin', count = math_random(1, 2) } }, offer = { type = 'give-item', item = 'explosive-cannon-shell' } }, + { price = { { name = 'coin', count = math_random(3, 6) } }, offer = { type = 'give-item', item = 'explosive-uranium-cannon-shell' } }, + { price = { { name = 'coin', count = math_random(4, 8) } }, offer = { type = 'give-item', item = 'cluster-grenade' } }, + { price = { { name = 'coin', count = math_random(1, 2) } }, offer = { type = 'give-item', item = 'land-mine' } }, + { price = { { name = 'coin', count = math_random(25, 50) } }, offer = { type = 'give-item', item = 'heavy-armor' } }, + { price = { { name = 'coin', count = math_random(125, 250) } }, offer = { type = 'give-item', item = 'modular-armor' } }, + { price = { { name = 'coin', count = math_random(300, 600) } }, offer = { type = 'give-item', item = 'power-armor' } }, + { price = { { name = 'coin', count = math_random(300, 600) } }, offer = { type = 'give-item', item = 'fusion-reactor-equipment' } }, + { price = { { name = 'coin', count = math_random(20, 40) } }, offer = { type = 'give-item', item = 'battery-equipment' } }, + { price = { { name = 'coin', count = math_random(100, 150) } }, offer = { type = 'give-item', item = 'belt-immunity-equipment' } }, + { price = { { name = 'coin', count = math_random(40, 80) } }, offer = { type = 'give-item', item = 'night-vision-equipment' } }, + { price = { { name = 'coin', count = math_random(60, 120) } }, offer = { type = 'give-item', item = 'exoskeleton-equipment' } }, + { price = { { name = 'coin', count = math_random(60, 120) } }, offer = { type = 'give-item', item = 'personal-roboport-equipment' } }, + { price = { { name = 'coin', count = math_random(3, 9) } }, offer = { type = 'give-item', item = 'construction-robot' } }, + { price = { { name = 'coin', count = math_random(100, 200) } }, offer = { type = 'give-item', item = 'energy-shield-equipment' } }, + { price = { { name = 'coin', count = math_random(200, 400) } }, offer = { type = 'give-item', item = 'personal-laser-defense-equipment' } }, + { price = { { name = 'coin', count = math_random(30, 60) } }, offer = { type = 'give-item', item = 'loader' } }, + { price = { { name = 'coin', count = math_random(50, 80) } }, offer = { type = 'give-item', item = 'fast-loader' } }, + { price = { { name = 'coin', count = math_random(70, 100) } }, offer = { type = 'give-item', item = 'express-loader' } }, + { price = { { name = 'coin', count = math_random(30, 60) } }, offer = { type = 'give-item', item = 'locomotive' } }, + { price = { { name = 'coin', count = math_random(15, 35) } }, offer = { type = 'give-item', item = 'cargo-wagon' } }, + { price = { { name = 'coin', count = math_random(1, 4) } }, offer = { type = 'give-item', item = 'grenade' } }, + { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'rail', count = 4 } }, + { price = { { name = 'coin', count = 5 } }, offer = { type = 'give-item', item = 'train-stop' } }, + { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'small-lamp' } }, + { price = { { name = 'coin', count = 2 } }, offer = { type = 'give-item', item = 'firearm-magazine' } }, + { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'wood', count = math_random(25, 75) } }, + { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'iron-ore', count = math_random(25, 75) } }, + { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'copper-ore', count = math_random(25, 75) } }, + { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'stone', count = math_random(25, 75) } }, + { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'coal', count = math_random(25, 75) } }, + { price = { { name = 'coin', count = 1 } }, offer = { type = 'give-item', item = 'uranium-ore', count = math_random(25, 75) } } } secret_market_items = shuffle(secret_market_items) local market = surface.create_entity { name = 'market', position = pos } @@ -183,7 +183,7 @@ local function secret_shop(pos, surface) end local function spawn_biter(surface, position) - local e = math.ceil(game.forces.enemy.evolution_factor * 20) + local e = math.ceil(game.forces.enemy.get_evolution_factor('territorial_control') * 20) if e < 1 then e = 1 end @@ -203,27 +203,27 @@ local function get_noise(name, pos) local noise = {} local noise_seed_add = 25000 if name == 'water' then - noise[1] = simplex_noise(pos.x * 0.02, pos.y * 0.02, seed) + noise[1] = SimplexNoise(pos.x * 0.02, pos.y * 0.02, seed) seed = seed + noise_seed_add - noise[2] = simplex_noise(pos.x * 0.1, pos.y * 0.1, seed) + noise[2] = SimplexNoise(pos.x * 0.1, pos.y * 0.1, seed) local value = noise[1] + noise[2] * 0.2 return value end seed = seed + noise_seed_add if name == 'dirt' then - noise[1] = simplex_noise(pos.x * 0.08, pos.y * 0.08, seed) + noise[1] = SimplexNoise(pos.x * 0.08, pos.y * 0.08, seed) local value = noise[1] return value end seed = seed + noise_seed_add if name == 'trees' then - noise[1] = simplex_noise(pos.x * 0.045, pos.y * 0.045, seed) + noise[1] = SimplexNoise(pos.x * 0.045, pos.y * 0.045, seed) local value = noise[1] return value end seed = seed + noise_seed_add if name == 'spawners' then - noise[1] = simplex_noise(pos.x * 0.02, pos.y * 0.02, seed) + noise[1] = SimplexNoise(pos.x * 0.02, pos.y * 0.02, seed) local value = noise[1] return value end @@ -239,7 +239,7 @@ local function get_entity(position) entity_name = rock_raffle[math_random(1, #rock_raffle)] if math_random(1, 128) == 1 then if position.x > 32 or position.x < -32 or position.y > 32 or position.y < -32 then - local e = math.ceil(game.forces.enemy.evolution_factor * 10) + local e = math.ceil(game.forces.enemy.get_evolution_factor('territorial_control') * 10) if e < 1 then e = 1 end @@ -252,7 +252,7 @@ local function get_entity(position) if math_random(1, 128) == 1 then if position.x > 32 or position.x < -32 or position.y > 32 or position.y < -32 then - local e = math.ceil(game.forces.enemy.evolution_factor * 10) + local e = math.ceil(game.forces.enemy.get_evolution_factor('territorial_control') * 10) if e < 1 then e = 1 end @@ -308,7 +308,7 @@ local function get_noise_tile(position) end local function uncover_map(surface, position, radius_min, radius_max) - local circles = shapes.circles + local circles = Shapes.circles local tiles = {} local fishes = {} for r = radius_min, radius_max, 1 do @@ -355,7 +355,7 @@ end local function uncover_map_for_player(player) local position = player.position local surface = player.surface - local circles = shapes.circles + local circles = Shapes.circles local tiles = {} local fishes = {} local uncover_map_schedule = {} @@ -415,7 +415,8 @@ local function on_player_joined_game(event) local map_gen_settings = {} map_gen_settings.water = 'small' map_gen_settings.cliff_settings = { cliff_elevation_interval = 22, cliff_elevation_0 = 22 } - map_gen_settings.autoplace_controls = { + map_gen_settings.autoplace_controls = + { ['coal'] = { frequency = 'none', size = 'none', richness = 'none' }, ['stone'] = { frequency = 'none', size = 'none', richness = 'none' }, ['copper-ore'] = { frequency = 'none', size = 'none', richness = 'none' }, @@ -539,7 +540,7 @@ local function on_chunk_generated(event) for y = 0, 31, 1 do local tile_to_insert = 'out-of-map' local pos = { x = position_left_top.x + x, y = position_left_top.y + y } - local tile_name = surface.get_tile(pos).name + local tile_name = surface.get_tile(pos.x, pos.y).name if tile_name ~= 'stone-path' then insert(tiles, { name = tile_to_insert, position = pos }) end @@ -556,13 +557,13 @@ local function on_player_mined_entity(event) if rock_raffle_valid[entity.name] then if math_random(1, 40) == 1 then - unearthing_biters(entity.surface, entity.position, math_random(4, 12)) + UnearthingBiter(entity.surface, entity.position, math_random(4, 12)) end if math_random(1, 80) == 1 then - unearthing_worm(entity.surface, entity.position) + UnearthingWorm(entity.surface, entity.position) end if math_random(1, 160) == 1 then - tick_tack_trap(entity.surface, entity.position) + TickTackTrap(entity.surface, entity.position) end end @@ -582,9 +583,9 @@ local function on_player_mined_entity(event) return end if math_random(1, 3) ~= 1 then - unearthing_biters(entity.surface, positions[i], math_random(5, 10)) + UnearthingBiter(entity.surface, positions[i], math_random(5, 10)) else - unearthing_worm(entity.surface, positions[i]) + UnearthingWorm(entity.surface, positions[i]) end end end @@ -596,12 +597,12 @@ local function on_entity_died(event) if math_random(1, 2) ~= 1 then local name = ore_spawn_raffle[math.random(1, #ore_spawn_raffle)] local pos = { x = event.entity.position.x, y = event.entity.position.y } - local amount_modifier = math.ceil(1 + game.forces.enemy.evolution_factor * 10) - local size_modifier = math.floor(game.forces.enemy.evolution_factor * 4) + local amount_modifier = math.ceil(1 + game.forces.enemy.get_evolution_factor('territorial_control') * 10) + local size_modifier = math.floor(game.forces.enemy.get_evolution_factor('territorial_control') * 4) if name == 'crude-oil' then - map_functions.draw_oil_circle(pos, name, surface, 4, math.ceil(100000 * amount_modifier)) + MapFunctions.draw_oil_circle(pos, name, surface, 4, math.ceil(100000 * amount_modifier)) else - map_functions.draw_smoothed_out_ore_circle(pos, name, surface, 6 + size_modifier, math.ceil(500 * amount_modifier)) + MapFunctions.draw_smoothed_out_ore_circle(pos, name, surface, 6 + size_modifier, math.ceil(500 * amount_modifier)) end end end @@ -614,7 +615,8 @@ local function on_entity_died(event) on_player_mined_entity(event) end -local disabled_for_deconstruction = { +local disabled_for_deconstruction = +{ ['fish'] = true, ['huge-rock'] = true, ['big-rock'] = true, diff --git a/maps/tetris/bricks.lua b/maps/tetris/bricks.lua deleted file mode 100644 index e25b61ee0..000000000 --- a/maps/tetris/bricks.lua +++ /dev/null @@ -1,137 +0,0 @@ -local bricks = { - [1] = { - entity_name = 'express-transport-belt', - entity_type = 'transport-belt', - spawn_y_modifier = 1, - vectors = { - [1] = {{0, 0}, {1, 0}, {-1, 0}, {-2, 0}}, --oooo - [2] = {{0, 0}, {0, -1}, {0, 1}, {0, 2}}, - [3] = {{0, 0}, {-1, 0}, {1, 0}, {2, 0}}, - [4] = {{0, 0}, {0, 1}, {0, -1}, {0, -2}} - } - }, - [2] = { - entity_name = 'wooden-chest', - spawn_y_modifier = 1, - vectors = { - [1] = {{0, 0}, {1, 0}, {0, 1}, {1, 1}}, --oo - [2] = {{0, 0}, {1, 0}, {0, 1}, {1, 1}}, --oo - [3] = {{0, 0}, {1, 0}, {0, 1}, {1, 1}}, - [4] = {{0, 0}, {1, 0}, {0, 1}, {1, 1}} - } - }, - [3] = { - entity_name = 'transport-belt', - entity_type = 'transport-belt', - spawn_y_modifier = 2, - vectors = { - [1] = {{0, 0}, {0, -1}, {1, -1}, {-1, 0}}, -- oo - [2] = {{0, 0}, {1, 0}, {1, 1}, {0, -1}}, --oo - [3] = {{0, 0}, {0, -1}, {1, -1}, {-1, 0}}, - [4] = {{0, 0}, {1, 0}, {1, 1}, {0, -1}} - } - }, - [4] = { - entity_name = 'fast-transport-belt', - entity_type = 'transport-belt', - spawn_y_modifier = 2, - vectors = { - [1] = {{0, 0}, {0, -1}, {-1, -1}, {1, 0}}, --oo - [2] = {{0, 0}, {0, 1}, {1, 0}, {1, -1}}, -- oo - [3] = {{0, 0}, {0, -1}, {-1, -1}, {1, 0}}, - [4] = {{0, 0}, {0, 1}, {1, 0}, {1, -1}} - } - }, - [5] = { - entity_name = 'pipe', - spawn_y_modifier = 2, - vectors = { - [1] = {{0, 0}, {-1, 0}, {-1, 1}, {1, 0}}, --ooo - [2] = {{0, 0}, {0, 1}, {0, -1}, {-1, -1}}, --o - [3] = {{0, 0}, {-1, 0}, {1, 0}, {1, -1}}, - [4] = {{0, 0}, {0, -1}, {1, 1}, {0, 1}} - } - }, - [6] = { - entity_name = 'pipe', - spawn_y_modifier = 2, - vectors = { - [1] = {{0, 0}, {-1, 0}, {1, 1}, {1, 0}}, --ooo - [2] = {{0, 0}, {0, 1}, {0, -1}, {-1, 1}}, --o - [3] = {{0, 0}, {-1, 0}, {1, 0}, {-1, -1}}, - [4] = {{0, 0}, {0, -1}, {1, -1}, {0, 1}} - } - }, - [7] = { - entity_name = 'iron-chest', - spawn_y_modifier = 2, - vectors = { - [1] = {{0, 0}, {-1, 0}, {1, 0}, {0, 1}}, --ooo - [2] = {{0, 0}, {-1, 0}, {0, -1}, {0, 1}}, -- o - [3] = {{0, 0}, {-1, 0}, {1, 0}, {0, -1}}, - [4] = {{0, 0}, {1, 0}, {0, -1}, {0, 1}} - } - }, - [8] = { - entity_name = 'pipe', - spawn_y_modifier = 2, - vectors = { - [1] = {{0, 0}, {-1, 0}, {1, 0}, {0, 1}, {0, -1}}, -- o - [2] = {{0, 0}, {-1, 0}, {1, 0}, {0, 1}, {0, -1}}, --ooo - [3] = {{0, 0}, {-1, 0}, {1, 0}, {0, 1}, {0, -1}}, -- o - [4] = {{0, 0}, {-1, 0}, {1, 0}, {0, 1}, {0, -1}} - } - }, - [9] = { - entity_name = 'logistic-chest-active-provider', - spawn_y_modifier = 2, - vectors = { - [1] = {{0, 0}, {-1, 0}, {1, 0}, {-1, -1}, {1, 1}, {-1, 1}, {1, -1}}, --o o - [2] = {{0, 0}, {0, -1}, {0, 1}, {-1, -1}, {1, 1}, {-1, 1}, {1, -1}}, --ooo - [3] = {{0, 0}, {-1, 0}, {1, 0}, {-1, -1}, {1, 1}, {-1, 1}, {1, -1}}, --o o - [4] = {{0, 0}, {0, -1}, {0, 1}, {-1, -1}, {1, 1}, {-1, 1}, {1, -1}} - } - }, - [10] = { - entity_name = 'logistic-chest-requester', - spawn_y_modifier = 3, - vectors = { - [1] = {{0, 0}, {-1, 0}, {1, 0}, {0, 1}, {0, -1}, {-2, 0}, {2, 0}, {0, -2}, {0, 2}, {-1, -1}, {1, 1}, {-1, 1}, {1, -1}}, -- o - [2] = {{0, 0}, {-1, 0}, {1, 0}, {0, 1}, {0, -1}, {-2, 0}, {2, 0}, {0, -2}, {0, 2}, {-1, -1}, {1, 1}, {-1, 1}, {1, -1}}, -- ooo - [3] = {{0, 0}, {-1, 0}, {1, 0}, {0, 1}, {0, -1}, {-2, 0}, {2, 0}, {0, -2}, {0, 2}, {-1, -1}, {1, 1}, {-1, 1}, {1, -1}}, -- ooooo - [4] = {{0, 0}, {-1, 0}, {1, 0}, {0, 1}, {0, -1}, {-2, 0}, {2, 0}, {0, -2}, {0, 2}, {-1, -1}, {1, 1}, {-1, 1}, {1, -1}} -- ooo - } -- o - }, - [11] = { - entity_name = 'logistic-chest-buffer', - spawn_y_modifier = 1, - vectors = { - [1] = {{0, 0}}, -- o - [2] = {{0, 0}}, - [3] = {{0, 0}}, - [4] = {{0, 0}} - } - }, - [12] = { - entity_name = 'logistic-chest-passive-provider', - spawn_y_modifier = 1, - vectors = { - [1] = {{0, 0}, {1, 0}}, -- oo - [2] = {{0, 0}, {0, 1}}, - [3] = {{0, 0}, {-1, 0}}, - [4] = {{0, 0}, {0, -1}} - } - }, - [13] = { - entity_name = 'logistic-chest-storage', - spawn_y_modifier = 1, - vectors = { - [1] = {{0, 0}, {1, 0}, {0, 1}}, -- oo - [2] = {{0, 0}, {-1, 0}, {0, 1}}, -- o - [3] = {{0, 0}, {-1, 0}, {0, -1}}, - [4] = {{0, 0}, {1, 0}, {0, -1}} - } - } -} - -return bricks diff --git a/maps/tetris/main.lua b/maps/tetris/main.lua deleted file mode 100644 index c83b40e28..000000000 --- a/maps/tetris/main.lua +++ /dev/null @@ -1,515 +0,0 @@ ---luacheck: ignore ---tetris by mewmew - ---18x10 gb - -local event = require 'utils.event' -local bricks = require 'maps.tetris.bricks' -local connect_belts = require 'utils.functions.connect_belts' - -local playfield_left_top = { x = -17, y = -18 } -local playfield_width = 12 -local playfield_height = 24 - -local playfield_area = { - ['left_top'] = { x = playfield_left_top.x, y = playfield_left_top.y }, - ['right_bottom'] = { x = playfield_left_top.x + playfield_width, y = playfield_left_top.y + playfield_height } -} -local playfield_width = math.abs(playfield_area.left_top.x - playfield_area.right_bottom.x) -local playfield_height = math.abs(playfield_area.left_top.y - playfield_area.right_bottom.y) - -local move_translations = { - ['iron-plate'] = { -1, 0 }, - ['copper-plate'] = { 1, 0 } -} - -local function coord_string(x, y) - str = tostring(x) .. '_' - str = str .. tostring(y) - return str -end - -local function draw_active_bricks(surface) - if not storage.active_brick then - return - end - if not storage.active_brick.entities then - storage.active_brick.entities = {} - end - for k, e in pairs(storage.active_brick.entities) do - if e.valid then - storage.tetris_active_grid[coord_string(math.floor(e.position.x), math.floor(e.position.y))] = false - end - storage.active_brick.entities[k] = nil - e.destroy() - end - - for _, p in pairs(storage.active_brick.positions) do - local e = surface.create_entity({ name = storage.active_brick.entity_name, position = p, create_build_effect_smoke = false }) - --if bricks[storage.active_brick.type].fluid then - -- e.fluidbox[1] = {name = bricks[storage.active_brick.type].fluid, amount = 100} - --end - storage.tetris_active_grid[coord_string(math.floor(e.position.x), math.floor(e.position.y))] = true - storage.active_brick.entities[#storage.active_brick.entities + 1] = e - end - - if storage.active_brick.entity_type == 'transport-belt' then - connect_belts(storage.active_brick.entities) - end -end - -local function set_collision_grid(surface) - for x = 0, playfield_width - 1, 1 do - for y = 0, playfield_height - 1, 1 do - local position = { x = playfield_area.left_top.x + x, y = playfield_area.left_top.y + y } - storage.tetris_grid[coord_string(math.floor(position.x), math.floor(position.y))] = true - end - end - local entities = surface.find_entities_filtered({ area = playfield_area, force = 'enemy' }) - for _, e in pairs(entities) do - if not storage.tetris_active_grid[coord_string(math.floor(e.position.x), math.floor(e.position.y))] then - storage.tetris_grid[coord_string(math.floor(e.position.x), math.floor(e.position.y))] = false - else - --game.print(e.position) - end - end -end - -local function rotate_brick(surface) - if not storage.active_brick then - return - end - local center_pos = storage.active_brick.positions[1] - local vectors = bricks[storage.active_brick.type].vectors - local new_direction = storage.active_brick.direction + 1 - if new_direction > 4 then - new_direction = 1 - end - local new_vectors = vectors[new_direction] - for k, p in pairs(storage.active_brick.positions) do - if not storage.tetris_grid[coord_string(math.floor(center_pos.x + new_vectors[k][1]), math.floor(center_pos.y + new_vectors[k][2]))] then - return - end - end - for k, p in pairs(storage.active_brick.positions) do - storage.active_brick.positions[k] = { x = center_pos.x + new_vectors[k][1], y = center_pos.y + new_vectors[k][2] } - end - storage.active_brick.direction = new_direction -end - -local function set_hotbar() - for _, player in pairs(game.connected_players) do - player.set_quick_bar_slot(1, 'iron-plate') - player.set_quick_bar_slot(2, 'copper-plate') - player.set_quick_bar_slot(9, 'iron-gear-wheel') - player.set_quick_bar_slot(10, 'processing-unit') - end -end - -local function set_inventory() - for _, player in pairs(game.connected_players) do - for _, item in pairs({ 'iron-plate', 'copper-plate', 'iron-gear-wheel', 'processing-unit' }) do - if player.get_main_inventory().get_item_count(item) == 0 then - player.insert({ name = item, count = 1 }) - end - end - end -end - -local function draw_playfield(surface) - for x = -1, playfield_width, 1 do - for y = -1, playfield_height, 1 do - local position = { x = playfield_area.left_top.x + x, y = playfield_area.left_top.y + y } - --surface.set_tiles({{name = "deepwater", position = position}}) - end - end - for x = 0, playfield_width - 1, 1 do - for y = 0, playfield_height - 1, 1 do - local position = { x = playfield_area.left_top.x + x, y = playfield_area.left_top.y + y } - storage.tetris_grid[coord_string(math.floor(position.x), math.floor(position.y))] = true - surface.set_tiles({ { name = 'tutorial-grid', position = position } }) - end - end -end - -local function draw_score(surface) - local score = 'Score: ' .. storage.score - local high_score = 'Highscore: ' .. storage.high_score - local level = 'Level: ' .. storage.level - local cleared_lines = 'Lines: ' .. storage.cleared_lines - - if not storage.tetris_score_rendering then - storage.tetris_score_rendering = {} - rendering.draw_text { - text = '#######################', - surface = surface, - target = { playfield_area.right_bottom.x + 1, playfield_area.left_top.y + 0.5 }, - color = { r = 0.2, g = 0.0, b = 0.5 }, - scale = 1, - font = 'heading-1', - --alignment = "center", - scale_with_zoom = false - } - storage.tetris_score_rendering.score = - rendering.draw_text { - text = score, - surface = surface, - target = { playfield_area.right_bottom.x + 1, playfield_area.left_top.y + 1 }, - color = { r = 0.98, g = 0.66, b = 0.22 }, - scale = 2, - font = 'heading-1', - --alignment = "center", - scale_with_zoom = false - } - rendering.draw_text { - text = '#######################', - surface = surface, - target = { playfield_area.right_bottom.x + 1, playfield_area.left_top.y + 2.5 }, - color = { r = 0.2, g = 0.0, b = 0.5 }, - scale = 1, - font = 'heading-1', - --alignment = "center", - scale_with_zoom = false - } - storage.tetris_score_rendering.high_score = - rendering.draw_text { - text = high_score, - surface = surface, - target = { playfield_area.right_bottom.x + 1, playfield_area.left_top.y + 3.3 }, - color = { r = 0.98, g = 0.66, b = 0.22 }, - scale = 1.15, - font = 'heading-1', - --alignment = "center", - scale_with_zoom = false - } - storage.tetris_score_rendering.level = - rendering.draw_text { - text = level, - surface = surface, - target = { playfield_area.right_bottom.x + 1, playfield_area.left_top.y + 4.3 }, - color = { r = 0.98, g = 0.66, b = 0.22 }, - scale = 1.15, - font = 'heading-1', - --alignment = "center", - scale_with_zoom = false - } - storage.tetris_score_rendering.cleared_lines = - rendering.draw_text { - text = cleared_lines, - surface = surface, - target = { playfield_area.right_bottom.x + 1, playfield_area.left_top.y + 5.3 }, - color = { r = 0.98, g = 0.66, b = 0.22 }, - scale = 1.15, - font = 'heading-1', - --alignment = "center", - scale_with_zoom = false - } - end - rendering.set_text(storage.tetris_score_rendering.score, score) - rendering.set_text(storage.tetris_score_rendering.high_score, high_score) - rendering.set_text(storage.tetris_score_rendering.level, level) - rendering.set_text(storage.tetris_score_rendering.cleared_lines, cleared_lines) -end - -local function add_score_points(amount) - storage.score = storage.score + amount - if storage.score > storage.high_score then - storage.high_score = storage.score - end -end - -local function move_lines_down(surface, y) - local entities = surface.find_entities_filtered({ area = { { playfield_area.left_top.x, playfield_area.left_top.y }, { playfield_area.left_top.x + playfield_width + 1, playfield_area.left_top.y + y + 1 } }, force = 'enemy' }) - for _, e in pairs(entities) do - if e.valid then - e.clone { position = { e.position.x, e.position.y + 1 }, surface = surface, force = 'enemy' } - e.destroy() - end - end -end - -local function tetris(surface) - local c = 0 - local entity_lines_to_kill = {} - for y = 0, playfield_height, 1 do - local entities = - surface.find_entities_filtered( - { - area = { { playfield_area.left_top.x, playfield_area.left_top.y + y }, { playfield_area.left_top.x + playfield_width + 1, playfield_area.left_top.y + y + 1 } }, - force = 'enemy' - } - ) - if #entities == playfield_width then - entity_lines_to_kill[#entity_lines_to_kill + 1] = { entities = entities, y = y } - c = c + 1 - end - end - if c < 1 then - return - end - - storage.cleared_lines = storage.cleared_lines + c - - local name = 'explosion' - if c > 2 then - name = 'uranium-cannon-shell-explosion' - end - if c >= 4 then - name = 'ground-explosion' - end - - local score_y = false - - for _, line in pairs(entity_lines_to_kill) do - for _, entity in pairs(line.entities) do - if math.random(1, 2) == 1 then - surface.create_entity({ name = name, position = entity.position, force = 'neutral' }) - end - entity.destroy() - end - move_lines_down(surface, line.y) - if not score_y then - score_y = line.y - end - end - set_collision_grid(surface) - - local score_gain = (c * 100 * c) - add_score_points(score_gain) - - rendering.draw_text { - text = '+' .. score_gain, - surface = surface, - target = { playfield_area.left_top.x + playfield_width * 0.5, playfield_area.left_top.y + score_y }, - color = { r = 0.22, g = 0.77, b = 0.22 }, - scale = c, - font = 'heading-1', - time_to_live = 180, - alignment = 'center', - scale_with_zoom = false - } -end - -local function reset_score() - storage.level = 0 - storage.cleared_lines = 0 - storage.score = 0 -end - -local function reset_play_area(surface) - local entities = surface.find_entities_filtered({ area = playfield_area, force = 'enemy' }) - for _, e in pairs(entities) do - if math.random(1, 6) == 1 then - e.surface.create_entity({ name = 'big-artillery-explosion', position = e.position, force = 'neutral' }) - end - e.destroy() - end - set_collision_grid(surface) - storage.last_reset = game.tick + 300 -end - -local function set_difficulty() - storage.move_down_delay = game.tick + (64 - (storage.level * 2)) - local level = math.floor(storage.cleared_lines * 0.15) + 1 - if storage.level == level then - return - end - storage.level = level -end - -local function new_brick(surface) - if storage.active_brick then - return - end - - local r = math.random(1, 7) - if math.random(1, 16) == 1 then - r = math.random(8, #bricks) - end - --local r = 12 - local brick = bricks[r] - - local x_modifier = -1 + math.random(0, 2) - local spawn_position = { x = playfield_area.left_top.x + playfield_width * 0.5 + x_modifier, y = playfield_area.left_top.y + brick.spawn_y_modifier - 1 } - - if not storage.tetris_grid[coord_string(math.floor(spawn_position.x), math.floor(spawn_position.y))] then - reset_play_area(surface) - reset_score() - set_difficulty() - draw_score(surface) - end - - if game.tick < storage.last_reset then - rendering.draw_text { - text = 'Round begins in.. ' .. math.abs(math.floor((game.tick - storage.last_reset) / 60)), - surface = surface, - target = { playfield_area.left_top.x + playfield_width * 0.5, playfield_area.left_top.y + playfield_height * 0.5 }, - color = { r = 0.98, g = 0.66, b = 0.22 }, - scale = 3, - font = 'heading-1', - time_to_live = 60, - alignment = 'center', - scale_with_zoom = false - } - return - end - - storage.active_brick = {} - storage.active_brick.direction = 1 - storage.active_brick.type = r - storage.active_brick.positions = {} - storage.active_brick.entity_name = brick.entity_name - storage.active_brick.entity_type = brick.entity_type - - for k, v in pairs(brick.vectors[1]) do - storage.active_brick.positions[k] = { x = spawn_position.x + v[1], y = spawn_position.y + v[2] } - end -end - -local function move_down(surface) - if not storage.active_brick then - return - end - if storage.move_down_delay > game.tick then - return - end - for k, p in pairs(storage.active_brick.positions) do - if not storage.tetris_grid[coord_string(math.floor(storage.active_brick.positions[k].x), math.floor(storage.active_brick.positions[k].y + 1))] then - for k, p in pairs(storage.active_brick.positions) do - storage.tetris_grid[coord_string(math.floor(p.x), math.floor(p.y))] = false - storage.tetris_active_grid[coord_string(math.floor(p.x), math.floor(p.y))] = false - end - storage.active_brick = nil - tetris(surface) - add_score_points(5) - draw_score(surface) - new_brick(surface) - return - end - end - for k, p in pairs(storage.active_brick.positions) do - storage.active_brick.positions[k] = { x = storage.active_brick.positions[k].x, y = storage.active_brick.positions[k].y + 1 } - end - set_difficulty() - return true -end - -local function move(surface, item) - if not storage.active_brick then - return - end - if item == 'iron-gear-wheel' then - rotate_brick(surface) - return - end - if item == 'processing-unit' then - for c = 1, 4, 1 do - storage.move_down_delay = 0 - local b = move_down(surface) - draw_active_bricks(surface) - if not b then - return - end - end - end - if not move_translations[item] then - return - end - for k, p in pairs(storage.active_brick.positions) do - if not storage.tetris_grid[coord_string(math.floor(storage.active_brick.positions[k].x + move_translations[item][1]), math.floor(storage.active_brick.positions[k].y + move_translations[item][2]))] then - return - end - end - for k, p in pairs(storage.active_brick.positions) do - storage.active_brick.positions[k] = { - x = storage.active_brick.positions[k].x + move_translations[item][1], - y = storage.active_brick.positions[k].y + move_translations[item][2] - } - end -end - -local function on_player_cursor_stack_changed(event) - local player = game.players[event.player_index] - --game.print(game.tick) - -- game.print(player.cursor_stack) - if not player.cursor_stack then - return - end - if not player.cursor_stack.valid_for_read then - return - end - if not player.cursor_stack.name then - return - end - local item = player.cursor_stack.name - move(player.surface, item) - player.cursor_stack.clear() - player.surface.spill_item_stack(player.position, { name = item, count = 1 }, true) - - if item == 'iron-plate' then - player.surface.create_entity({ name = 'flying-text', position = player.position, text = '<', color = player.color }) - end - if item == 'copper-plate' then - player.surface.create_entity({ name = 'flying-text', position = player.position, text = '>', color = player.color }) - end - if item == 'processing-unit' then - player.surface.create_entity({ name = 'flying-text', position = player.position, text = '▼', color = player.color }) - end - if item == 'iron-gear-wheel' then - player.surface.create_entity({ name = 'flying-text', position = player.position, text = '8', color = player.color }) - end -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - set_hotbar() - set_inventory() - player.surface.daytime = 0.22 - player.surface.freeze_daytime = 1 - player.print('Use 1,2, 9, 0 on your keyboard to control the bricks.', { r = 0.98, g = 0.66, b = 0.22 }) -end - -local function on_chunk_generated(event) - local surface = event.surface - for _, e in pairs(surface.find_entities_filtered({ area = event.area, force = { 'neutral', 'enemy' } })) do - e.destroy() - end - for _, t in pairs(surface.find_tiles_filtered({ area = event.area })) do - --surface.set_tiles({{name = "tutorial-grid", position = t.position}}) - if t.position.y < 4 and t.position.y > -4 and t.position.x < 4 and t.position.x > -4 then - surface.set_tiles({ { name = 'sand-1', position = t.position } }) - else - surface.set_tiles({ { name = 'out-of-map', position = t.position } }) - end - end - surface.destroy_decoratives { area = event.area } - if event.area.left_top.x == 128 and event.area.left_top.y == 128 then - draw_playfield(surface) - end -end - -local function on_init(event) - storage.tetris_grid = {} - storage.tetris_active_grid = {} - storage.high_score = 0 - storage.last_reset = 120 - storage.cleared_lines = 0 - storage.level = 0 -end - -local function tick() - local surface = game.surfaces[1] - if game.tick % 4 == 0 then - draw_active_bricks(surface) - move_down(surface) - end - if game.tick % 60 == 0 then - new_brick(surface) - end -end - -event.on_nth_tick(4, tick) -event.on_init(on_init) -event.add(defines.events.on_player_cursor_stack_changed, on_player_cursor_stack_changed) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_chunk_generated, on_chunk_generated) diff --git a/maps/tetris/unused.lua b/maps/tetris/unused.lua deleted file mode 100644 index 41f076315..000000000 --- a/maps/tetris/unused.lua +++ /dev/null @@ -1,16 +0,0 @@ ---luacheck: ignore -local function is_position_inside_playfield(position) - if position.x > playfield_area.right_bottom.x then - return false - end - if position.y > playfield_area.right_bottom.y then - return false - end - if position.x <= playfield_area.left_top.x then - return false - end - if position.y < playfield_area.left_top.y then - return false - end - return true -end diff --git a/maps/wave_of_death/WoD.lua b/maps/wave_of_death/WoD.lua deleted file mode 100644 index 34550edf7..000000000 --- a/maps/wave_of_death/WoD.lua +++ /dev/null @@ -1,231 +0,0 @@ ---luacheck: ignore --- Map by Kyte & MewMew - -require 'maps.wave_of_death.intro' -require 'modules.biter_evasion_hp_increaser' -require 'modules.custom_death_messages' -require 'modules.dangerous_goods' - -local event = require 'utils.event' -require 'utils.table' -local init = require 'maps.wave_of_death.init' -local on_chunk_generated = require 'maps.wave_of_death.terrain' -local ai = require 'maps.wave_of_death.ai' -local game_status = require 'maps.wave_of_death.game_status' - -function soft_teleport(player, destination) - local surface = game.surfaces['wave_of_death'] - local pos = surface.find_non_colliding_position('character', destination, 8, 0.5) - if not pos then - player.teleport(destination, surface) - end - player.teleport(pos, surface) -end - -local function spectate_button(player) - if player.gui.top.spectate_button then - return - end - local button = player.gui.top.add({ type = 'button', name = 'spectate_button', caption = 'Spectate' }) - button.style.font = 'default-bold' - button.style.font_color = { r = 0.0, g = 0.0, b = 0.0 } - button.style.minimal_height = 38 - button.style.minimal_width = 38 - button.style.top_padding = 2 - button.style.left_padding = 4 - button.style.right_padding = 4 - button.style.bottom_padding = 2 -end - -local function create_spectate_confirmation(player) - if player.gui.center.spectate_confirmation_frame then - return - end - local frame = player.gui.center.add({ type = 'frame', name = 'spectate_confirmation_frame', caption = 'Are you sure you want to spectate? This can not be undone.' }) - frame.style.font = 'default' - frame.style.font_color = { r = 0.3, g = 0.65, b = 0.3 } - frame.add({ type = 'button', name = 'confirm_spectate', caption = 'Spectate' }) - frame.add({ type = 'button', name = 'cancel_spectate', caption = 'Cancel' }) -end - -local button_colors = { - [1] = { r = 0.0, g = 0.0, b = 0.38 }, - [2] = { r = 0.38, g = 0.0, b = 0.0 }, - [3] = { r = 0.0, g = 0.38, b = 0.0 }, - [4] = { r = 0.25, g = 0.0, b = 0.35 } -} - -function create_lane_buttons(player) - for i = 1, 4, 1 do - if player.gui.top['button_lane_' .. i] then - player.gui.top['button_lane_' .. i].destroy() - end - local caption = 'Wave #' .. storage.wod_lane[i].current_wave - 1 - if storage.wod_lane[i].game_lost == true then - caption = 'Out' - end - local button = player.gui.top.add({ type = 'button', name = 'button_lane_' .. i, caption = caption, tooltip = 'Lane ' .. i .. ' stats' }) - button.style.font = 'default-bold' - button.style.font_color = button_colors[i] - button.style.minimal_height = 38 - button.style.minimal_width = 70 - button.style.top_padding = 2 - button.style.left_padding = 4 - button.style.right_padding = 4 - button.style.bottom_padding = 2 - end -end - -local function autojoin_lane(player) - local lowest_player_count = 256 - local lane_number - local lane_numbers = { 1, 2, 3, 4 } - table.shuffle_table(lane_numbers) - - for _, number in pairs(lane_numbers) do - if #game.forces[number].connected_players < lowest_player_count and storage.wod_lane[number].game_lost == false then - lowest_player_count = #game.forces[number].connected_players - lane_number = number - end - end - - player.force = game.forces[lane_number] - soft_teleport(player, game.forces[player.force.name].get_spawn_position(game.surfaces['wave_of_death'])) - player.insert({ name = 'pistol', count = 1 }) - player.insert({ name = 'firearm-magazine', count = 16 }) - player.insert({ name = 'iron-plate', count = 128 }) - player.insert({ name = 'iron-gear-wheel', count = 32 }) -end - -local function on_player_joined_game(event) - init() - - local player = game.players[event.player_index] - spectate_button(player) - create_lane_buttons(player) - - if storage.lobby_active and #game.connected_players < 4 then - if game.tick ~= 0 then - soft_teleport(player, game.forces.player.get_spawn_position(game.surfaces['wave_of_death'])) - end - game.print('Waiting for ' .. 4 - #game.connected_players .. ' more players to join.', { r = 0, g = 170, b = 0 }) - return - end - - if storage.lobby_active then - for _, p in pairs(game.connected_players) do - autojoin_lane(p) - end - storage.lobby_active = false - return - end - - if player.online_time == 0 then - autojoin_lane(player) - return - end - - if storage.wod_lane[tonumber(player.force.name)].game_lost == true then - player.character.die() - end -end - -local function on_entity_damaged(event) - ai.prevent_friendly_fire(event) -end - -local function on_entity_died(event) - if not event.entity.valid then - return - end - ai.spawn_spread_wave(event) - game_status.has_lane_lost(event) -end - -local function on_player_rotated_entity(event) - ai.trigger_new_wave(event) -end - -local function on_tick(event) - if game.tick % 300 ~= 0 then - return - end - - for i = 1, 4, 1 do - game.forces[i].chart(game.surfaces['wave_of_death'], { { -288, -420 }, { 352, 64 } }) - end - - game_status.restart_server() - - if game.tick == 300 then - for _, p in pairs(game.connected_players) do - soft_teleport(p, game.forces.player.get_spawn_position(game.surfaces['wave_of_death'])) - end - end -end - -local function on_gui_click(event) - if not event then - return - end - if not event.element then - return - end - if not event.element.valid then - return - end - local player = game.players[event.element.player_index] - if event.element.name == 'cancel_spectate' then - player.gui.center['spectate_confirmation_frame'].destroy() - return - end - if event.element.name == 'confirm_spectate' then - player.gui.center['spectate_confirmation_frame'].destroy() - game.permissions.get_group('spectator').add_player(player) - if player.force.name == 'player' then - return - end - player.force = game.forces.player - if player.character then - player.character.die() - end - return - end - if event.element.name == 'spectate_button' then - if player.gui.center['spectate_confirmation_frame'] then - player.gui.center['spectate_confirmation_frame'].destroy() - else - create_spectate_confirmation(player) - end - return - end -end - ---Flamethrower Turret Nerf -local function on_research_finished(event) - local research = event.research - local force_name = research.force.name - if research.name == 'flamethrower' then - if not storage.flamethrower_damage then - storage.flamethrower_damage = {} - end - storage.flamethrower_damage[force_name] = -0.25 - game.forces[force_name].set_turret_attack_modifier('flamethrower-turret', storage.flamethrower_damage[force_name]) - game.forces[force_name].set_ammo_damage_modifier('flamethrower', storage.flamethrower_damage[force_name]) - end - - if string.sub(research.name, 0, 18) == 'refined-flammables' then - storage.flamethrower_damage[force_name] = storage.flamethrower_damage[force_name] + 0.05 - game.forces[force_name].set_turret_attack_modifier('flamethrower-turret', storage.flamethrower_damage[force_name]) - game.forces[force_name].set_ammo_damage_modifier('flamethrower', storage.flamethrower_damage[force_name]) - end -end - -event.add(defines.events.on_research_finished, on_research_finished) -event.add(defines.events.on_gui_click, on_gui_click) -event.add(defines.events.on_tick, on_tick) -event.add(defines.events.on_chunk_generated, on_chunk_generated) -event.add(defines.events.on_entity_damaged, on_entity_damaged) -event.add(defines.events.on_entity_died, on_entity_died) -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_player_rotated_entity, on_player_rotated_entity) diff --git a/maps/wave_of_death/ai.lua b/maps/wave_of_death/ai.lua deleted file mode 100644 index 316e8d8bc..000000000 --- a/maps/wave_of_death/ai.lua +++ /dev/null @@ -1,156 +0,0 @@ ---luacheck: ignore -local biter_waves = require 'maps.wave_of_death.biter_waves' -local ai = {} - -ai.spawn_wave = function (surface, lane_number, wave_number, amount_modifier) - local is_spread_wave = true - if amount_modifier == 1 then - is_spread_wave = false - end - - if not storage.loaders[lane_number].valid then - return - end - - local x_modifier = 32 - math.random(0, 64) - - local spawn_position = { x = storage.loaders[lane_number].position.x + x_modifier, y = storage.loaders[lane_number].position.y - 288 } - - local unit_group = surface.create_unit_group({ position = spawn_position, force = 'enemy' }) - - for _, biter_type in pairs(biter_waves[wave_number]) do - for count = 1, math.floor(biter_type.amount * amount_modifier), 1 do - local pos = surface.find_non_colliding_position(biter_type.name, spawn_position, 96, 3) - local biter = surface.create_entity({ name = biter_type.name, position = pos, force = 'enemy' }) - storage.wod_biters[biter.unit_number] = { entity = biter, lane_number = lane_number, spread_wave = is_spread_wave } - unit_group.add_member(biter) - if not is_spread_wave then - storage.wod_lane[lane_number].alive_biters = storage.wod_lane[lane_number].alive_biters + 1 - end - end - end - - unit_group.set_command( - { - type = defines.command.compound, - structure_type = defines.compound_command.return_last, - commands = { - { - type = defines.command.attack_area, - destination = { x = storage.loaders[lane_number].position.x + x_modifier, y = storage.loaders[lane_number].position.y }, - radius = 32, - distraction = defines.distraction.by_enemy - }, - { - type = defines.command.attack, - target = storage.loaders[lane_number], - distraction = defines.distraction.by_enemy - } - } - } - ) - - if is_spread_wave then - return - end - storage.wod_lane[lane_number].current_wave = storage.wod_lane[lane_number].current_wave + 1 - - local m = 0.005 - if storage.wod_lane[lane_number].current_wave > #biter_waves then - m = 0.25 - end - storage.biter_evasion_health_increase_factor = storage.biter_evasion_health_increase_factor + m - - for _, player in pairs(game.connected_players) do - create_lane_buttons(player) - end -end - ---on_entity_died event -ai.spawn_spread_wave = function (event) - local entity = event.entity - if not entity.unit_number then - return - end - if not storage.wod_biters[entity.unit_number] then - return - end - if storage.wod_biters[entity.unit_number].spread_wave then - storage.wod_biters[entity.unit_number] = nil - return - end - - local trigger_lane_number = storage.wod_biters[entity.unit_number].lane_number - - storage.wod_lane[trigger_lane_number].alive_biters = storage.wod_lane[trigger_lane_number].alive_biters - 1 - if storage.wod_lane[trigger_lane_number].alive_biters ~= 0 then - return - end - - for lane_number = 1, 4, 1 do - if lane_number ~= trigger_lane_number then - if #game.forces[lane_number].players > 0 and storage.wod_lane[lane_number].game_lost == false then - ai.spawn_wave(entity.surface, lane_number, storage.wod_lane[trigger_lane_number].current_wave - 1, storage.spread_amount_modifier) - end - end - end - - --game.print("Lane #" .. trigger_lane_number .. " has defeated their wave.") -end - ---on_entity_rotated event -ai.trigger_new_wave = function (event) - local entity = event.entity - if entity.name ~= 'loader' then - return - end - if game.tick < 18000 then - entity.force.print('>> It is too early to call waves yet.', { r = 180, g = 0, b = 0 }) - return - end - if #game.players < 4 then - entity.force.print('>> More players are required to spawn waves.', { r = 180, g = 0, b = 0 }) - return - end - local lane_number = tonumber(entity.force.name) - if not storage.wod_lane[lane_number] then - return - end - if storage.wod_lane[lane_number].alive_biters > 0 then - entity.force.print('>> There are ' .. storage.wod_lane[lane_number].alive_biters .. ' spawned biters left.', { r = 180, g = 0, b = 0 }) - return - end - - local wave_number = storage.wod_lane[lane_number].current_wave - if not biter_waves[wave_number] then - wave_number = #biter_waves - end - ai.spawn_wave(entity.surface, lane_number, wave_number, 1) - - local player = game.players[event.player_index] - for _, force in pairs(game.forces) do - if force.name == entity.force.name then - force.print('>> ' .. player.name .. ' has summoned wave #' .. storage.wod_lane[lane_number].current_wave - 1 .. '', { r = 0, g = 100, b = 0 }) - else - force.print('>> Lane ' .. entity.force.name .. ' summoned wave #' .. storage.wod_lane[lane_number].current_wave - 1 .. '', { r = 0, g = 100, b = 0 }) - end - end - - for _, player in pairs(game.connected_players) do - player.play_sound { path = 'utility/new_objective', volume_modifier = 0.3 } - end -end - -ai.prevent_friendly_fire = function (event) - if event.cause then - if event.cause.type == 'unit' then - return - end - end - if event.entity.name ~= 'loader' then - return - end - event.entity.health = event.entity.health + event.final_damage_amount -end - -return ai diff --git a/maps/wave_of_death/biter_waves.lua b/maps/wave_of_death/biter_waves.lua deleted file mode 100644 index 97849e5eb..000000000 --- a/maps/wave_of_death/biter_waves.lua +++ /dev/null @@ -1,44 +0,0 @@ -local waves = { - {{name = 'small-biter', amount = 10}}, - {{name = 'small-biter', amount = 20}}, - {{name = 'small-biter', amount = 40}}, - {{name = 'small-biter', amount = 80}, {name = 'small-spitter', amount = 10}}, - {{name = 'small-biter', amount = 80}, {name = 'small-spitter', amount = 20}}, - {{name = 'small-biter', amount = 80}, {name = 'small-spitter', amount = 40}}, - {{name = 'medium-biter', amount = 1}, {name = 'small-biter', amount = 80}, {name = 'small-spitter', amount = 80}}, - {{name = 'medium-biter', amount = 10}, {name = 'small-spitter', amount = 80}}, - {{name = 'medium-biter', amount = 20}, {name = 'small-spitter', amount = 80}}, - {{name = 'medium-biter', amount = 40}, {name = 'small-spitter', amount = 80}}, - {{name = 'medium-biter', amount = 80}, {name = 'small-spitter', amount = 80}}, - {{name = 'medium-biter', amount = 80}, {name = 'medium-spitter', amount = 10}}, - {{name = 'medium-biter', amount = 80}, {name = 'medium-spitter', amount = 20}}, - {{name = 'medium-biter', amount = 80}, {name = 'medium-spitter', amount = 40}}, - {{name = 'big-biter', amount = 1}, {name = 'medium-biter', amount = 80}, {name = 'medium-spitter', amount = 80}}, - {{name = 'big-biter', amount = 10}, {name = 'medium-spitter', amount = 80}}, - {{name = 'big-biter', amount = 20}, {name = 'medium-spitter', amount = 80}}, - {{name = 'big-biter', amount = 40}, {name = 'medium-spitter', amount = 80}}, - {{name = 'big-biter', amount = 80}, {name = 'medium-spitter', amount = 80}}, - {{name = 'big-biter', amount = 80}, {name = 'big-spitter', amount = 10}}, - {{name = 'big-biter', amount = 80}, {name = 'big-spitter', amount = 20}}, - {{name = 'big-biter', amount = 80}, {name = 'big-spitter', amount = 40}}, - {{name = 'behemoth-biter', amount = 1}, {name = 'big-biter', amount = 80}, {name = 'big-spitter', amount = 80}}, - {{name = 'behemoth-biter', amount = 10}, {name = 'big-spitter', amount = 80}}, - {{name = 'behemoth-biter', amount = 20}, {name = 'big-spitter', amount = 80}}, - {{name = 'behemoth-biter', amount = 40}, {name = 'big-spitter', amount = 80}}, - {{name = 'behemoth-biter', amount = 80}, {name = 'big-spitter', amount = 80}}, - {{name = 'behemoth-biter', amount = 80}, {name = 'behemoth-spitter', amount = 10}}, - {{name = 'behemoth-biter', amount = 80}, {name = 'behemoth-spitter', amount = 20}}, - {{name = 'behemoth-biter', amount = 80}, {name = 'behemoth-spitter', amount = 40}}, - {{name = 'behemoth-biter', amount = 80}, {name = 'behemoth-spitter', amount = 60}}, - {{name = 'behemoth-biter', amount = 100}, {name = 'behemoth-spitter', amount = 70}}, - {{name = 'behemoth-biter', amount = 125}, {name = 'behemoth-spitter', amount = 80}}, - {{name = 'behemoth-biter', amount = 150}, {name = 'behemoth-spitter', amount = 90}}, - {{name = 'behemoth-biter', amount = 175}, {name = 'behemoth-spitter', amount = 95}}, - {{name = 'behemoth-biter', amount = 200}, {name = 'behemoth-spitter', amount = 100}}, - {{name = 'behemoth-biter', amount = 225}, {name = 'behemoth-spitter', amount = 110}}, - {{name = 'behemoth-biter', amount = 250}, {name = 'behemoth-spitter', amount = 125}}, - {{name = 'behemoth-biter', amount = 275}, {name = 'behemoth-spitter', amount = 135}}, - {{name = 'behemoth-biter', amount = 300}, {name = 'behemoth-spitter', amount = 150}} -} - -return waves diff --git a/maps/wave_of_death/game_status.lua b/maps/wave_of_death/game_status.lua deleted file mode 100644 index e7c92a9df..000000000 --- a/maps/wave_of_death/game_status.lua +++ /dev/null @@ -1,93 +0,0 @@ ---luacheck: ignore -local game_status = {} -local Server = require 'utils.server' - -local function create_victory_gui(winning_lane) - for _, player in pairs(game.connected_players) do - player.play_sound { path = 'utility/game_won', volume_modifier = 0.75 } - local frame = player.gui.left.add { type = 'frame', name = 'victory_gui', direction = 'vertical', caption = 'Lane ' .. winning_lane .. ' has won the game!! ^_^' } - frame.style.font = 'heading-1' - frame.style.font_color = { r = 220, g = 220, b = 0 } - end -end - -game_status.restart_server = function () - if not storage.server_restart_timer then - return - end - storage.server_restart_timer = storage.server_restart_timer - 5 - if storage.server_restart_timer == 120 then - return - end - if storage.server_restart_timer == 0 then - game.print('Map is restarting!', { r = 0.22, g = 0.88, b = 0.22 }) - local message = 'Map is restarting! ' - Server.to_discord_bold(table.concat { '*** ', message, ' ***' }) - Server.start_scenario('wave_of_death') - storage.server_restart_timer = nil - return - end - if storage.server_restart_timer % 30 == 0 then - game.print('Map will restart in ' .. storage.server_restart_timer .. ' seconds!', { r = 0.22, g = 0.88, b = 0.22 }) - end -end - -game_status.has_lane_lost = function (event) - if event.entity.name ~= 'loader' then - return - end - local lane_number = tonumber(event.entity.force.name) - storage.wod_lane[lane_number].game_lost = true - local surface = event.entity.surface - game.forces[lane_number].set_spawn_position({ x = 32, y = 0 }, surface) - - surface.create_entity( - { - name = 'atomic-rocket', - position = event.entity.position, - force = 'enemy', - source = event.entity.position, - target = event.entity.position, - max_range = 1, - speed = 1 - } - ) - - for _, player in pairs(game.forces[lane_number].connected_players) do - if player.character then - player.character.die() - end - end - game.print('>> Lane ' .. lane_number .. ' has been defeated!', { r = 120, g = 60, b = 0 }) - - --determine winner and restart the server - local lanes_alive = 0 - for i = 1, 4, 1 do - if storage.wod_lane[i].game_lost == false then - lanes_alive = lanes_alive + 1 - end - end - if lanes_alive ~= 1 then - for _, player in pairs(game.connected_players) do - create_lane_buttons(player) - player.play_sound { path = 'utility/game_lost', volume_modifier = 0.5 } - end - return - end - - for i = 1, 4, 1 do - if storage.wod_lane[i].game_lost == false then - game.print('>> Lane ' .. i .. ' has won the game!!', { r = 220, g = 220, b = 0 }) - create_victory_gui(i) - storage.server_restart_timer = 120 - end - end - - for _, unit in pairs(surface.find_entities_filtered({ type = 'unit' })) do - if unit.valid then - unit.die() - end - end -end - -return game_status diff --git a/maps/wave_of_death/init.lua b/maps/wave_of_death/init.lua deleted file mode 100644 index 565d8bce5..000000000 --- a/maps/wave_of_death/init.lua +++ /dev/null @@ -1,109 +0,0 @@ ---luacheck: ignore -local function init_surface() - local map_gen_settings = {} - map_gen_settings.water = '0' - map_gen_settings.starting_area = '5' - map_gen_settings.cliff_settings = { cliff_elevation_interval = 12, cliff_elevation_0 = 32 } - map_gen_settings.autoplace_controls = { - ['coal'] = { frequency = '0', size = '0', richness = '0' }, - ['stone'] = { frequency = '0', size = '0', richness = '0' }, - ['copper-ore'] = { frequency = '0', size = '0', richness = '0' }, - ['iron-ore'] = { frequency = '0', size = '0', richness = '0' }, - ['uranium-ore'] = { frequency = '0', size = '0', richness = '0' }, - ['crude-oil'] = { frequency = '0', size = '0', richness = '0' }, - ['trees'] = { frequency = '0', size = '0', richness = '0' }, - ['enemy-base'] = { frequency = '0', size = '0', richness = '0' } - } - local surface = game.create_surface('wave_of_death', map_gen_settings) - - game.map_settings.enemy_evolution.time_factor = 0 - game.map_settings.enemy_evolution.destroy_factor = 0 - game.map_settings.enemy_evolution.pollution_factor = 0 - game.map_settings.pollution.enabled = false - game.map_settings.enemy_expansion.enabled = false - game.difficulty_settings.technology_price_multiplier = 0.8 - - return surface -end - -local function init_forces(surface) - game.create_force('1') - game.create_force('2') - game.create_force('3') - game.create_force('4') - - for _, force in pairs(game.forces) do - if force.name ~= 'enemy' then - force.technologies['optics'].researched = true - force.technologies['artillery'].enabled = false - force.technologies['artillery-shell-range-1'].enabled = false - force.technologies['artillery-shell-speed-1'].enabled = false - force.technologies['atomic-bomb'].enabled = false - force.set_ammo_damage_modifier('shotgun-shell', 1) - force.share_chart = true - for _, force_2 in pairs(game.forces) do - if force_2.name ~= 'enemy' then - force.set_cease_fire(force_2.name, true) - end - end - end - end - - for i = 1, 4, 1 do - game.forces[i].set_friend('player', true) - game.forces['player'].set_friend(game.forces[i].name, true) - end - game.forces['player'].set_spawn_position({ x = 32, y = 0 }, surface) - - local p = game.permissions.create_group('spectator') - for action_name, _ in pairs(defines.input_action) do - p.set_allows_action(defines.input_action[action_name], false) - end - local defs = { - defines.input_action.write_to_console, - defines.input_action.gui_click, - defines.input_action.gui_selection_state_changed, - defines.input_action.gui_checked_state_changed, - defines.input_action.gui_elem_changed, - defines.input_action.gui_text_changed, - defines.input_action.gui_value_changed, - defines.input_action.start_walking, - defines.input_action.open_kills_gui, - defines.input_action.open_character_gui, - defines.input_action.edit_permission_group, - defines.input_action.toggle_show_entity_info, - defines.input_action.rotate_entity, - defines.input_action.start_research - } - for _, d in pairs(defs) do - p.set_allows_action(d, true) - end -end - -local function init_globals() - storage.spread_amount_modifier = 0.75 --percentage of a cleared wave to spawn at all other teams - storage.wod_lane = {} - storage.wod_biters = {} - storage.lobby_active = true - - for i = 1, 4, 1 do - storage.wod_lane[i] = {} - storage.wod_lane[i].current_wave = 1 - storage.wod_lane[i].alive_biters = 0 - storage.wod_lane[i].game_lost = false - end -end - -local function init() - if storage.spread_amount_modifier then - return - end - local surface = init_surface() - init_globals() - init_forces(surface) - - surface.request_to_generate_chunks({ x = 0, y = 0 }, 8) - surface.force_generate_chunk_requests() -end - -return init diff --git a/maps/wave_of_death/intro.lua b/maps/wave_of_death/intro.lua deleted file mode 100644 index 2fea1cb89..000000000 --- a/maps/wave_of_death/intro.lua +++ /dev/null @@ -1,97 +0,0 @@ ---luacheck: ignore -local event = require 'utils.event' - -local info = - [[ -Hello Players, - -on this map you battle with your team against up to 3 other teams. - -Each team can call its own wave of biters and spitters at any time and they get stronger with each wave. -Each wave, when defeated, sends a percentage of their enemys to all other teams. - -To call a wave, you have to rotate the loader. -But remember that you must also be able to defeat the enemy. - -Your task is to defend your loader. If it is destroyed, you have lost! - -A round is over when only one team has it's loader left. - -Credits: -Map made by MewMew and Kyte -]] - -local function create_map_intro_button(player) - if player.gui.top['map_intro_button'] then - return - end - local b = player.gui.top.add({type = 'sprite-button', caption = '?', name = 'map_intro_button', tooltip = 'Map Info'}) - b.style.font_color = {r = 0.1, g = 0.8, b = 0.1} - b.style.font = 'heading-1' - b.style.minimal_height = 38 - b.style.minimal_width = 38 - b.style.top_padding = 2 - b.style.left_padding = 4 - b.style.right_padding = 4 - b.style.bottom_padding = 2 -end - -local function create_map_intro(player) - if player.gui.left['map_intro_frame'] then - player.gui.left['map_intro_frame'].destroy() - end - local frame = player.gui.left.add {type = 'frame', name = 'map_intro_frame', direction = 'vertical'} - - local t = frame.add {type = 'table', column_count = 1} - - local b = frame.add {type = 'button', caption = 'Close', name = 'close_map_intro_frame', align = 'right'} - b.style.font = 'default' - b.style.minimal_height = 30 - b.style.minimal_width = 30 - b.style.top_padding = 2 - b.style.left_padding = 4 - b.style.right_padding = 4 - b.style.bottom_padding = 2 - - local frame = t.add {type = 'frame'} - local l = frame.add {type = 'label', caption = info} - l.style.single_line = false - l.style.font = 'heading-2' - l.style.font_color = {r = 0.60, g = 0.8, b = 0.60} -end - -local function on_player_joined_game(event) - local player = game.players[event.player_index] - create_map_intro_button(player) - if player.online_time == 0 then - create_map_intro(player) - end -end - -local function on_gui_click(event) - if not event then - return - end - if not event.element then - return - end - if not event.element.valid then - return - end - local player = game.players[event.element.player_index] - if event.element.name == 'close_map_intro_frame' then - player.gui.left['map_intro_frame'].destroy() - return - end - if event.element.name == 'map_intro_button' then - if player.gui.left['map_intro_frame'] then - player.gui.left['map_intro_frame'].destroy() - else - create_map_intro(player) - end - return - end -end - -event.add(defines.events.on_player_joined_game, on_player_joined_game) -event.add(defines.events.on_gui_click, on_gui_click) diff --git a/maps/wave_of_death/logo.lua b/maps/wave_of_death/logo.lua deleted file mode 100644 index 2022dad09..000000000 --- a/maps/wave_of_death/logo.lua +++ /dev/null @@ -1,6013 +0,0 @@ -local tiles = {} - -tiles.index = { - [1] = 'stone-path', - [2] = 'hazard-concrete-left', - [3] = 'concrete' -} - -tiles.data = { - {{8, 59}, 1}, - {{8, 60}, 1}, - {{8, 61}, 1}, - {{8, 62}, 1}, - {{8, 63}, 1}, - {{8, 64}, 1}, - {{8, 65}, 1}, - {{8, 66}, 1}, - {{8, 67}, 1}, - {{8, 68}, 1}, - {{8, 69}, 1}, - {{8, 70}, 1}, - {{8, 71}, 1}, - {{8, 72}, 1}, - {{8, 73}, 1}, - {{8, 74}, 1}, - {{8, 75}, 1}, - {{8, 90}, 1}, - {{8, 91}, 1}, - {{8, 92}, 1}, - {{8, 93}, 1}, - {{8, 94}, 1}, - {{8, 95}, 1}, - {{8, 96}, 1}, - {{8, 97}, 1}, - {{8, 98}, 1}, - {{8, 99}, 1}, - {{8, 100}, 1}, - {{8, 101}, 1}, - {{8, 102}, 1}, - {{8, 103}, 1}, - {{8, 104}, 1}, - {{8, 105}, 1}, - {{8, 106}, 1}, - {{9, 59}, 1}, - {{9, 60}, 1}, - {{9, 61}, 1}, - {{9, 62}, 1}, - {{9, 63}, 1}, - {{9, 64}, 1}, - {{9, 65}, 1}, - {{9, 66}, 1}, - {{9, 67}, 1}, - {{9, 68}, 1}, - {{9, 69}, 1}, - {{9, 70}, 1}, - {{9, 71}, 1}, - {{9, 72}, 1}, - {{9, 73}, 1}, - {{9, 74}, 1}, - {{9, 75}, 1}, - {{9, 90}, 1}, - {{9, 91}, 1}, - {{9, 92}, 1}, - {{9, 93}, 1}, - {{9, 94}, 1}, - {{9, 95}, 1}, - {{9, 96}, 1}, - {{9, 97}, 1}, - {{9, 98}, 1}, - {{9, 99}, 1}, - {{9, 100}, 1}, - {{9, 101}, 1}, - {{9, 102}, 1}, - {{9, 103}, 1}, - {{9, 104}, 1}, - {{9, 105}, 1}, - {{9, 106}, 1}, - {{10, 59}, 1}, - {{10, 60}, 1}, - {{10, 61}, 1}, - {{10, 62}, 1}, - {{10, 63}, 1}, - {{10, 64}, 1}, - {{10, 65}, 1}, - {{10, 66}, 1}, - {{10, 67}, 1}, - {{10, 68}, 1}, - {{10, 69}, 1}, - {{10, 70}, 1}, - {{10, 71}, 1}, - {{10, 72}, 1}, - {{10, 73}, 1}, - {{10, 74}, 1}, - {{10, 75}, 1}, - {{10, 90}, 1}, - {{10, 91}, 1}, - {{10, 92}, 1}, - {{10, 93}, 1}, - {{10, 94}, 1}, - {{10, 95}, 1}, - {{10, 96}, 1}, - {{10, 97}, 1}, - {{10, 98}, 1}, - {{10, 99}, 1}, - {{10, 100}, 1}, - {{10, 101}, 1}, - {{10, 102}, 1}, - {{10, 103}, 1}, - {{10, 104}, 1}, - {{10, 105}, 1}, - {{10, 106}, 1}, - {{11, 59}, 1}, - {{11, 60}, 1}, - {{11, 61}, 1}, - {{11, 62}, 1}, - {{11, 63}, 1}, - {{11, 64}, 1}, - {{11, 65}, 1}, - {{11, 66}, 1}, - {{11, 67}, 1}, - {{11, 68}, 1}, - {{11, 69}, 1}, - {{11, 70}, 1}, - {{11, 71}, 1}, - {{11, 72}, 1}, - {{11, 73}, 1}, - {{11, 74}, 1}, - {{11, 75}, 1}, - {{11, 90}, 1}, - {{11, 91}, 1}, - {{11, 92}, 1}, - {{11, 93}, 1}, - {{11, 94}, 1}, - {{11, 95}, 1}, - {{11, 96}, 1}, - {{11, 97}, 1}, - {{11, 98}, 1}, - {{11, 99}, 1}, - {{11, 100}, 1}, - {{11, 101}, 1}, - {{11, 102}, 1}, - {{11, 103}, 1}, - {{11, 104}, 1}, - {{11, 105}, 1}, - {{11, 106}, 1}, - {{12, 72}, 1}, - {{12, 73}, 1}, - {{12, 74}, 1}, - {{12, 75}, 1}, - {{12, 90}, 1}, - {{12, 91}, 1}, - {{12, 92}, 1}, - {{12, 93}, 1}, - {{12, 103}, 1}, - {{12, 104}, 1}, - {{12, 105}, 1}, - {{12, 106}, 1}, - {{13, 72}, 1}, - {{13, 73}, 1}, - {{13, 74}, 1}, - {{13, 75}, 1}, - {{13, 90}, 1}, - {{13, 91}, 1}, - {{13, 92}, 1}, - {{13, 93}, 1}, - {{13, 103}, 1}, - {{13, 104}, 1}, - {{13, 105}, 1}, - {{13, 106}, 1}, - {{14, 72}, 1}, - {{14, 73}, 1}, - {{14, 74}, 1}, - {{14, 75}, 1}, - {{14, 90}, 1}, - {{14, 91}, 1}, - {{14, 92}, 1}, - {{14, 93}, 1}, - {{14, 103}, 1}, - {{14, 104}, 1}, - {{14, 105}, 1}, - {{14, 106}, 1}, - {{15, 59}, 1}, - {{15, 60}, 1}, - {{15, 61}, 1}, - {{15, 62}, 1}, - {{15, 63}, 1}, - {{15, 64}, 1}, - {{15, 65}, 1}, - {{15, 66}, 1}, - {{15, 67}, 1}, - {{15, 68}, 1}, - {{15, 69}, 1}, - {{15, 70}, 1}, - {{15, 71}, 1}, - {{15, 72}, 1}, - {{15, 73}, 1}, - {{15, 74}, 1}, - {{15, 75}, 1}, - {{15, 90}, 1}, - {{15, 91}, 1}, - {{15, 92}, 1}, - {{15, 93}, 1}, - {{15, 103}, 1}, - {{15, 104}, 1}, - {{15, 105}, 1}, - {{15, 106}, 1}, - {{16, 59}, 1}, - {{16, 60}, 1}, - {{16, 61}, 1}, - {{16, 62}, 1}, - {{16, 63}, 1}, - {{16, 64}, 1}, - {{16, 65}, 1}, - {{16, 66}, 1}, - {{16, 67}, 1}, - {{16, 68}, 1}, - {{16, 69}, 1}, - {{16, 70}, 1}, - {{16, 71}, 1}, - {{16, 72}, 1}, - {{16, 73}, 1}, - {{16, 74}, 1}, - {{16, 75}, 1}, - {{16, 90}, 1}, - {{16, 91}, 1}, - {{16, 92}, 1}, - {{16, 93}, 1}, - {{16, 94}, 1}, - {{16, 95}, 1}, - {{16, 96}, 1}, - {{16, 97}, 1}, - {{16, 98}, 1}, - {{16, 99}, 1}, - {{16, 100}, 1}, - {{16, 101}, 1}, - {{16, 102}, 1}, - {{16, 103}, 1}, - {{16, 104}, 1}, - {{16, 105}, 1}, - {{16, 106}, 1}, - {{17, 59}, 1}, - {{17, 60}, 1}, - {{17, 61}, 1}, - {{17, 62}, 1}, - {{17, 63}, 1}, - {{17, 64}, 1}, - {{17, 65}, 1}, - {{17, 66}, 1}, - {{17, 67}, 1}, - {{17, 68}, 1}, - {{17, 69}, 1}, - {{17, 70}, 1}, - {{17, 71}, 1}, - {{17, 72}, 1}, - {{17, 73}, 1}, - {{17, 74}, 1}, - {{17, 75}, 1}, - {{17, 90}, 1}, - {{17, 91}, 1}, - {{17, 92}, 1}, - {{17, 93}, 1}, - {{17, 94}, 1}, - {{17, 95}, 1}, - {{17, 96}, 1}, - {{17, 97}, 1}, - {{17, 98}, 1}, - {{17, 99}, 1}, - {{17, 100}, 1}, - {{17, 101}, 1}, - {{17, 102}, 1}, - {{17, 103}, 1}, - {{17, 104}, 1}, - {{17, 105}, 1}, - {{17, 106}, 1}, - {{18, 59}, 1}, - {{18, 60}, 1}, - {{18, 61}, 1}, - {{18, 62}, 1}, - {{18, 63}, 1}, - {{18, 64}, 1}, - {{18, 65}, 1}, - {{18, 66}, 1}, - {{18, 67}, 1}, - {{18, 68}, 1}, - {{18, 69}, 1}, - {{18, 70}, 1}, - {{18, 71}, 1}, - {{18, 72}, 1}, - {{18, 73}, 1}, - {{18, 74}, 1}, - {{18, 75}, 1}, - {{18, 90}, 1}, - {{18, 91}, 1}, - {{18, 92}, 1}, - {{18, 93}, 1}, - {{18, 94}, 1}, - {{18, 95}, 1}, - {{18, 96}, 1}, - {{18, 97}, 1}, - {{18, 98}, 1}, - {{18, 99}, 1}, - {{18, 100}, 1}, - {{18, 101}, 1}, - {{18, 102}, 1}, - {{18, 103}, 1}, - {{18, 104}, 1}, - {{18, 105}, 1}, - {{18, 106}, 1}, - {{19, 72}, 1}, - {{19, 73}, 1}, - {{19, 74}, 1}, - {{19, 75}, 1}, - {{19, 90}, 1}, - {{19, 91}, 1}, - {{19, 92}, 1}, - {{19, 93}, 1}, - {{19, 94}, 1}, - {{19, 95}, 1}, - {{19, 96}, 1}, - {{19, 97}, 1}, - {{19, 98}, 1}, - {{19, 99}, 1}, - {{19, 100}, 1}, - {{19, 101}, 1}, - {{19, 102}, 1}, - {{19, 103}, 1}, - {{19, 104}, 1}, - {{19, 105}, 1}, - {{19, 106}, 1}, - {{20, 72}, 1}, - {{20, 73}, 1}, - {{20, 74}, 1}, - {{20, 75}, 1}, - {{21, 72}, 1}, - {{21, 73}, 1}, - {{21, 74}, 1}, - {{21, 75}, 1}, - {{21, 90}, 1}, - {{21, 91}, 1}, - {{21, 92}, 1}, - {{21, 93}, 1}, - {{21, 96}, 1}, - {{21, 97}, 1}, - {{21, 98}, 1}, - {{21, 99}, 1}, - {{21, 100}, 1}, - {{21, 101}, 1}, - {{21, 102}, 1}, - {{21, 103}, 1}, - {{21, 104}, 1}, - {{21, 105}, 1}, - {{21, 106}, 1}, - {{22, 72}, 1}, - {{22, 73}, 1}, - {{22, 74}, 1}, - {{22, 75}, 1}, - {{22, 90}, 1}, - {{22, 91}, 1}, - {{22, 92}, 1}, - {{22, 93}, 1}, - {{22, 96}, 1}, - {{22, 97}, 1}, - {{22, 98}, 1}, - {{22, 99}, 1}, - {{22, 100}, 1}, - {{22, 101}, 1}, - {{22, 102}, 1}, - {{22, 103}, 1}, - {{22, 104}, 1}, - {{22, 105}, 1}, - {{22, 106}, 1}, - {{23, 59}, 1}, - {{23, 60}, 1}, - {{23, 61}, 1}, - {{23, 62}, 1}, - {{23, 63}, 1}, - {{23, 64}, 1}, - {{23, 65}, 1}, - {{23, 66}, 1}, - {{23, 67}, 1}, - {{23, 68}, 1}, - {{23, 69}, 1}, - {{23, 70}, 1}, - {{23, 71}, 1}, - {{23, 72}, 1}, - {{23, 73}, 1}, - {{23, 74}, 1}, - {{23, 75}, 1}, - {{23, 90}, 1}, - {{23, 91}, 1}, - {{23, 92}, 1}, - {{23, 93}, 1}, - {{23, 96}, 1}, - {{23, 97}, 1}, - {{23, 98}, 1}, - {{23, 99}, 1}, - {{23, 100}, 1}, - {{23, 101}, 1}, - {{23, 102}, 1}, - {{23, 103}, 1}, - {{23, 104}, 1}, - {{23, 105}, 1}, - {{23, 106}, 1}, - {{24, 59}, 1}, - {{24, 60}, 1}, - {{24, 61}, 1}, - {{24, 62}, 1}, - {{24, 63}, 1}, - {{24, 64}, 1}, - {{24, 65}, 1}, - {{24, 66}, 1}, - {{24, 67}, 1}, - {{24, 68}, 1}, - {{24, 69}, 1}, - {{24, 70}, 1}, - {{24, 71}, 1}, - {{24, 72}, 1}, - {{24, 73}, 1}, - {{24, 74}, 1}, - {{24, 75}, 1}, - {{24, 90}, 1}, - {{24, 91}, 1}, - {{24, 92}, 1}, - {{24, 93}, 1}, - {{24, 96}, 1}, - {{24, 97}, 1}, - {{24, 98}, 1}, - {{24, 99}, 1}, - {{24, 100}, 1}, - {{24, 101}, 1}, - {{24, 102}, 1}, - {{24, 103}, 1}, - {{24, 104}, 1}, - {{24, 105}, 1}, - {{24, 106}, 1}, - {{25, 59}, 1}, - {{25, 60}, 1}, - {{25, 61}, 1}, - {{25, 62}, 1}, - {{25, 63}, 1}, - {{25, 64}, 1}, - {{25, 65}, 1}, - {{25, 66}, 1}, - {{25, 67}, 1}, - {{25, 68}, 1}, - {{25, 69}, 1}, - {{25, 70}, 1}, - {{25, 71}, 1}, - {{25, 72}, 1}, - {{25, 73}, 1}, - {{25, 74}, 1}, - {{25, 75}, 1}, - {{25, 90}, 1}, - {{25, 91}, 1}, - {{25, 92}, 1}, - {{25, 93}, 1}, - {{25, 96}, 1}, - {{25, 97}, 1}, - {{25, 98}, 1}, - {{25, 99}, 1}, - {{26, 59}, 1}, - {{26, 60}, 1}, - {{26, 61}, 1}, - {{26, 62}, 1}, - {{26, 63}, 1}, - {{26, 64}, 1}, - {{26, 65}, 1}, - {{26, 66}, 1}, - {{26, 67}, 1}, - {{26, 68}, 1}, - {{26, 69}, 1}, - {{26, 70}, 1}, - {{26, 71}, 1}, - {{26, 72}, 1}, - {{26, 73}, 1}, - {{26, 74}, 1}, - {{26, 75}, 1}, - {{26, 90}, 1}, - {{26, 91}, 1}, - {{26, 92}, 1}, - {{26, 93}, 1}, - {{26, 96}, 1}, - {{26, 97}, 1}, - {{26, 98}, 1}, - {{26, 99}, 1}, - {{27, 90}, 1}, - {{27, 91}, 1}, - {{27, 92}, 1}, - {{27, 93}, 1}, - {{27, 96}, 1}, - {{27, 97}, 1}, - {{27, 98}, 1}, - {{27, 99}, 1}, - {{28, 59}, 1}, - {{28, 60}, 1}, - {{28, 61}, 1}, - {{28, 62}, 1}, - {{28, 63}, 1}, - {{28, 64}, 1}, - {{28, 65}, 1}, - {{28, 66}, 1}, - {{28, 67}, 1}, - {{28, 68}, 1}, - {{28, 69}, 1}, - {{28, 70}, 1}, - {{28, 71}, 1}, - {{28, 72}, 1}, - {{28, 73}, 1}, - {{28, 74}, 1}, - {{28, 75}, 1}, - {{28, 90}, 1}, - {{28, 91}, 1}, - {{28, 92}, 1}, - {{28, 93}, 1}, - {{28, 96}, 1}, - {{28, 97}, 1}, - {{28, 98}, 1}, - {{28, 99}, 1}, - {{29, 59}, 1}, - {{29, 60}, 1}, - {{29, 61}, 1}, - {{29, 62}, 1}, - {{29, 63}, 1}, - {{29, 64}, 1}, - {{29, 65}, 1}, - {{29, 66}, 1}, - {{29, 67}, 1}, - {{29, 68}, 1}, - {{29, 69}, 1}, - {{29, 70}, 1}, - {{29, 71}, 1}, - {{29, 72}, 1}, - {{29, 73}, 1}, - {{29, 74}, 1}, - {{29, 75}, 1}, - {{29, 90}, 1}, - {{29, 91}, 1}, - {{29, 92}, 1}, - {{29, 93}, 1}, - {{29, 96}, 1}, - {{29, 97}, 1}, - {{29, 98}, 1}, - {{29, 99}, 1}, - {{30, 59}, 1}, - {{30, 60}, 1}, - {{30, 61}, 1}, - {{30, 62}, 1}, - {{30, 63}, 1}, - {{30, 64}, 1}, - {{30, 65}, 1}, - {{30, 66}, 1}, - {{30, 67}, 1}, - {{30, 68}, 1}, - {{30, 69}, 1}, - {{30, 70}, 1}, - {{30, 71}, 1}, - {{30, 72}, 1}, - {{30, 73}, 1}, - {{30, 74}, 1}, - {{30, 75}, 1}, - {{30, 90}, 1}, - {{30, 91}, 1}, - {{30, 92}, 1}, - {{30, 93}, 1}, - {{30, 96}, 1}, - {{30, 97}, 1}, - {{30, 98}, 1}, - {{30, 99}, 1}, - {{31, 59}, 1}, - {{31, 60}, 1}, - {{31, 61}, 1}, - {{31, 62}, 1}, - {{31, 63}, 1}, - {{31, 64}, 1}, - {{31, 65}, 1}, - {{31, 66}, 1}, - {{31, 67}, 1}, - {{31, 68}, 1}, - {{31, 69}, 1}, - {{31, 70}, 1}, - {{31, 71}, 1}, - {{31, 72}, 1}, - {{31, 73}, 1}, - {{31, 74}, 1}, - {{31, 75}, 1}, - {{31, 90}, 1}, - {{31, 91}, 1}, - {{31, 92}, 1}, - {{31, 93}, 1}, - {{31, 96}, 1}, - {{31, 97}, 1}, - {{31, 98}, 1}, - {{31, 99}, 1}, - {{32, 59}, 1}, - {{32, 60}, 1}, - {{32, 61}, 1}, - {{32, 62}, 1}, - {{32, 65}, 1}, - {{32, 66}, 1}, - {{32, 67}, 1}, - {{32, 68}, 1}, - {{32, 90}, 1}, - {{32, 91}, 1}, - {{32, 92}, 1}, - {{32, 93}, 1}, - {{32, 96}, 1}, - {{32, 97}, 1}, - {{32, 98}, 1}, - {{32, 99}, 1}, - {{33, 59}, 1}, - {{33, 60}, 1}, - {{33, 61}, 1}, - {{33, 62}, 1}, - {{33, 65}, 1}, - {{33, 66}, 1}, - {{33, 67}, 1}, - {{33, 68}, 1}, - {{33, 90}, 1}, - {{33, 91}, 1}, - {{33, 92}, 1}, - {{33, 93}, 1}, - {{33, 96}, 1}, - {{33, 97}, 1}, - {{33, 98}, 1}, - {{33, 99}, 1}, - {{34, 59}, 1}, - {{34, 60}, 1}, - {{34, 61}, 1}, - {{34, 62}, 1}, - {{34, 65}, 1}, - {{34, 66}, 1}, - {{34, 67}, 1}, - {{34, 68}, 1}, - {{35, 59}, 1}, - {{35, 60}, 1}, - {{35, 61}, 1}, - {{35, 62}, 1}, - {{35, 65}, 1}, - {{35, 66}, 1}, - {{35, 67}, 1}, - {{35, 68}, 1}, - {{36, 59}, 1}, - {{36, 60}, 1}, - {{36, 61}, 1}, - {{36, 62}, 1}, - {{36, 65}, 1}, - {{36, 66}, 1}, - {{36, 67}, 1}, - {{36, 68}, 1}, - {{37, 59}, 1}, - {{37, 60}, 1}, - {{37, 61}, 1}, - {{37, 62}, 1}, - {{37, 63}, 1}, - {{37, 64}, 1}, - {{37, 65}, 1}, - {{37, 66}, 1}, - {{37, 67}, 1}, - {{37, 68}, 1}, - {{37, 69}, 1}, - {{37, 70}, 1}, - {{37, 71}, 1}, - {{37, 72}, 1}, - {{37, 73}, 1}, - {{37, 74}, 1}, - {{37, 75}, 1}, - {{38, 59}, 1}, - {{38, 60}, 1}, - {{38, 61}, 1}, - {{38, 62}, 1}, - {{38, 63}, 1}, - {{38, 64}, 1}, - {{38, 65}, 1}, - {{38, 66}, 1}, - {{38, 67}, 1}, - {{38, 68}, 1}, - {{38, 69}, 1}, - {{38, 70}, 1}, - {{38, 71}, 1}, - {{38, 72}, 1}, - {{38, 73}, 1}, - {{38, 74}, 1}, - {{38, 75}, 1}, - {{38, 109}, 1}, - {{39, 59}, 1}, - {{39, 60}, 1}, - {{39, 61}, 1}, - {{39, 62}, 1}, - {{39, 63}, 1}, - {{39, 64}, 1}, - {{39, 65}, 1}, - {{39, 66}, 1}, - {{39, 67}, 1}, - {{39, 68}, 1}, - {{39, 69}, 1}, - {{39, 70}, 1}, - {{39, 71}, 1}, - {{39, 72}, 1}, - {{39, 73}, 1}, - {{39, 74}, 1}, - {{39, 75}, 1}, - {{39, 108}, 1}, - {{39, 109}, 1}, - {{39, 110}, 1}, - {{39, 111}, 1}, - {{40, 59}, 1}, - {{40, 60}, 1}, - {{40, 61}, 1}, - {{40, 62}, 1}, - {{40, 63}, 1}, - {{40, 64}, 1}, - {{40, 65}, 1}, - {{40, 66}, 1}, - {{40, 67}, 1}, - {{40, 68}, 1}, - {{40, 69}, 1}, - {{40, 70}, 1}, - {{40, 71}, 1}, - {{40, 72}, 1}, - {{40, 73}, 1}, - {{40, 74}, 1}, - {{40, 75}, 1}, - {{40, 108}, 1}, - {{40, 109}, 1}, - {{40, 110}, 1}, - {{40, 111}, 1}, - {{41, 90}, 1}, - {{41, 91}, 1}, - {{41, 92}, 1}, - {{41, 93}, 1}, - {{41, 94}, 1}, - {{41, 95}, 1}, - {{41, 96}, 1}, - {{41, 97}, 1}, - {{41, 98}, 1}, - {{41, 99}, 1}, - {{41, 100}, 1}, - {{41, 101}, 1}, - {{41, 102}, 1}, - {{41, 103}, 1}, - {{41, 104}, 1}, - {{41, 107}, 1}, - {{41, 108}, 1}, - {{41, 109}, 1}, - {{41, 110}, 1}, - {{41, 111}, 1}, - {{42, 59}, 1}, - {{42, 60}, 1}, - {{42, 61}, 1}, - {{42, 62}, 1}, - {{42, 63}, 1}, - {{42, 64}, 1}, - {{42, 65}, 1}, - {{42, 66}, 1}, - {{42, 67}, 1}, - {{42, 68}, 1}, - {{42, 69}, 1}, - {{42, 70}, 1}, - {{42, 71}, 1}, - {{42, 72}, 1}, - {{42, 73}, 1}, - {{42, 90}, 1}, - {{42, 91}, 1}, - {{42, 92}, 1}, - {{42, 93}, 1}, - {{42, 94}, 1}, - {{42, 95}, 1}, - {{42, 96}, 1}, - {{42, 97}, 1}, - {{42, 98}, 1}, - {{42, 99}, 1}, - {{42, 100}, 1}, - {{42, 101}, 1}, - {{42, 102}, 1}, - {{42, 103}, 1}, - {{42, 104}, 1}, - {{42, 106}, 1}, - {{42, 107}, 1}, - {{42, 108}, 1}, - {{42, 109}, 1}, - {{42, 110}, 1}, - {{43, 59}, 1}, - {{43, 60}, 1}, - {{43, 61}, 1}, - {{43, 62}, 1}, - {{43, 63}, 1}, - {{43, 64}, 1}, - {{43, 65}, 1}, - {{43, 66}, 1}, - {{43, 67}, 1}, - {{43, 68}, 1}, - {{43, 69}, 1}, - {{43, 70}, 1}, - {{43, 71}, 1}, - {{43, 72}, 1}, - {{43, 73}, 1}, - {{43, 74}, 1}, - {{43, 90}, 1}, - {{43, 91}, 1}, - {{43, 92}, 1}, - {{43, 93}, 1}, - {{43, 94}, 1}, - {{43, 95}, 1}, - {{43, 96}, 1}, - {{43, 97}, 1}, - {{43, 98}, 1}, - {{43, 99}, 1}, - {{43, 100}, 1}, - {{43, 101}, 1}, - {{43, 102}, 1}, - {{43, 103}, 1}, - {{43, 106}, 1}, - {{43, 107}, 1}, - {{43, 108}, 1}, - {{43, 109}, 1}, - {{43, 110}, 1}, - {{44, 59}, 1}, - {{44, 60}, 1}, - {{44, 61}, 1}, - {{44, 62}, 1}, - {{44, 63}, 1}, - {{44, 64}, 1}, - {{44, 65}, 1}, - {{44, 66}, 1}, - {{44, 67}, 1}, - {{44, 68}, 1}, - {{44, 69}, 1}, - {{44, 70}, 1}, - {{44, 71}, 1}, - {{44, 72}, 1}, - {{44, 73}, 1}, - {{44, 74}, 1}, - {{44, 90}, 1}, - {{44, 91}, 1}, - {{44, 92}, 1}, - {{44, 93}, 1}, - {{44, 94}, 1}, - {{44, 95}, 1}, - {{44, 96}, 1}, - {{44, 97}, 1}, - {{44, 98}, 1}, - {{44, 99}, 1}, - {{44, 100}, 1}, - {{44, 101}, 1}, - {{44, 102}, 1}, - {{44, 103}, 1}, - {{44, 105}, 1}, - {{44, 106}, 1}, - {{44, 107}, 1}, - {{44, 108}, 1}, - {{44, 109}, 1}, - {{45, 59}, 1}, - {{45, 60}, 1}, - {{45, 61}, 1}, - {{45, 62}, 1}, - {{45, 63}, 1}, - {{45, 64}, 1}, - {{45, 65}, 1}, - {{45, 66}, 1}, - {{45, 67}, 1}, - {{45, 68}, 1}, - {{45, 69}, 1}, - {{45, 70}, 1}, - {{45, 71}, 1}, - {{45, 72}, 1}, - {{45, 73}, 1}, - {{45, 74}, 1}, - {{45, 75}, 1}, - {{45, 90}, 1}, - {{45, 91}, 1}, - {{45, 92}, 1}, - {{45, 93}, 1}, - {{45, 105}, 1}, - {{45, 106}, 1}, - {{45, 107}, 1}, - {{45, 108}, 1}, - {{46, 72}, 1}, - {{46, 73}, 1}, - {{46, 74}, 1}, - {{46, 75}, 1}, - {{46, 76}, 1}, - {{46, 90}, 1}, - {{46, 91}, 1}, - {{46, 92}, 1}, - {{46, 93}, 1}, - {{46, 104}, 1}, - {{46, 105}, 1}, - {{46, 106}, 1}, - {{46, 107}, 1}, - {{46, 108}, 1}, - {{47, 49}, 2}, - {{47, 50}, 2}, - {{47, 51}, 3}, - {{47, 52}, 2}, - {{47, 53}, 3}, - {{47, 54}, 2}, - {{47, 55}, 3}, - {{47, 56}, 3}, - {{47, 57}, 2}, - {{47, 58}, 2}, - {{47, 59}, 3}, - {{47, 72}, 1}, - {{47, 73}, 1}, - {{47, 74}, 1}, - {{47, 75}, 1}, - {{47, 76}, 1}, - {{47, 90}, 1}, - {{47, 91}, 1}, - {{47, 92}, 1}, - {{47, 93}, 1}, - {{47, 103}, 1}, - {{47, 104}, 1}, - {{47, 105}, 1}, - {{47, 106}, 1}, - {{47, 107}, 1}, - {{48, 48}, 2}, - {{48, 49}, 2}, - {{48, 50}, 2}, - {{48, 51}, 2}, - {{48, 52}, 2}, - {{48, 53}, 2}, - {{48, 54}, 2}, - {{48, 55}, 2}, - {{48, 56}, 2}, - {{48, 57}, 3}, - {{48, 58}, 3}, - {{48, 59}, 3}, - {{48, 60}, 3}, - {{48, 73}, 1}, - {{48, 74}, 1}, - {{48, 75}, 1}, - {{48, 76}, 1}, - {{48, 77}, 1}, - {{48, 90}, 1}, - {{48, 91}, 1}, - {{48, 92}, 1}, - {{48, 93}, 1}, - {{48, 103}, 1}, - {{48, 104}, 1}, - {{48, 105}, 1}, - {{48, 106}, 1}, - {{48, 107}, 1}, - {{49, 47}, 2}, - {{49, 48}, 2}, - {{49, 49}, 2}, - {{49, 50}, 2}, - {{49, 51}, 2}, - {{49, 52}, 2}, - {{49, 53}, 3}, - {{49, 54}, 3}, - {{49, 55}, 3}, - {{49, 56}, 3}, - {{49, 74}, 1}, - {{49, 75}, 1}, - {{49, 76}, 1}, - {{49, 77}, 1}, - {{49, 90}, 1}, - {{49, 91}, 1}, - {{49, 92}, 1}, - {{49, 93}, 1}, - {{49, 94}, 1}, - {{49, 95}, 1}, - {{49, 96}, 1}, - {{49, 97}, 1}, - {{49, 98}, 1}, - {{49, 99}, 1}, - {{49, 100}, 1}, - {{49, 101}, 1}, - {{49, 102}, 1}, - {{49, 103}, 1}, - {{49, 104}, 1}, - {{49, 105}, 1}, - {{49, 106}, 1}, - {{50, 46}, 3}, - {{50, 47}, 2}, - {{50, 48}, 2}, - {{50, 49}, 2}, - {{50, 50}, 2}, - {{50, 51}, 3}, - {{50, 52}, 2}, - {{50, 53}, 2}, - {{50, 54}, 2}, - {{50, 55}, 3}, - {{50, 74}, 1}, - {{50, 75}, 1}, - {{50, 76}, 1}, - {{50, 77}, 1}, - {{50, 78}, 1}, - {{50, 90}, 1}, - {{50, 91}, 1}, - {{50, 92}, 1}, - {{50, 93}, 1}, - {{50, 94}, 1}, - {{50, 95}, 1}, - {{50, 96}, 1}, - {{50, 97}, 1}, - {{50, 98}, 1}, - {{50, 99}, 1}, - {{50, 100}, 1}, - {{50, 101}, 1}, - {{50, 102}, 1}, - {{50, 103}, 1}, - {{50, 104}, 1}, - {{50, 105}, 1}, - {{51, 46}, 3}, - {{51, 47}, 2}, - {{51, 48}, 3}, - {{51, 49}, 3}, - {{51, 50}, 2}, - {{51, 51}, 2}, - {{51, 52}, 3}, - {{51, 53}, 3}, - {{51, 54}, 3}, - {{51, 59}, 1}, - {{51, 60}, 1}, - {{51, 61}, 1}, - {{51, 62}, 1}, - {{51, 63}, 1}, - {{51, 64}, 1}, - {{51, 65}, 1}, - {{51, 66}, 1}, - {{51, 67}, 1}, - {{51, 68}, 1}, - {{51, 69}, 1}, - {{51, 70}, 1}, - {{51, 71}, 1}, - {{51, 72}, 1}, - {{51, 73}, 1}, - {{51, 74}, 1}, - {{51, 75}, 1}, - {{51, 76}, 1}, - {{51, 77}, 1}, - {{51, 78}, 1}, - {{51, 90}, 1}, - {{51, 91}, 1}, - {{51, 92}, 1}, - {{51, 93}, 1}, - {{51, 94}, 1}, - {{51, 95}, 1}, - {{51, 96}, 1}, - {{51, 97}, 1}, - {{51, 98}, 1}, - {{51, 99}, 1}, - {{51, 100}, 1}, - {{51, 101}, 1}, - {{51, 102}, 1}, - {{51, 103}, 1}, - {{51, 104}, 1}, - {{51, 105}, 1}, - {{52, 46}, 2}, - {{52, 47}, 2}, - {{52, 48}, 2}, - {{52, 49}, 3}, - {{52, 50}, 3}, - {{52, 51}, 2}, - {{52, 52}, 3}, - {{52, 59}, 1}, - {{52, 60}, 1}, - {{52, 61}, 1}, - {{52, 62}, 1}, - {{52, 63}, 1}, - {{52, 64}, 1}, - {{52, 65}, 1}, - {{52, 66}, 1}, - {{52, 67}, 1}, - {{52, 68}, 1}, - {{52, 69}, 1}, - {{52, 70}, 1}, - {{52, 71}, 1}, - {{52, 72}, 1}, - {{52, 73}, 1}, - {{52, 74}, 1}, - {{52, 75}, 1}, - {{52, 76}, 1}, - {{52, 77}, 1}, - {{52, 78}, 1}, - {{52, 79}, 1}, - {{52, 90}, 1}, - {{52, 91}, 1}, - {{52, 92}, 1}, - {{52, 93}, 1}, - {{52, 94}, 1}, - {{52, 95}, 1}, - {{52, 96}, 1}, - {{52, 97}, 1}, - {{52, 98}, 1}, - {{52, 99}, 1}, - {{52, 100}, 1}, - {{52, 101}, 1}, - {{52, 102}, 1}, - {{52, 103}, 1}, - {{52, 104}, 1}, - {{53, 45}, 2}, - {{53, 46}, 2}, - {{53, 47}, 2}, - {{53, 48}, 2}, - {{53, 49}, 2}, - {{53, 50}, 3}, - {{53, 51}, 3}, - {{53, 52}, 3}, - {{53, 59}, 1}, - {{53, 60}, 1}, - {{53, 61}, 1}, - {{53, 62}, 1}, - {{53, 63}, 1}, - {{53, 64}, 1}, - {{53, 65}, 1}, - {{53, 66}, 1}, - {{53, 67}, 1}, - {{53, 68}, 1}, - {{53, 69}, 1}, - {{53, 70}, 1}, - {{53, 71}, 1}, - {{53, 72}, 1}, - {{53, 73}, 1}, - {{53, 74}, 1}, - {{53, 75}, 1}, - {{53, 76}, 1}, - {{53, 77}, 1}, - {{53, 78}, 1}, - {{53, 79}, 1}, - {{53, 80}, 1}, - {{54, 44}, 2}, - {{54, 45}, 2}, - {{54, 46}, 2}, - {{54, 47}, 2}, - {{54, 48}, 3}, - {{54, 49}, 3}, - {{54, 50}, 3}, - {{54, 51}, 3}, - {{54, 52}, 1}, - {{54, 59}, 1}, - {{54, 60}, 1}, - {{54, 61}, 1}, - {{54, 62}, 1}, - {{54, 63}, 1}, - {{54, 64}, 1}, - {{54, 65}, 1}, - {{54, 66}, 1}, - {{54, 67}, 1}, - {{54, 68}, 1}, - {{54, 69}, 1}, - {{54, 70}, 1}, - {{54, 71}, 1}, - {{54, 72}, 1}, - {{54, 73}, 1}, - {{54, 74}, 1}, - {{54, 75}, 1}, - {{54, 76}, 1}, - {{54, 77}, 1}, - {{54, 78}, 1}, - {{54, 79}, 1}, - {{54, 80}, 1}, - {{55, 43}, 2}, - {{55, 44}, 2}, - {{55, 45}, 2}, - {{55, 46}, 2}, - {{55, 47}, 3}, - {{55, 48}, 3}, - {{55, 49}, 3}, - {{55, 50}, 1}, - {{55, 90}, 1}, - {{55, 91}, 1}, - {{55, 92}, 1}, - {{55, 93}, 1}, - {{55, 96}, 1}, - {{55, 97}, 1}, - {{55, 98}, 1}, - {{55, 99}, 1}, - {{55, 100}, 1}, - {{55, 101}, 1}, - {{55, 102}, 1}, - {{55, 103}, 1}, - {{55, 104}, 1}, - {{56, 43}, 2}, - {{56, 44}, 2}, - {{56, 45}, 2}, - {{56, 46}, 2}, - {{56, 47}, 3}, - {{56, 48}, 1}, - {{56, 49}, 3}, - {{56, 59}, 1}, - {{56, 60}, 1}, - {{56, 61}, 1}, - {{56, 62}, 1}, - {{56, 65}, 1}, - {{56, 66}, 1}, - {{56, 67}, 1}, - {{56, 68}, 1}, - {{56, 69}, 1}, - {{56, 70}, 1}, - {{56, 71}, 1}, - {{56, 72}, 1}, - {{56, 73}, 1}, - {{56, 90}, 1}, - {{56, 91}, 1}, - {{56, 92}, 1}, - {{56, 93}, 1}, - {{56, 96}, 1}, - {{56, 97}, 1}, - {{56, 98}, 1}, - {{56, 99}, 1}, - {{56, 100}, 1}, - {{56, 101}, 1}, - {{56, 102}, 1}, - {{56, 103}, 1}, - {{56, 104}, 1}, - {{56, 105}, 1}, - {{57, 42}, 2}, - {{57, 43}, 2}, - {{57, 44}, 2}, - {{57, 45}, 2}, - {{57, 46}, 3}, - {{57, 47}, 3}, - {{57, 48}, 3}, - {{57, 49}, 1}, - {{57, 59}, 1}, - {{57, 60}, 1}, - {{57, 61}, 1}, - {{57, 62}, 1}, - {{57, 65}, 1}, - {{57, 66}, 1}, - {{57, 67}, 1}, - {{57, 68}, 1}, - {{57, 69}, 1}, - {{57, 70}, 1}, - {{57, 71}, 1}, - {{57, 72}, 1}, - {{57, 73}, 1}, - {{57, 74}, 1}, - {{57, 90}, 1}, - {{57, 91}, 1}, - {{57, 92}, 1}, - {{57, 93}, 1}, - {{57, 96}, 1}, - {{57, 97}, 1}, - {{57, 98}, 1}, - {{57, 99}, 1}, - {{57, 100}, 1}, - {{57, 101}, 1}, - {{57, 102}, 1}, - {{57, 103}, 1}, - {{57, 104}, 1}, - {{57, 105}, 1}, - {{58, 42}, 2}, - {{58, 43}, 2}, - {{58, 44}, 2}, - {{58, 45}, 2}, - {{58, 46}, 3}, - {{58, 47}, 1}, - {{58, 48}, 1}, - {{58, 59}, 1}, - {{58, 60}, 1}, - {{58, 61}, 1}, - {{58, 62}, 1}, - {{58, 65}, 1}, - {{58, 66}, 1}, - {{58, 67}, 1}, - {{58, 68}, 1}, - {{58, 69}, 1}, - {{58, 70}, 1}, - {{58, 71}, 1}, - {{58, 72}, 1}, - {{58, 73}, 1}, - {{58, 74}, 1}, - {{58, 90}, 1}, - {{58, 91}, 1}, - {{58, 92}, 1}, - {{58, 93}, 1}, - {{58, 96}, 1}, - {{58, 97}, 1}, - {{58, 98}, 1}, - {{58, 99}, 1}, - {{58, 100}, 1}, - {{58, 101}, 1}, - {{58, 102}, 1}, - {{58, 103}, 1}, - {{58, 104}, 1}, - {{58, 105}, 1}, - {{58, 106}, 1}, - {{59, 41}, 2}, - {{59, 42}, 2}, - {{59, 43}, 2}, - {{59, 44}, 2}, - {{59, 45}, 3}, - {{59, 46}, 1}, - {{59, 47}, 3}, - {{59, 48}, 1}, - {{59, 59}, 1}, - {{59, 60}, 1}, - {{59, 61}, 1}, - {{59, 62}, 1}, - {{59, 65}, 1}, - {{59, 66}, 1}, - {{59, 67}, 1}, - {{59, 68}, 1}, - {{59, 69}, 1}, - {{59, 70}, 1}, - {{59, 71}, 1}, - {{59, 72}, 1}, - {{59, 73}, 1}, - {{59, 74}, 1}, - {{59, 75}, 1}, - {{59, 90}, 1}, - {{59, 91}, 1}, - {{59, 92}, 1}, - {{59, 93}, 1}, - {{59, 96}, 1}, - {{59, 97}, 1}, - {{59, 98}, 1}, - {{59, 99}, 1}, - {{59, 103}, 1}, - {{59, 104}, 1}, - {{59, 105}, 1}, - {{59, 106}, 1}, - {{59, 107}, 1}, - {{60, 38}, 3}, - {{60, 40}, 2}, - {{60, 41}, 2}, - {{60, 42}, 2}, - {{60, 43}, 2}, - {{60, 44}, 2}, - {{60, 45}, 3}, - {{60, 46}, 1}, - {{60, 47}, 1}, - {{60, 48}, 1}, - {{60, 59}, 1}, - {{60, 60}, 1}, - {{60, 61}, 1}, - {{60, 62}, 1}, - {{60, 65}, 1}, - {{60, 66}, 1}, - {{60, 67}, 1}, - {{60, 68}, 1}, - {{60, 72}, 1}, - {{60, 73}, 1}, - {{60, 74}, 1}, - {{60, 75}, 1}, - {{60, 90}, 1}, - {{60, 91}, 1}, - {{60, 92}, 1}, - {{60, 93}, 1}, - {{60, 96}, 1}, - {{60, 97}, 1}, - {{60, 98}, 1}, - {{60, 99}, 1}, - {{60, 103}, 1}, - {{60, 104}, 1}, - {{60, 105}, 1}, - {{60, 106}, 1}, - {{60, 107}, 1}, - {{61, 37}, 3}, - {{61, 38}, 3}, - {{61, 39}, 3}, - {{61, 40}, 3}, - {{61, 41}, 2}, - {{61, 42}, 2}, - {{61, 43}, 2}, - {{61, 44}, 2}, - {{61, 45}, 3}, - {{61, 46}, 1}, - {{61, 47}, 1}, - {{61, 48}, 1}, - {{61, 59}, 1}, - {{61, 60}, 1}, - {{61, 61}, 1}, - {{61, 62}, 1}, - {{61, 65}, 1}, - {{61, 66}, 1}, - {{61, 67}, 1}, - {{61, 68}, 1}, - {{61, 72}, 1}, - {{61, 73}, 1}, - {{61, 74}, 1}, - {{61, 75}, 1}, - {{61, 76}, 1}, - {{61, 90}, 1}, - {{61, 91}, 1}, - {{61, 92}, 1}, - {{61, 93}, 1}, - {{61, 96}, 1}, - {{61, 97}, 1}, - {{61, 98}, 1}, - {{61, 99}, 1}, - {{61, 104}, 1}, - {{61, 105}, 1}, - {{61, 106}, 1}, - {{61, 107}, 1}, - {{61, 108}, 1}, - {{62, 36}, 3}, - {{62, 37}, 2}, - {{62, 38}, 3}, - {{62, 39}, 2}, - {{62, 40}, 2}, - {{62, 41}, 3}, - {{62, 42}, 2}, - {{62, 43}, 2}, - {{62, 44}, 2}, - {{62, 45}, 1}, - {{62, 46}, 3}, - {{62, 47}, 1}, - {{62, 48}, 1}, - {{62, 59}, 1}, - {{62, 60}, 1}, - {{62, 61}, 1}, - {{62, 62}, 1}, - {{62, 65}, 1}, - {{62, 66}, 1}, - {{62, 67}, 1}, - {{62, 68}, 1}, - {{62, 73}, 1}, - {{62, 74}, 1}, - {{62, 75}, 1}, - {{62, 76}, 1}, - {{62, 77}, 1}, - {{62, 90}, 1}, - {{62, 91}, 1}, - {{62, 92}, 1}, - {{62, 93}, 1}, - {{62, 96}, 1}, - {{62, 97}, 1}, - {{62, 98}, 1}, - {{62, 99}, 1}, - {{62, 105}, 1}, - {{62, 106}, 1}, - {{62, 107}, 1}, - {{62, 108}, 1}, - {{63, 36}, 3}, - {{63, 37}, 2}, - {{63, 38}, 2}, - {{63, 39}, 2}, - {{63, 40}, 2}, - {{63, 41}, 3}, - {{63, 42}, 2}, - {{63, 43}, 2}, - {{63, 44}, 1}, - {{63, 45}, 3}, - {{63, 46}, 1}, - {{63, 47}, 1}, - {{63, 59}, 1}, - {{63, 60}, 1}, - {{63, 61}, 1}, - {{63, 62}, 1}, - {{63, 65}, 1}, - {{63, 66}, 1}, - {{63, 67}, 1}, - {{63, 68}, 1}, - {{63, 73}, 1}, - {{63, 74}, 1}, - {{63, 75}, 1}, - {{63, 76}, 1}, - {{63, 77}, 1}, - {{63, 90}, 1}, - {{63, 91}, 1}, - {{63, 92}, 1}, - {{63, 93}, 1}, - {{63, 96}, 1}, - {{63, 97}, 1}, - {{63, 98}, 1}, - {{63, 99}, 1}, - {{63, 105}, 1}, - {{63, 106}, 1}, - {{63, 107}, 1}, - {{63, 108}, 1}, - {{63, 109}, 1}, - {{64, 34}, 2}, - {{64, 35}, 2}, - {{64, 36}, 2}, - {{64, 37}, 2}, - {{64, 38}, 2}, - {{64, 39}, 2}, - {{64, 40}, 3}, - {{64, 41}, 3}, - {{64, 42}, 3}, - {{64, 43}, 2}, - {{64, 44}, 1}, - {{64, 45}, 3}, - {{64, 46}, 1}, - {{64, 59}, 1}, - {{64, 60}, 1}, - {{64, 61}, 1}, - {{64, 62}, 1}, - {{64, 65}, 1}, - {{64, 66}, 1}, - {{64, 67}, 1}, - {{64, 68}, 1}, - {{64, 74}, 1}, - {{64, 75}, 1}, - {{64, 76}, 1}, - {{64, 77}, 1}, - {{64, 78}, 1}, - {{64, 90}, 1}, - {{64, 91}, 1}, - {{64, 92}, 1}, - {{64, 93}, 1}, - {{64, 96}, 1}, - {{64, 97}, 1}, - {{64, 98}, 1}, - {{64, 99}, 1}, - {{64, 106}, 1}, - {{64, 107}, 1}, - {{64, 108}, 1}, - {{64, 109}, 1}, - {{64, 110}, 1}, - {{65, 33}, 2}, - {{65, 34}, 2}, - {{65, 35}, 2}, - {{65, 36}, 2}, - {{65, 37}, 2}, - {{65, 38}, 2}, - {{65, 39}, 2}, - {{65, 40}, 3}, - {{65, 41}, 3}, - {{65, 42}, 3}, - {{65, 43}, 3}, - {{65, 44}, 1}, - {{65, 45}, 1}, - {{65, 46}, 1}, - {{65, 59}, 1}, - {{65, 60}, 1}, - {{65, 61}, 1}, - {{65, 62}, 1}, - {{65, 65}, 1}, - {{65, 66}, 1}, - {{65, 67}, 1}, - {{65, 68}, 1}, - {{65, 75}, 1}, - {{65, 76}, 1}, - {{65, 77}, 1}, - {{65, 78}, 1}, - {{65, 90}, 1}, - {{65, 91}, 1}, - {{65, 92}, 1}, - {{65, 93}, 1}, - {{65, 96}, 1}, - {{65, 97}, 1}, - {{65, 98}, 1}, - {{65, 99}, 1}, - {{65, 106}, 1}, - {{65, 107}, 1}, - {{65, 108}, 1}, - {{65, 109}, 1}, - {{65, 110}, 1}, - {{66, 33}, 2}, - {{66, 34}, 2}, - {{66, 35}, 2}, - {{66, 36}, 2}, - {{66, 37}, 2}, - {{66, 38}, 2}, - {{66, 39}, 2}, - {{66, 40}, 3}, - {{66, 41}, 1}, - {{66, 42}, 1}, - {{66, 43}, 3}, - {{66, 44}, 1}, - {{66, 45}, 3}, - {{66, 46}, 1}, - {{66, 50}, 3}, - {{66, 52}, 2}, - {{66, 54}, 2}, - {{66, 56}, 1}, - {{66, 59}, 1}, - {{66, 60}, 1}, - {{66, 61}, 1}, - {{66, 62}, 1}, - {{66, 65}, 1}, - {{66, 66}, 1}, - {{66, 67}, 1}, - {{66, 68}, 1}, - {{66, 75}, 1}, - {{66, 76}, 1}, - {{66, 77}, 1}, - {{66, 78}, 1}, - {{66, 79}, 1}, - {{66, 90}, 1}, - {{66, 91}, 1}, - {{66, 92}, 1}, - {{66, 93}, 1}, - {{66, 96}, 1}, - {{66, 97}, 1}, - {{66, 98}, 1}, - {{66, 99}, 1}, - {{66, 107}, 1}, - {{66, 108}, 1}, - {{66, 109}, 1}, - {{66, 110}, 1}, - {{66, 111}, 1}, - {{67, 33}, 2}, - {{67, 34}, 2}, - {{67, 35}, 2}, - {{67, 36}, 2}, - {{67, 37}, 2}, - {{67, 38}, 2}, - {{67, 39}, 2}, - {{67, 40}, 3}, - {{67, 41}, 1}, - {{67, 42}, 1}, - {{67, 43}, 1}, - {{67, 44}, 1}, - {{67, 45}, 1}, - {{67, 50}, 2}, - {{67, 51}, 2}, - {{67, 52}, 2}, - {{67, 53}, 3}, - {{67, 54}, 3}, - {{67, 55}, 3}, - {{67, 59}, 1}, - {{67, 60}, 1}, - {{67, 61}, 1}, - {{67, 62}, 1}, - {{67, 65}, 1}, - {{67, 66}, 1}, - {{67, 67}, 1}, - {{67, 68}, 1}, - {{67, 76}, 1}, - {{67, 77}, 1}, - {{67, 78}, 1}, - {{67, 79}, 1}, - {{67, 80}, 1}, - {{67, 107}, 1}, - {{67, 108}, 1}, - {{67, 109}, 1}, - {{67, 110}, 1}, - {{67, 111}, 1}, - {{68, 34}, 2}, - {{68, 35}, 2}, - {{68, 36}, 2}, - {{68, 37}, 2}, - {{68, 38}, 2}, - {{68, 39}, 3}, - {{68, 40}, 3}, - {{68, 41}, 3}, - {{68, 42}, 1}, - {{68, 43}, 1}, - {{68, 44}, 1}, - {{68, 50}, 2}, - {{68, 51}, 1}, - {{68, 52}, 1}, - {{68, 59}, 1}, - {{68, 60}, 1}, - {{68, 61}, 1}, - {{68, 62}, 1}, - {{68, 65}, 1}, - {{68, 66}, 1}, - {{68, 67}, 1}, - {{68, 68}, 1}, - {{68, 76}, 1}, - {{68, 77}, 1}, - {{68, 78}, 1}, - {{68, 79}, 1}, - {{68, 80}, 1}, - {{68, 108}, 1}, - {{68, 109}, 1}, - {{68, 110}, 1}, - {{68, 111}, 1}, - {{69, 34}, 2}, - {{69, 35}, 2}, - {{69, 36}, 2}, - {{69, 37}, 2}, - {{69, 38}, 2}, - {{69, 39}, 3}, - {{69, 40}, 1}, - {{69, 41}, 3}, - {{69, 42}, 1}, - {{69, 43}, 1}, - {{69, 44}, 1}, - {{69, 50}, 3}, - {{69, 51}, 3}, - {{69, 52}, 1}, - {{69, 77}, 1}, - {{69, 78}, 1}, - {{69, 79}, 1}, - {{69, 80}, 1}, - {{69, 90}, 1}, - {{69, 91}, 1}, - {{69, 92}, 1}, - {{69, 93}, 1}, - {{69, 94}, 1}, - {{69, 95}, 1}, - {{69, 96}, 1}, - {{69, 97}, 1}, - {{69, 98}, 1}, - {{69, 99}, 1}, - {{69, 100}, 1}, - {{69, 101}, 1}, - {{69, 102}, 1}, - {{69, 103}, 1}, - {{69, 104}, 1}, - {{69, 105}, 1}, - {{69, 106}, 1}, - {{69, 109}, 1}, - {{70, 34}, 2}, - {{70, 35}, 2}, - {{70, 36}, 2}, - {{70, 37}, 2}, - {{70, 38}, 2}, - {{70, 39}, 3}, - {{70, 40}, 3}, - {{70, 41}, 3}, - {{70, 42}, 1}, - {{70, 43}, 1}, - {{70, 44}, 1}, - {{70, 50}, 2}, - {{70, 51}, 1}, - {{70, 52}, 1}, - {{70, 53}, 1}, - {{70, 56}, 2}, - {{70, 57}, 2}, - {{70, 58}, 2}, - {{70, 59}, 2}, - {{70, 60}, 2}, - {{70, 61}, 2}, - {{70, 62}, 3}, - {{70, 78}, 1}, - {{70, 90}, 1}, - {{70, 91}, 1}, - {{70, 92}, 1}, - {{70, 93}, 1}, - {{70, 94}, 1}, - {{70, 95}, 1}, - {{70, 96}, 1}, - {{70, 97}, 1}, - {{70, 98}, 1}, - {{70, 99}, 1}, - {{70, 100}, 1}, - {{70, 101}, 1}, - {{70, 102}, 1}, - {{70, 103}, 1}, - {{70, 104}, 1}, - {{70, 105}, 1}, - {{70, 106}, 1}, - {{71, 34}, 2}, - {{71, 35}, 2}, - {{71, 36}, 2}, - {{71, 37}, 2}, - {{71, 38}, 3}, - {{71, 39}, 3}, - {{71, 40}, 1}, - {{71, 41}, 1}, - {{71, 42}, 1}, - {{71, 43}, 1}, - {{71, 50}, 2}, - {{71, 51}, 3}, - {{71, 52}, 3}, - {{71, 53}, 1}, - {{71, 54}, 1}, - {{71, 55}, 1}, - {{71, 56}, 2}, - {{71, 57}, 3}, - {{71, 58}, 3}, - {{71, 59}, 1}, - {{71, 90}, 1}, - {{71, 91}, 1}, - {{71, 92}, 1}, - {{71, 93}, 1}, - {{71, 94}, 1}, - {{71, 95}, 1}, - {{71, 96}, 1}, - {{71, 97}, 1}, - {{71, 98}, 1}, - {{71, 99}, 1}, - {{71, 100}, 1}, - {{71, 101}, 1}, - {{71, 102}, 1}, - {{71, 103}, 1}, - {{71, 104}, 1}, - {{71, 105}, 1}, - {{71, 106}, 1}, - {{72, 34}, 2}, - {{72, 35}, 2}, - {{72, 36}, 2}, - {{72, 37}, 2}, - {{72, 38}, 3}, - {{72, 39}, 3}, - {{72, 40}, 3}, - {{72, 41}, 3}, - {{72, 42}, 1}, - {{72, 50}, 2}, - {{72, 51}, 1}, - {{72, 52}, 1}, - {{72, 53}, 3}, - {{72, 54}, 1}, - {{72, 55}, 3}, - {{72, 56}, 3}, - {{72, 57}, 1}, - {{72, 58}, 3}, - {{72, 90}, 1}, - {{72, 91}, 1}, - {{72, 92}, 1}, - {{72, 93}, 1}, - {{72, 94}, 1}, - {{72, 95}, 1}, - {{72, 96}, 1}, - {{72, 97}, 1}, - {{72, 98}, 1}, - {{72, 99}, 1}, - {{72, 100}, 1}, - {{72, 101}, 1}, - {{72, 102}, 1}, - {{72, 103}, 1}, - {{72, 104}, 1}, - {{72, 105}, 1}, - {{72, 106}, 1}, - {{73, 34}, 2}, - {{73, 35}, 2}, - {{73, 36}, 2}, - {{73, 37}, 2}, - {{73, 38}, 3}, - {{73, 39}, 3}, - {{73, 40}, 3}, - {{73, 41}, 1}, - {{73, 42}, 1}, - {{73, 50}, 2}, - {{73, 51}, 2}, - {{73, 52}, 3}, - {{73, 53}, 3}, - {{73, 54}, 3}, - {{73, 55}, 1}, - {{73, 56}, 3}, - {{73, 57}, 3}, - {{73, 90}, 1}, - {{73, 91}, 1}, - {{73, 92}, 1}, - {{73, 93}, 1}, - {{73, 96}, 1}, - {{73, 97}, 1}, - {{73, 98}, 1}, - {{73, 99}, 1}, - {{74, 34}, 2}, - {{74, 35}, 2}, - {{74, 36}, 2}, - {{74, 37}, 2}, - {{74, 38}, 3}, - {{74, 39}, 3}, - {{74, 40}, 3}, - {{74, 41}, 3}, - {{74, 42}, 1}, - {{74, 50}, 2}, - {{74, 51}, 1}, - {{74, 52}, 1}, - {{74, 53}, 3}, - {{74, 54}, 1}, - {{74, 55}, 1}, - {{74, 56}, 1}, - {{74, 57}, 1}, - {{74, 58}, 3}, - {{74, 90}, 1}, - {{74, 91}, 1}, - {{74, 92}, 1}, - {{74, 93}, 1}, - {{74, 96}, 1}, - {{74, 97}, 1}, - {{74, 98}, 1}, - {{74, 99}, 1}, - {{75, 34}, 2}, - {{75, 35}, 2}, - {{75, 36}, 2}, - {{75, 37}, 2}, - {{75, 38}, 3}, - {{75, 39}, 3}, - {{75, 40}, 3}, - {{75, 41}, 1}, - {{75, 42}, 3}, - {{75, 49}, 3}, - {{75, 50}, 2}, - {{75, 51}, 3}, - {{75, 52}, 1}, - {{75, 53}, 1}, - {{75, 54}, 3}, - {{75, 55}, 1}, - {{75, 56}, 1}, - {{75, 57}, 1}, - {{75, 58}, 1}, - {{75, 90}, 1}, - {{75, 91}, 1}, - {{75, 92}, 1}, - {{75, 93}, 1}, - {{75, 96}, 1}, - {{75, 97}, 1}, - {{75, 98}, 1}, - {{75, 99}, 1}, - {{76, 34}, 2}, - {{76, 35}, 2}, - {{76, 36}, 2}, - {{76, 37}, 2}, - {{76, 38}, 3}, - {{76, 39}, 3}, - {{76, 40}, 3}, - {{76, 41}, 3}, - {{76, 42}, 1}, - {{76, 48}, 2}, - {{76, 49}, 3}, - {{76, 50}, 2}, - {{76, 51}, 3}, - {{76, 52}, 1}, - {{76, 53}, 3}, - {{76, 54}, 1}, - {{76, 55}, 1}, - {{76, 56}, 1}, - {{76, 57}, 1}, - {{76, 58}, 3}, - {{76, 90}, 1}, - {{76, 91}, 1}, - {{76, 92}, 1}, - {{76, 93}, 1}, - {{76, 96}, 1}, - {{76, 97}, 1}, - {{76, 98}, 1}, - {{76, 99}, 1}, - {{77, 35}, 2}, - {{77, 36}, 2}, - {{77, 37}, 2}, - {{77, 38}, 3}, - {{77, 39}, 1}, - {{77, 40}, 3}, - {{77, 41}, 1}, - {{77, 42}, 1}, - {{77, 43}, 1}, - {{77, 47}, 2}, - {{77, 48}, 2}, - {{77, 49}, 3}, - {{77, 50}, 3}, - {{77, 51}, 3}, - {{77, 52}, 3}, - {{77, 53}, 1}, - {{77, 54}, 1}, - {{77, 55}, 1}, - {{77, 56}, 1}, - {{77, 57}, 1}, - {{77, 58}, 1}, - {{77, 90}, 1}, - {{77, 91}, 1}, - {{77, 92}, 1}, - {{77, 93}, 1}, - {{77, 94}, 1}, - {{77, 95}, 1}, - {{77, 96}, 1}, - {{77, 97}, 1}, - {{77, 98}, 1}, - {{77, 99}, 1}, - {{77, 100}, 1}, - {{77, 101}, 1}, - {{77, 102}, 1}, - {{77, 103}, 1}, - {{77, 104}, 1}, - {{77, 105}, 1}, - {{77, 106}, 1}, - {{78, 34}, 2}, - {{78, 35}, 2}, - {{78, 36}, 1}, - {{78, 37}, 1}, - {{78, 38}, 3}, - {{78, 39}, 3}, - {{78, 40}, 3}, - {{78, 41}, 3}, - {{78, 42}, 3}, - {{78, 43}, 3}, - {{78, 44}, 1}, - {{78, 46}, 3}, - {{78, 47}, 2}, - {{78, 48}, 2}, - {{78, 49}, 2}, - {{78, 50}, 3}, - {{78, 51}, 3}, - {{78, 52}, 1}, - {{78, 53}, 1}, - {{78, 54}, 1}, - {{78, 55}, 1}, - {{78, 56}, 1}, - {{78, 57}, 1}, - {{78, 58}, 1}, - {{78, 90}, 1}, - {{78, 91}, 1}, - {{78, 92}, 1}, - {{78, 93}, 1}, - {{78, 94}, 1}, - {{78, 95}, 1}, - {{78, 96}, 1}, - {{78, 97}, 1}, - {{78, 98}, 1}, - {{78, 99}, 1}, - {{78, 100}, 1}, - {{78, 101}, 1}, - {{78, 102}, 1}, - {{78, 103}, 1}, - {{78, 104}, 1}, - {{78, 105}, 1}, - {{78, 106}, 1}, - {{79, 35}, 1}, - {{79, 36}, 2}, - {{79, 37}, 3}, - {{79, 38}, 3}, - {{79, 39}, 1}, - {{79, 40}, 1}, - {{79, 41}, 3}, - {{79, 42}, 1}, - {{79, 43}, 3}, - {{79, 44}, 2}, - {{79, 45}, 3}, - {{79, 46}, 3}, - {{79, 47}, 2}, - {{79, 48}, 2}, - {{79, 49}, 3}, - {{79, 50}, 3}, - {{79, 51}, 1}, - {{79, 52}, 1}, - {{79, 53}, 1}, - {{79, 54}, 1}, - {{79, 55}, 1}, - {{79, 56}, 1}, - {{79, 57}, 1}, - {{79, 58}, 1}, - {{79, 59}, 1}, - {{79, 90}, 1}, - {{79, 91}, 1}, - {{79, 92}, 1}, - {{79, 93}, 1}, - {{79, 94}, 1}, - {{79, 95}, 1}, - {{79, 96}, 1}, - {{79, 97}, 1}, - {{79, 98}, 1}, - {{79, 99}, 1}, - {{79, 100}, 1}, - {{79, 101}, 1}, - {{79, 102}, 1}, - {{79, 103}, 1}, - {{79, 104}, 1}, - {{79, 105}, 1}, - {{79, 106}, 1}, - {{80, 34}, 1}, - {{80, 35}, 3}, - {{80, 36}, 3}, - {{80, 37}, 3}, - {{80, 38}, 2}, - {{80, 39}, 2}, - {{80, 40}, 2}, - {{80, 41}, 2}, - {{80, 42}, 2}, - {{80, 43}, 2}, - {{80, 44}, 1}, - {{80, 45}, 3}, - {{80, 46}, 3}, - {{80, 47}, 2}, - {{80, 48}, 2}, - {{80, 49}, 3}, - {{80, 50}, 3}, - {{80, 51}, 1}, - {{80, 52}, 3}, - {{80, 53}, 1}, - {{80, 54}, 1}, - {{80, 55}, 1}, - {{80, 56}, 1}, - {{80, 57}, 1}, - {{80, 58}, 1}, - {{80, 90}, 1}, - {{80, 91}, 1}, - {{80, 92}, 1}, - {{80, 93}, 1}, - {{80, 94}, 1}, - {{80, 95}, 1}, - {{80, 96}, 1}, - {{80, 97}, 1}, - {{80, 98}, 1}, - {{80, 99}, 1}, - {{80, 100}, 1}, - {{80, 101}, 1}, - {{80, 102}, 1}, - {{80, 103}, 1}, - {{80, 104}, 1}, - {{80, 105}, 1}, - {{80, 106}, 1}, - {{81, 33}, 2}, - {{81, 34}, 2}, - {{81, 35}, 2}, - {{81, 36}, 2}, - {{81, 37}, 2}, - {{81, 38}, 2}, - {{81, 39}, 2}, - {{81, 40}, 3}, - {{81, 41}, 3}, - {{81, 42}, 3}, - {{81, 43}, 3}, - {{81, 44}, 2}, - {{81, 45}, 2}, - {{81, 46}, 2}, - {{81, 47}, 2}, - {{81, 48}, 3}, - {{81, 49}, 3}, - {{81, 50}, 3}, - {{81, 51}, 3}, - {{81, 52}, 1}, - {{81, 53}, 1}, - {{81, 54}, 1}, - {{81, 55}, 1}, - {{81, 56}, 1}, - {{81, 57}, 1}, - {{81, 58}, 1}, - {{81, 59}, 1}, - {{82, 31}, 2}, - {{82, 32}, 2}, - {{82, 33}, 3}, - {{82, 34}, 3}, - {{82, 35}, 2}, - {{82, 36}, 3}, - {{82, 37}, 3}, - {{82, 38}, 2}, - {{82, 39}, 2}, - {{82, 40}, 2}, - {{82, 41}, 2}, - {{82, 42}, 2}, - {{82, 43}, 2}, - {{82, 44}, 2}, - {{82, 45}, 2}, - {{82, 46}, 3}, - {{82, 47}, 2}, - {{82, 48}, 3}, - {{82, 49}, 3}, - {{82, 50}, 3}, - {{82, 51}, 1}, - {{82, 52}, 3}, - {{82, 53}, 1}, - {{82, 54}, 1}, - {{82, 55}, 1}, - {{82, 56}, 3}, - {{82, 57}, 3}, - {{82, 58}, 1}, - {{82, 59}, 1}, - {{83, 30}, 2}, - {{83, 31}, 2}, - {{83, 32}, 2}, - {{83, 33}, 2}, - {{83, 34}, 3}, - {{83, 35}, 2}, - {{83, 36}, 2}, - {{83, 37}, 3}, - {{83, 38}, 2}, - {{83, 39}, 2}, - {{83, 40}, 2}, - {{83, 41}, 2}, - {{83, 42}, 2}, - {{83, 43}, 2}, - {{83, 44}, 3}, - {{83, 45}, 2}, - {{83, 46}, 3}, - {{83, 47}, 3}, - {{83, 48}, 3}, - {{83, 49}, 3}, - {{83, 50}, 3}, - {{83, 51}, 1}, - {{83, 52}, 3}, - {{83, 53}, 1}, - {{83, 54}, 2}, - {{83, 55}, 2}, - {{83, 56}, 1}, - {{83, 57}, 1}, - {{83, 58}, 1}, - {{83, 59}, 1}, - {{83, 90}, 1}, - {{83, 91}, 1}, - {{83, 92}, 1}, - {{83, 93}, 1}, - {{84, 24}, 1}, - {{84, 30}, 2}, - {{84, 31}, 2}, - {{84, 32}, 2}, - {{84, 33}, 2}, - {{84, 34}, 2}, - {{84, 35}, 2}, - {{84, 36}, 2}, - {{84, 37}, 2}, - {{84, 38}, 3}, - {{84, 39}, 2}, - {{84, 40}, 2}, - {{84, 41}, 2}, - {{84, 42}, 2}, - {{84, 43}, 2}, - {{84, 44}, 2}, - {{84, 45}, 2}, - {{84, 46}, 3}, - {{84, 47}, 3}, - {{84, 48}, 3}, - {{84, 49}, 3}, - {{84, 50}, 2}, - {{84, 51}, 2}, - {{84, 52}, 2}, - {{84, 53}, 2}, - {{84, 54}, 3}, - {{84, 55}, 3}, - {{84, 56}, 1}, - {{84, 57}, 1}, - {{84, 58}, 1}, - {{84, 90}, 1}, - {{84, 91}, 1}, - {{84, 92}, 1}, - {{84, 93}, 1}, - {{85, 23}, 3}, - {{85, 24}, 2}, - {{85, 25}, 2}, - {{85, 26}, 2}, - {{85, 27}, 3}, - {{85, 28}, 2}, - {{85, 29}, 2}, - {{85, 30}, 2}, - {{85, 31}, 2}, - {{85, 32}, 2}, - {{85, 33}, 2}, - {{85, 34}, 2}, - {{85, 35}, 2}, - {{85, 36}, 2}, - {{85, 37}, 2}, - {{85, 38}, 3}, - {{85, 39}, 3}, - {{85, 40}, 2}, - {{85, 41}, 2}, - {{85, 42}, 3}, - {{85, 43}, 3}, - {{85, 44}, 3}, - {{85, 45}, 3}, - {{85, 46}, 3}, - {{85, 47}, 3}, - {{85, 48}, 3}, - {{85, 49}, 3}, - {{85, 50}, 3}, - {{85, 51}, 3}, - {{85, 52}, 2}, - {{85, 53}, 3}, - {{85, 54}, 3}, - {{85, 55}, 1}, - {{85, 56}, 1}, - {{85, 57}, 1}, - {{85, 58}, 1}, - {{85, 59}, 1}, - {{85, 90}, 1}, - {{85, 91}, 1}, - {{85, 92}, 1}, - {{85, 93}, 1}, - {{86, 18}, 3}, - {{86, 20}, 1}, - {{86, 22}, 3}, - {{86, 23}, 2}, - {{86, 24}, 2}, - {{86, 25}, 2}, - {{86, 26}, 2}, - {{86, 27}, 3}, - {{86, 28}, 2}, - {{86, 29}, 2}, - {{86, 30}, 2}, - {{86, 31}, 2}, - {{86, 32}, 2}, - {{86, 33}, 2}, - {{86, 34}, 2}, - {{86, 35}, 2}, - {{86, 36}, 3}, - {{86, 37}, 3}, - {{86, 38}, 3}, - {{86, 39}, 3}, - {{86, 40}, 3}, - {{86, 41}, 2}, - {{86, 42}, 3}, - {{86, 43}, 2}, - {{86, 44}, 2}, - {{86, 45}, 3}, - {{86, 46}, 3}, - {{86, 47}, 3}, - {{86, 48}, 3}, - {{86, 49}, 2}, - {{86, 50}, 3}, - {{86, 51}, 2}, - {{86, 52}, 2}, - {{86, 53}, 2}, - {{86, 54}, 3}, - {{86, 55}, 1}, - {{86, 56}, 1}, - {{86, 57}, 1}, - {{86, 58}, 1}, - {{86, 59}, 1}, - {{86, 60}, 1}, - {{86, 90}, 1}, - {{86, 91}, 1}, - {{86, 92}, 1}, - {{86, 93}, 1}, - {{87, 17}, 3}, - {{87, 18}, 3}, - {{87, 19}, 3}, - {{87, 20}, 3}, - {{87, 21}, 3}, - {{87, 22}, 3}, - {{87, 23}, 2}, - {{87, 24}, 2}, - {{87, 25}, 2}, - {{87, 26}, 2}, - {{87, 27}, 3}, - {{87, 28}, 2}, - {{87, 29}, 2}, - {{87, 30}, 2}, - {{87, 31}, 2}, - {{87, 32}, 2}, - {{87, 33}, 2}, - {{87, 34}, 2}, - {{87, 35}, 2}, - {{87, 36}, 3}, - {{87, 37}, 3}, - {{87, 38}, 3}, - {{87, 39}, 3}, - {{87, 40}, 3}, - {{87, 41}, 3}, - {{87, 42}, 2}, - {{87, 43}, 3}, - {{87, 44}, 1}, - {{87, 45}, 3}, - {{87, 46}, 1}, - {{87, 47}, 3}, - {{87, 48}, 3}, - {{87, 49}, 2}, - {{87, 50}, 2}, - {{87, 51}, 2}, - {{87, 52}, 2}, - {{87, 53}, 2}, - {{87, 54}, 3}, - {{87, 55}, 3}, - {{87, 56}, 1}, - {{87, 57}, 1}, - {{87, 58}, 1}, - {{87, 59}, 1}, - {{87, 60}, 1}, - {{87, 61}, 3}, - {{87, 67}, 3}, - {{87, 90}, 1}, - {{87, 91}, 1}, - {{87, 92}, 1}, - {{87, 93}, 1}, - {{88, 16}, 3}, - {{88, 17}, 2}, - {{88, 18}, 2}, - {{88, 19}, 3}, - {{88, 20}, 1}, - {{88, 21}, 3}, - {{88, 22}, 2}, - {{88, 23}, 2}, - {{88, 24}, 2}, - {{88, 25}, 2}, - {{88, 26}, 2}, - {{88, 27}, 2}, - {{88, 28}, 3}, - {{88, 29}, 3}, - {{88, 30}, 2}, - {{88, 31}, 2}, - {{88, 32}, 2}, - {{88, 33}, 3}, - {{88, 34}, 2}, - {{88, 35}, 3}, - {{88, 36}, 3}, - {{88, 37}, 1}, - {{88, 38}, 3}, - {{88, 39}, 1}, - {{88, 40}, 3}, - {{88, 41}, 2}, - {{88, 42}, 3}, - {{88, 43}, 3}, - {{88, 44}, 3}, - {{88, 45}, 3}, - {{88, 46}, 3}, - {{88, 47}, 3}, - {{88, 48}, 3}, - {{88, 49}, 2}, - {{88, 50}, 2}, - {{88, 51}, 2}, - {{88, 52}, 2}, - {{88, 53}, 2}, - {{88, 54}, 2}, - {{88, 55}, 3}, - {{88, 56}, 3}, - {{88, 57}, 1}, - {{88, 58}, 3}, - {{88, 59}, 1}, - {{88, 60}, 1}, - {{88, 61}, 1}, - {{88, 62}, 3}, - {{88, 66}, 3}, - {{88, 90}, 1}, - {{88, 91}, 1}, - {{88, 92}, 1}, - {{88, 93}, 1}, - {{88, 94}, 1}, - {{88, 95}, 1}, - {{88, 96}, 1}, - {{88, 97}, 1}, - {{88, 98}, 1}, - {{88, 99}, 1}, - {{88, 100}, 1}, - {{88, 101}, 1}, - {{88, 102}, 1}, - {{88, 103}, 1}, - {{88, 104}, 1}, - {{88, 105}, 1}, - {{88, 106}, 1}, - {{89, 16}, 2}, - {{89, 17}, 2}, - {{89, 18}, 3}, - {{89, 19}, 1}, - {{89, 20}, 3}, - {{89, 21}, 3}, - {{89, 22}, 2}, - {{89, 23}, 2}, - {{89, 24}, 2}, - {{89, 25}, 2}, - {{89, 26}, 2}, - {{89, 27}, 3}, - {{89, 28}, 3}, - {{89, 29}, 3}, - {{89, 30}, 2}, - {{89, 31}, 2}, - {{89, 32}, 2}, - {{89, 33}, 3}, - {{89, 34}, 3}, - {{89, 35}, 3}, - {{89, 36}, 2}, - {{89, 37}, 3}, - {{89, 38}, 3}, - {{89, 39}, 3}, - {{89, 40}, 3}, - {{89, 41}, 3}, - {{89, 42}, 3}, - {{89, 43}, 3}, - {{89, 44}, 1}, - {{89, 45}, 1}, - {{89, 46}, 1}, - {{89, 47}, 3}, - {{89, 48}, 2}, - {{89, 49}, 2}, - {{89, 50}, 2}, - {{89, 51}, 2}, - {{89, 52}, 2}, - {{89, 53}, 3}, - {{89, 54}, 3}, - {{89, 55}, 3}, - {{89, 56}, 3}, - {{89, 57}, 1}, - {{89, 58}, 1}, - {{89, 59}, 3}, - {{89, 60}, 1}, - {{89, 61}, 1}, - {{89, 62}, 1}, - {{89, 63}, 3}, - {{89, 66}, 2}, - {{89, 67}, 3}, - {{89, 90}, 1}, - {{89, 91}, 1}, - {{89, 92}, 1}, - {{89, 93}, 1}, - {{89, 94}, 1}, - {{89, 95}, 1}, - {{89, 96}, 1}, - {{89, 97}, 1}, - {{89, 98}, 1}, - {{89, 99}, 1}, - {{89, 100}, 1}, - {{89, 101}, 1}, - {{89, 102}, 1}, - {{89, 103}, 1}, - {{89, 104}, 1}, - {{89, 105}, 1}, - {{89, 106}, 1}, - {{90, 15}, 2}, - {{90, 16}, 2}, - {{90, 17}, 2}, - {{90, 18}, 2}, - {{90, 19}, 3}, - {{90, 20}, 3}, - {{90, 21}, 3}, - {{90, 22}, 2}, - {{90, 23}, 2}, - {{90, 24}, 2}, - {{90, 25}, 2}, - {{90, 26}, 2}, - {{90, 27}, 3}, - {{90, 28}, 3}, - {{90, 29}, 1}, - {{90, 30}, 3}, - {{90, 31}, 3}, - {{90, 32}, 3}, - {{90, 33}, 3}, - {{90, 34}, 3}, - {{90, 35}, 3}, - {{90, 36}, 2}, - {{90, 37}, 2}, - {{90, 38}, 1}, - {{90, 39}, 3}, - {{90, 40}, 3}, - {{90, 41}, 1}, - {{90, 42}, 3}, - {{90, 43}, 1}, - {{90, 44}, 3}, - {{90, 45}, 1}, - {{90, 46}, 3}, - {{90, 47}, 2}, - {{90, 48}, 2}, - {{90, 49}, 2}, - {{90, 50}, 2}, - {{90, 51}, 1}, - {{90, 52}, 3}, - {{90, 53}, 1}, - {{90, 54}, 1}, - {{90, 55}, 3}, - {{90, 56}, 3}, - {{90, 57}, 3}, - {{90, 58}, 1}, - {{90, 59}, 1}, - {{90, 60}, 3}, - {{90, 61}, 1}, - {{90, 62}, 3}, - {{90, 63}, 1}, - {{90, 66}, 3}, - {{90, 67}, 1}, - {{90, 90}, 1}, - {{90, 91}, 1}, - {{90, 92}, 1}, - {{90, 93}, 1}, - {{90, 94}, 1}, - {{90, 95}, 1}, - {{90, 96}, 1}, - {{90, 97}, 1}, - {{90, 98}, 1}, - {{90, 99}, 1}, - {{90, 100}, 1}, - {{90, 101}, 1}, - {{90, 102}, 1}, - {{90, 103}, 1}, - {{90, 104}, 1}, - {{90, 105}, 1}, - {{90, 106}, 1}, - {{91, 14}, 3}, - {{91, 15}, 2}, - {{91, 16}, 2}, - {{91, 17}, 2}, - {{91, 18}, 2}, - {{91, 19}, 3}, - {{91, 20}, 3}, - {{91, 21}, 3}, - {{91, 22}, 3}, - {{91, 23}, 2}, - {{91, 24}, 2}, - {{91, 25}, 3}, - {{91, 26}, 3}, - {{91, 27}, 3}, - {{91, 28}, 3}, - {{91, 29}, 1}, - {{91, 30}, 1}, - {{91, 31}, 3}, - {{91, 32}, 3}, - {{91, 33}, 3}, - {{91, 34}, 3}, - {{91, 35}, 3}, - {{91, 36}, 3}, - {{91, 37}, 3}, - {{91, 38}, 3}, - {{91, 39}, 3}, - {{91, 40}, 1}, - {{91, 41}, 3}, - {{91, 42}, 1}, - {{91, 43}, 3}, - {{91, 44}, 1}, - {{91, 45}, 3}, - {{91, 46}, 2}, - {{91, 47}, 2}, - {{91, 48}, 2}, - {{91, 49}, 3}, - {{91, 50}, 3}, - {{91, 51}, 3}, - {{91, 52}, 1}, - {{91, 53}, 1}, - {{91, 54}, 3}, - {{91, 55}, 1}, - {{91, 56}, 3}, - {{91, 57}, 3}, - {{91, 58}, 1}, - {{91, 61}, 3}, - {{91, 62}, 1}, - {{91, 63}, 3}, - {{91, 64}, 3}, - {{91, 65}, 2}, - {{91, 66}, 3}, - {{91, 67}, 1}, - {{91, 90}, 1}, - {{91, 91}, 1}, - {{91, 92}, 1}, - {{91, 93}, 1}, - {{91, 94}, 1}, - {{91, 95}, 1}, - {{91, 96}, 1}, - {{91, 97}, 1}, - {{91, 98}, 1}, - {{91, 99}, 1}, - {{91, 100}, 1}, - {{91, 101}, 1}, - {{91, 102}, 1}, - {{91, 103}, 1}, - {{91, 104}, 1}, - {{91, 105}, 1}, - {{91, 106}, 1}, - {{92, 14}, 2}, - {{92, 15}, 2}, - {{92, 16}, 2}, - {{92, 17}, 2}, - {{92, 18}, 2}, - {{92, 19}, 3}, - {{92, 20}, 3}, - {{92, 21}, 3}, - {{92, 22}, 3}, - {{92, 23}, 3}, - {{92, 24}, 3}, - {{92, 25}, 2}, - {{92, 26}, 3}, - {{92, 27}, 3}, - {{92, 28}, 3}, - {{92, 29}, 3}, - {{92, 30}, 1}, - {{92, 31}, 3}, - {{92, 32}, 3}, - {{92, 33}, 3}, - {{92, 34}, 3}, - {{92, 35}, 3}, - {{92, 36}, 3}, - {{92, 37}, 3}, - {{92, 38}, 1}, - {{92, 39}, 1}, - {{92, 40}, 3}, - {{92, 41}, 1}, - {{92, 42}, 3}, - {{92, 43}, 1}, - {{92, 44}, 3}, - {{92, 45}, 3}, - {{92, 46}, 2}, - {{92, 47}, 2}, - {{92, 48}, 2}, - {{92, 49}, 3}, - {{92, 50}, 1}, - {{92, 51}, 1}, - {{92, 52}, 3}, - {{92, 53}, 3}, - {{92, 54}, 1}, - {{92, 55}, 3}, - {{92, 56}, 3}, - {{92, 57}, 3}, - {{92, 58}, 3}, - {{92, 62}, 3}, - {{92, 63}, 1}, - {{92, 64}, 3}, - {{92, 65}, 3}, - {{92, 66}, 1}, - {{92, 90}, 1}, - {{92, 91}, 1}, - {{92, 92}, 1}, - {{92, 93}, 1}, - {{93, 13}, 2}, - {{93, 14}, 2}, - {{93, 15}, 2}, - {{93, 16}, 2}, - {{93, 17}, 2}, - {{93, 18}, 2}, - {{93, 19}, 3}, - {{93, 20}, 1}, - {{93, 21}, 3}, - {{93, 22}, 3}, - {{93, 23}, 3}, - {{93, 24}, 3}, - {{93, 25}, 3}, - {{93, 26}, 3}, - {{93, 27}, 3}, - {{93, 28}, 3}, - {{93, 29}, 3}, - {{93, 30}, 1}, - {{93, 31}, 1}, - {{93, 32}, 3}, - {{93, 33}, 3}, - {{93, 34}, 3}, - {{93, 35}, 3}, - {{93, 36}, 3}, - {{93, 37}, 3}, - {{93, 38}, 3}, - {{93, 39}, 3}, - {{93, 40}, 1}, - {{93, 41}, 3}, - {{93, 42}, 3}, - {{93, 43}, 3}, - {{93, 44}, 3}, - {{93, 45}, 2}, - {{93, 46}, 2}, - {{93, 47}, 3}, - {{93, 48}, 1}, - {{93, 49}, 1}, - {{93, 50}, 1}, - {{93, 51}, 1}, - {{93, 52}, 1}, - {{93, 53}, 1}, - {{93, 54}, 1}, - {{93, 55}, 1}, - {{93, 56}, 1}, - {{93, 57}, 1}, - {{93, 63}, 2}, - {{93, 64}, 3}, - {{93, 65}, 3}, - {{93, 90}, 1}, - {{93, 91}, 1}, - {{93, 92}, 1}, - {{93, 93}, 1}, - {{94, 12}, 3}, - {{94, 13}, 2}, - {{94, 14}, 2}, - {{94, 15}, 2}, - {{94, 16}, 2}, - {{94, 17}, 2}, - {{94, 18}, 2}, - {{94, 19}, 2}, - {{94, 20}, 3}, - {{94, 21}, 3}, - {{94, 22}, 3}, - {{94, 23}, 3}, - {{94, 24}, 2}, - {{94, 25}, 3}, - {{94, 26}, 2}, - {{94, 27}, 3}, - {{94, 28}, 3}, - {{94, 29}, 3}, - {{94, 30}, 3}, - {{94, 31}, 1}, - {{94, 32}, 3}, - {{94, 33}, 3}, - {{94, 34}, 3}, - {{94, 35}, 3}, - {{94, 36}, 1}, - {{94, 37}, 1}, - {{94, 38}, 1}, - {{94, 39}, 1}, - {{94, 40}, 3}, - {{94, 41}, 1}, - {{94, 42}, 1}, - {{94, 43}, 3}, - {{94, 44}, 3}, - {{94, 45}, 3}, - {{94, 46}, 1}, - {{94, 47}, 1}, - {{94, 48}, 1}, - {{94, 49}, 1}, - {{94, 50}, 1}, - {{94, 51}, 1}, - {{94, 52}, 1}, - {{94, 53}, 3}, - {{94, 54}, 3}, - {{94, 55}, 3}, - {{94, 56}, 1}, - {{94, 90}, 1}, - {{94, 91}, 1}, - {{94, 92}, 1}, - {{94, 93}, 1}, - {{95, 12}, 3}, - {{95, 13}, 2}, - {{95, 14}, 2}, - {{95, 15}, 2}, - {{95, 16}, 2}, - {{95, 17}, 2}, - {{95, 18}, 2}, - {{95, 19}, 3}, - {{95, 20}, 3}, - {{95, 21}, 3}, - {{95, 22}, 3}, - {{95, 23}, 3}, - {{95, 24}, 3}, - {{95, 25}, 3}, - {{95, 26}, 3}, - {{95, 27}, 2}, - {{95, 28}, 3}, - {{95, 29}, 3}, - {{95, 30}, 3}, - {{95, 31}, 3}, - {{95, 32}, 1}, - {{95, 33}, 1}, - {{95, 34}, 1}, - {{95, 35}, 1}, - {{95, 36}, 3}, - {{95, 37}, 1}, - {{95, 38}, 3}, - {{95, 39}, 3}, - {{95, 40}, 1}, - {{95, 41}, 3}, - {{95, 42}, 2}, - {{95, 43}, 2}, - {{95, 44}, 2}, - {{95, 45}, 1}, - {{95, 46}, 1}, - {{95, 47}, 1}, - {{95, 48}, 1}, - {{95, 49}, 1}, - {{95, 50}, 1}, - {{95, 51}, 1}, - {{95, 52}, 1}, - {{95, 53}, 1}, - {{95, 54}, 1}, - {{95, 55}, 1}, - {{95, 56}, 3}, - {{95, 57}, 1}, - {{95, 90}, 1}, - {{95, 91}, 1}, - {{95, 92}, 1}, - {{95, 93}, 1}, - {{96, 12}, 2}, - {{96, 13}, 2}, - {{96, 14}, 2}, - {{96, 15}, 2}, - {{96, 16}, 2}, - {{96, 17}, 2}, - {{96, 18}, 2}, - {{96, 19}, 2}, - {{96, 20}, 2}, - {{96, 21}, 2}, - {{96, 22}, 3}, - {{96, 23}, 3}, - {{96, 24}, 3}, - {{96, 25}, 3}, - {{96, 26}, 3}, - {{96, 27}, 3}, - {{96, 28}, 3}, - {{96, 29}, 3}, - {{96, 30}, 3}, - {{96, 31}, 3}, - {{96, 32}, 3}, - {{96, 33}, 1}, - {{96, 34}, 3}, - {{96, 35}, 3}, - {{96, 36}, 3}, - {{96, 37}, 1}, - {{96, 38}, 3}, - {{96, 39}, 3}, - {{96, 40}, 2}, - {{96, 41}, 3}, - {{96, 42}, 3}, - {{96, 43}, 3}, - {{96, 44}, 1}, - {{96, 45}, 1}, - {{96, 46}, 1}, - {{96, 47}, 1}, - {{96, 48}, 1}, - {{96, 49}, 1}, - {{96, 50}, 1}, - {{96, 51}, 1}, - {{96, 52}, 1}, - {{96, 53}, 1}, - {{96, 54}, 3}, - {{96, 55}, 1}, - {{96, 56}, 1}, - {{96, 57}, 1}, - {{96, 82}, 2}, - {{96, 83}, 1}, - {{96, 84}, 1}, - {{96, 90}, 1}, - {{96, 91}, 1}, - {{96, 92}, 1}, - {{96, 93}, 1}, - {{97, 11}, 2}, - {{97, 12}, 2}, - {{97, 13}, 2}, - {{97, 14}, 2}, - {{97, 15}, 2}, - {{97, 16}, 2}, - {{97, 17}, 2}, - {{97, 18}, 2}, - {{97, 19}, 3}, - {{97, 20}, 2}, - {{97, 21}, 2}, - {{97, 22}, 3}, - {{97, 23}, 3}, - {{97, 24}, 3}, - {{97, 25}, 3}, - {{97, 26}, 3}, - {{97, 27}, 3}, - {{97, 28}, 3}, - {{97, 29}, 3}, - {{97, 30}, 3}, - {{97, 31}, 3}, - {{97, 32}, 3}, - {{97, 33}, 1}, - {{97, 34}, 3}, - {{97, 35}, 3}, - {{97, 36}, 3}, - {{97, 37}, 3}, - {{97, 38}, 3}, - {{97, 39}, 3}, - {{97, 40}, 2}, - {{97, 41}, 3}, - {{97, 42}, 2}, - {{97, 43}, 1}, - {{97, 44}, 1}, - {{97, 45}, 1}, - {{97, 46}, 1}, - {{97, 47}, 1}, - {{97, 48}, 1}, - {{97, 49}, 1}, - {{97, 50}, 1}, - {{97, 51}, 1}, - {{97, 52}, 1}, - {{97, 53}, 1}, - {{97, 54}, 3}, - {{97, 55}, 3}, - {{97, 56}, 1}, - {{97, 57}, 1}, - {{97, 58}, 1}, - {{97, 82}, 2}, - {{97, 83}, 3}, - {{98, 10}, 3}, - {{98, 11}, 3}, - {{98, 12}, 2}, - {{98, 13}, 2}, - {{98, 14}, 2}, - {{98, 15}, 2}, - {{98, 16}, 2}, - {{98, 17}, 2}, - {{98, 18}, 2}, - {{98, 19}, 2}, - {{98, 20}, 2}, - {{98, 21}, 2}, - {{98, 22}, 2}, - {{98, 23}, 3}, - {{98, 24}, 3}, - {{98, 25}, 3}, - {{98, 26}, 3}, - {{98, 27}, 3}, - {{98, 28}, 3}, - {{98, 29}, 3}, - {{98, 30}, 3}, - {{98, 31}, 3}, - {{98, 32}, 3}, - {{98, 33}, 1}, - {{98, 34}, 1}, - {{98, 35}, 1}, - {{98, 36}, 3}, - {{98, 37}, 3}, - {{98, 38}, 2}, - {{98, 39}, 2}, - {{98, 40}, 2}, - {{98, 41}, 2}, - {{98, 42}, 1}, - {{98, 43}, 1}, - {{98, 44}, 1}, - {{98, 45}, 1}, - {{98, 46}, 3}, - {{98, 47}, 3}, - {{98, 48}, 1}, - {{98, 49}, 3}, - {{98, 50}, 1}, - {{98, 51}, 1}, - {{98, 52}, 1}, - {{98, 53}, 3}, - {{98, 54}, 1}, - {{98, 55}, 1}, - {{98, 56}, 1}, - {{98, 57}, 1}, - {{98, 58}, 1}, - {{98, 81}, 2}, - {{98, 82}, 3}, - {{98, 83}, 1}, - {{98, 90}, 1}, - {{98, 91}, 1}, - {{98, 92}, 1}, - {{98, 93}, 1}, - {{98, 94}, 1}, - {{98, 95}, 1}, - {{98, 96}, 1}, - {{98, 97}, 1}, - {{98, 98}, 1}, - {{98, 99}, 1}, - {{98, 100}, 1}, - {{98, 101}, 1}, - {{98, 102}, 1}, - {{98, 103}, 1}, - {{98, 104}, 1}, - {{98, 105}, 1}, - {{98, 106}, 1}, - {{99, 10}, 3}, - {{99, 11}, 2}, - {{99, 12}, 2}, - {{99, 13}, 2}, - {{99, 14}, 2}, - {{99, 15}, 2}, - {{99, 16}, 2}, - {{99, 17}, 2}, - {{99, 18}, 3}, - {{99, 19}, 3}, - {{99, 20}, 2}, - {{99, 21}, 2}, - {{99, 22}, 2}, - {{99, 23}, 2}, - {{99, 24}, 3}, - {{99, 25}, 1}, - {{99, 26}, 1}, - {{99, 27}, 1}, - {{99, 28}, 3}, - {{99, 29}, 3}, - {{99, 30}, 3}, - {{99, 31}, 3}, - {{99, 32}, 3}, - {{99, 33}, 1}, - {{99, 34}, 1}, - {{99, 35}, 3}, - {{99, 36}, 3}, - {{99, 37}, 2}, - {{99, 38}, 3}, - {{99, 39}, 2}, - {{99, 40}, 2}, - {{99, 41}, 1}, - {{99, 42}, 1}, - {{99, 43}, 1}, - {{99, 44}, 1}, - {{99, 45}, 3}, - {{99, 46}, 1}, - {{99, 47}, 3}, - {{99, 48}, 1}, - {{99, 49}, 1}, - {{99, 50}, 1}, - {{99, 51}, 1}, - {{99, 52}, 1}, - {{99, 53}, 1}, - {{99, 54}, 1}, - {{99, 55}, 1}, - {{99, 56}, 3}, - {{99, 57}, 3}, - {{99, 58}, 3}, - {{99, 59}, 1}, - {{99, 80}, 2}, - {{99, 81}, 2}, - {{99, 82}, 3}, - {{99, 83}, 1}, - {{99, 90}, 1}, - {{99, 91}, 1}, - {{99, 92}, 1}, - {{99, 93}, 1}, - {{99, 94}, 1}, - {{99, 95}, 1}, - {{99, 96}, 1}, - {{99, 97}, 1}, - {{99, 98}, 1}, - {{99, 99}, 1}, - {{99, 100}, 1}, - {{99, 101}, 1}, - {{99, 102}, 1}, - {{99, 103}, 1}, - {{99, 104}, 1}, - {{99, 105}, 1}, - {{99, 106}, 1}, - {{100, 10}, 2}, - {{100, 11}, 2}, - {{100, 12}, 2}, - {{100, 13}, 2}, - {{100, 14}, 3}, - {{100, 15}, 3}, - {{100, 16}, 3}, - {{100, 17}, 3}, - {{100, 18}, 2}, - {{100, 19}, 3}, - {{100, 20}, 3}, - {{100, 21}, 2}, - {{100, 22}, 2}, - {{100, 23}, 2}, - {{100, 24}, 3}, - {{100, 25}, 3}, - {{100, 26}, 3}, - {{100, 27}, 1}, - {{100, 28}, 1}, - {{100, 29}, 1}, - {{100, 30}, 3}, - {{100, 31}, 3}, - {{100, 32}, 3}, - {{100, 33}, 1}, - {{100, 34}, 3}, - {{100, 35}, 3}, - {{100, 36}, 3}, - {{100, 37}, 3}, - {{100, 38}, 2}, - {{100, 39}, 3}, - {{100, 40}, 2}, - {{100, 41}, 1}, - {{100, 42}, 3}, - {{100, 43}, 1}, - {{100, 44}, 1}, - {{100, 45}, 3}, - {{100, 46}, 1}, - {{100, 47}, 1}, - {{100, 48}, 1}, - {{100, 49}, 1}, - {{100, 50}, 1}, - {{100, 51}, 1}, - {{100, 52}, 1}, - {{100, 53}, 3}, - {{100, 54}, 1}, - {{100, 55}, 1}, - {{100, 56}, 1}, - {{100, 57}, 1}, - {{100, 58}, 1}, - {{100, 59}, 1}, - {{100, 60}, 1}, - {{100, 80}, 2}, - {{100, 81}, 2}, - {{100, 82}, 1}, - {{100, 90}, 1}, - {{100, 91}, 1}, - {{100, 92}, 1}, - {{100, 93}, 1}, - {{100, 94}, 1}, - {{100, 95}, 1}, - {{100, 96}, 1}, - {{100, 97}, 1}, - {{100, 98}, 1}, - {{100, 99}, 1}, - {{100, 100}, 1}, - {{100, 101}, 1}, - {{100, 102}, 1}, - {{100, 103}, 1}, - {{100, 104}, 1}, - {{100, 105}, 1}, - {{100, 106}, 1}, - {{101, 9}, 3}, - {{101, 10}, 2}, - {{101, 11}, 2}, - {{101, 12}, 2}, - {{101, 13}, 2}, - {{101, 14}, 3}, - {{101, 15}, 2}, - {{101, 16}, 3}, - {{101, 17}, 2}, - {{101, 18}, 3}, - {{101, 19}, 2}, - {{101, 20}, 2}, - {{101, 21}, 2}, - {{101, 22}, 2}, - {{101, 23}, 2}, - {{101, 24}, 2}, - {{101, 25}, 3}, - {{101, 26}, 3}, - {{101, 27}, 3}, - {{101, 28}, 1}, - {{101, 29}, 3}, - {{101, 30}, 1}, - {{101, 31}, 1}, - {{101, 32}, 3}, - {{101, 33}, 1}, - {{101, 34}, 1}, - {{101, 35}, 3}, - {{101, 36}, 2}, - {{101, 37}, 2}, - {{101, 38}, 3}, - {{101, 39}, 2}, - {{101, 40}, 3}, - {{101, 41}, 1}, - {{101, 42}, 3}, - {{101, 43}, 1}, - {{101, 44}, 1}, - {{101, 45}, 1}, - {{101, 46}, 1}, - {{101, 47}, 1}, - {{101, 48}, 1}, - {{101, 49}, 1}, - {{101, 50}, 1}, - {{101, 51}, 3}, - {{101, 52}, 1}, - {{101, 53}, 1}, - {{101, 54}, 3}, - {{101, 55}, 1}, - {{101, 56}, 3}, - {{101, 57}, 3}, - {{101, 58}, 1}, - {{101, 59}, 3}, - {{101, 60}, 1}, - {{101, 61}, 1}, - {{101, 79}, 2}, - {{101, 80}, 2}, - {{101, 81}, 3}, - {{101, 82}, 1}, - {{101, 90}, 1}, - {{101, 91}, 1}, - {{101, 92}, 1}, - {{101, 93}, 1}, - {{101, 94}, 1}, - {{101, 95}, 1}, - {{101, 96}, 1}, - {{101, 97}, 1}, - {{101, 98}, 1}, - {{101, 99}, 1}, - {{101, 100}, 1}, - {{101, 101}, 1}, - {{101, 102}, 1}, - {{101, 103}, 1}, - {{101, 104}, 1}, - {{101, 105}, 1}, - {{101, 106}, 1}, - {{102, 10}, 2}, - {{102, 11}, 2}, - {{102, 12}, 2}, - {{102, 13}, 2}, - {{102, 14}, 3}, - {{102, 15}, 3}, - {{102, 16}, 3}, - {{102, 17}, 3}, - {{102, 18}, 3}, - {{102, 19}, 3}, - {{102, 20}, 3}, - {{102, 21}, 3}, - {{102, 22}, 2}, - {{102, 23}, 2}, - {{102, 24}, 2}, - {{102, 25}, 2}, - {{102, 26}, 2}, - {{102, 27}, 3}, - {{102, 28}, 3}, - {{102, 29}, 1}, - {{102, 30}, 3}, - {{102, 31}, 3}, - {{102, 32}, 1}, - {{102, 33}, 3}, - {{102, 34}, 1}, - {{102, 35}, 3}, - {{102, 36}, 3}, - {{102, 37}, 2}, - {{102, 38}, 2}, - {{102, 39}, 3}, - {{102, 40}, 3}, - {{102, 41}, 1}, - {{102, 42}, 3}, - {{102, 43}, 3}, - {{102, 44}, 1}, - {{102, 45}, 1}, - {{102, 46}, 1}, - {{102, 47}, 1}, - {{102, 48}, 1}, - {{102, 49}, 1}, - {{102, 50}, 1}, - {{102, 51}, 1}, - {{102, 52}, 1}, - {{102, 53}, 1}, - {{102, 54}, 3}, - {{102, 55}, 3}, - {{102, 56}, 3}, - {{102, 57}, 1}, - {{102, 58}, 3}, - {{102, 59}, 1}, - {{102, 60}, 3}, - {{102, 61}, 1}, - {{102, 62}, 3}, - {{102, 78}, 2}, - {{102, 79}, 2}, - {{102, 80}, 2}, - {{102, 81}, 3}, - {{102, 82}, 1}, - {{102, 96}, 1}, - {{102, 97}, 1}, - {{102, 98}, 1}, - {{102, 99}, 1}, - {{103, 9}, 3}, - {{103, 10}, 2}, - {{103, 11}, 2}, - {{103, 12}, 2}, - {{103, 13}, 2}, - {{103, 14}, 3}, - {{103, 15}, 3}, - {{103, 16}, 3}, - {{103, 17}, 3}, - {{103, 18}, 3}, - {{103, 19}, 3}, - {{103, 20}, 2}, - {{103, 21}, 2}, - {{103, 22}, 2}, - {{103, 23}, 2}, - {{103, 24}, 3}, - {{103, 25}, 2}, - {{103, 26}, 3}, - {{103, 27}, 2}, - {{103, 28}, 3}, - {{103, 29}, 3}, - {{103, 30}, 1}, - {{103, 31}, 3}, - {{103, 32}, 1}, - {{103, 33}, 1}, - {{103, 34}, 1}, - {{103, 35}, 3}, - {{103, 36}, 3}, - {{103, 37}, 2}, - {{103, 38}, 2}, - {{103, 39}, 2}, - {{103, 40}, 3}, - {{103, 41}, 1}, - {{103, 42}, 3}, - {{103, 43}, 3}, - {{103, 44}, 1}, - {{103, 45}, 1}, - {{103, 46}, 1}, - {{103, 47}, 1}, - {{103, 48}, 1}, - {{103, 49}, 3}, - {{103, 50}, 1}, - {{103, 51}, 3}, - {{103, 52}, 3}, - {{103, 53}, 1}, - {{103, 54}, 3}, - {{103, 55}, 2}, - {{103, 56}, 3}, - {{103, 57}, 3}, - {{103, 58}, 1}, - {{103, 59}, 3}, - {{103, 60}, 3}, - {{103, 61}, 3}, - {{103, 62}, 3}, - {{103, 63}, 2}, - {{103, 64}, 1}, - {{103, 65}, 1}, - {{103, 79}, 2}, - {{103, 80}, 2}, - {{103, 81}, 3}, - {{103, 82}, 1}, - {{103, 96}, 1}, - {{103, 97}, 1}, - {{103, 98}, 1}, - {{103, 99}, 1}, - {{104, 8}, 1}, - {{104, 9}, 3}, - {{104, 10}, 2}, - {{104, 11}, 2}, - {{104, 12}, 2}, - {{104, 13}, 3}, - {{104, 14}, 2}, - {{104, 15}, 3}, - {{104, 16}, 3}, - {{104, 17}, 3}, - {{104, 18}, 3}, - {{104, 19}, 3}, - {{104, 20}, 2}, - {{104, 21}, 2}, - {{104, 22}, 3}, - {{104, 23}, 3}, - {{104, 24}, 3}, - {{104, 25}, 3}, - {{104, 26}, 3}, - {{104, 27}, 3}, - {{104, 28}, 2}, - {{104, 29}, 2}, - {{104, 30}, 3}, - {{104, 31}, 3}, - {{104, 32}, 3}, - {{104, 33}, 3}, - {{104, 34}, 1}, - {{104, 35}, 1}, - {{104, 36}, 1}, - {{104, 37}, 3}, - {{104, 38}, 2}, - {{104, 39}, 2}, - {{104, 40}, 3}, - {{104, 41}, 1}, - {{104, 42}, 1}, - {{104, 43}, 3}, - {{104, 44}, 1}, - {{104, 45}, 1}, - {{104, 46}, 1}, - {{104, 47}, 3}, - {{104, 48}, 1}, - {{104, 49}, 3}, - {{104, 50}, 1}, - {{104, 51}, 1}, - {{104, 52}, 1}, - {{104, 53}, 3}, - {{104, 54}, 1}, - {{104, 55}, 3}, - {{104, 56}, 2}, - {{104, 57}, 3}, - {{104, 58}, 2}, - {{104, 59}, 3}, - {{104, 60}, 2}, - {{104, 61}, 2}, - {{104, 62}, 2}, - {{104, 63}, 2}, - {{104, 64}, 2}, - {{104, 65}, 3}, - {{104, 66}, 1}, - {{104, 67}, 3}, - {{104, 68}, 3}, - {{104, 69}, 2}, - {{104, 70}, 2}, - {{104, 71}, 2}, - {{104, 72}, 2}, - {{104, 73}, 2}, - {{104, 74}, 3}, - {{104, 76}, 3}, - {{104, 78}, 2}, - {{104, 79}, 2}, - {{104, 80}, 3}, - {{104, 81}, 1}, - {{104, 82}, 1}, - {{104, 96}, 1}, - {{104, 97}, 1}, - {{104, 98}, 1}, - {{104, 99}, 1}, - {{105, 9}, 2}, - {{105, 10}, 2}, - {{105, 11}, 2}, - {{105, 12}, 2}, - {{105, 13}, 3}, - {{105, 14}, 3}, - {{105, 15}, 3}, - {{105, 16}, 3}, - {{105, 17}, 3}, - {{105, 18}, 3}, - {{105, 19}, 3}, - {{105, 20}, 3}, - {{105, 21}, 3}, - {{105, 22}, 3}, - {{105, 23}, 3}, - {{105, 24}, 3}, - {{105, 25}, 3}, - {{105, 26}, 3}, - {{105, 27}, 3}, - {{105, 28}, 3}, - {{105, 29}, 3}, - {{105, 30}, 2}, - {{105, 31}, 3}, - {{105, 32}, 3}, - {{105, 33}, 3}, - {{105, 34}, 3}, - {{105, 35}, 3}, - {{105, 36}, 3}, - {{105, 37}, 3}, - {{105, 38}, 3}, - {{105, 39}, 3}, - {{105, 40}, 3}, - {{105, 41}, 3}, - {{105, 42}, 3}, - {{105, 43}, 3}, - {{105, 44}, 3}, - {{105, 45}, 3}, - {{105, 46}, 1}, - {{105, 47}, 3}, - {{105, 48}, 1}, - {{105, 49}, 1}, - {{105, 50}, 1}, - {{105, 51}, 1}, - {{105, 52}, 1}, - {{105, 53}, 3}, - {{105, 54}, 3}, - {{105, 55}, 3}, - {{105, 56}, 3}, - {{105, 57}, 3}, - {{105, 58}, 3}, - {{105, 59}, 2}, - {{105, 60}, 3}, - {{105, 61}, 2}, - {{105, 62}, 2}, - {{105, 63}, 2}, - {{105, 64}, 2}, - {{105, 65}, 2}, - {{105, 66}, 3}, - {{105, 67}, 3}, - {{105, 68}, 2}, - {{105, 69}, 2}, - {{105, 70}, 2}, - {{105, 71}, 2}, - {{105, 72}, 2}, - {{105, 73}, 2}, - {{105, 74}, 2}, - {{105, 75}, 2}, - {{105, 76}, 2}, - {{105, 77}, 2}, - {{105, 78}, 2}, - {{105, 79}, 3}, - {{105, 80}, 3}, - {{105, 81}, 3}, - {{105, 96}, 1}, - {{105, 97}, 1}, - {{105, 98}, 1}, - {{105, 99}, 1}, - {{106, 8}, 3}, - {{106, 9}, 2}, - {{106, 10}, 2}, - {{106, 11}, 2}, - {{106, 12}, 2}, - {{106, 13}, 2}, - {{106, 14}, 3}, - {{106, 15}, 3}, - {{106, 16}, 3}, - {{106, 17}, 3}, - {{106, 18}, 3}, - {{106, 19}, 3}, - {{106, 20}, 3}, - {{106, 21}, 2}, - {{106, 22}, 3}, - {{106, 23}, 3}, - {{106, 24}, 3}, - {{106, 25}, 3}, - {{106, 26}, 3}, - {{106, 27}, 3}, - {{106, 28}, 3}, - {{106, 29}, 3}, - {{106, 30}, 2}, - {{106, 31}, 2}, - {{106, 32}, 2}, - {{106, 33}, 3}, - {{106, 34}, 3}, - {{106, 35}, 3}, - {{106, 36}, 3}, - {{106, 37}, 2}, - {{106, 38}, 3}, - {{106, 39}, 2}, - {{106, 40}, 3}, - {{106, 41}, 3}, - {{106, 42}, 1}, - {{106, 43}, 1}, - {{106, 44}, 1}, - {{106, 45}, 1}, - {{106, 46}, 1}, - {{106, 47}, 1}, - {{106, 48}, 1}, - {{106, 49}, 1}, - {{106, 50}, 1}, - {{106, 51}, 1}, - {{106, 52}, 1}, - {{106, 53}, 3}, - {{106, 54}, 2}, - {{106, 55}, 3}, - {{106, 56}, 2}, - {{106, 57}, 2}, - {{106, 58}, 2}, - {{106, 59}, 2}, - {{106, 60}, 2}, - {{106, 61}, 2}, - {{106, 62}, 2}, - {{106, 63}, 2}, - {{106, 64}, 2}, - {{106, 65}, 2}, - {{106, 66}, 2}, - {{106, 67}, 3}, - {{106, 68}, 2}, - {{106, 69}, 2}, - {{106, 70}, 2}, - {{106, 71}, 2}, - {{106, 72}, 2}, - {{106, 73}, 2}, - {{106, 74}, 2}, - {{106, 75}, 2}, - {{106, 76}, 2}, - {{106, 77}, 2}, - {{106, 78}, 2}, - {{106, 79}, 1}, - {{106, 80}, 1}, - {{106, 81}, 1}, - {{106, 96}, 1}, - {{106, 97}, 1}, - {{106, 98}, 1}, - {{106, 99}, 1}, - {{107, 9}, 2}, - {{107, 10}, 2}, - {{107, 11}, 2}, - {{107, 12}, 2}, - {{107, 13}, 3}, - {{107, 14}, 3}, - {{107, 15}, 3}, - {{107, 16}, 3}, - {{107, 17}, 3}, - {{107, 18}, 3}, - {{107, 19}, 3}, - {{107, 20}, 3}, - {{107, 21}, 3}, - {{107, 22}, 3}, - {{107, 23}, 3}, - {{107, 24}, 3}, - {{107, 25}, 3}, - {{107, 26}, 3}, - {{107, 27}, 3}, - {{107, 28}, 3}, - {{107, 29}, 3}, - {{107, 30}, 3}, - {{107, 31}, 3}, - {{107, 32}, 3}, - {{107, 33}, 3}, - {{107, 34}, 3}, - {{107, 35}, 3}, - {{107, 36}, 3}, - {{107, 37}, 3}, - {{107, 38}, 2}, - {{107, 39}, 3}, - {{107, 40}, 3}, - {{107, 41}, 1}, - {{107, 42}, 1}, - {{107, 43}, 1}, - {{107, 44}, 1}, - {{107, 45}, 1}, - {{107, 46}, 1}, - {{107, 47}, 1}, - {{107, 48}, 1}, - {{107, 49}, 1}, - {{107, 50}, 1}, - {{107, 51}, 1}, - {{107, 52}, 1}, - {{107, 53}, 1}, - {{107, 54}, 1}, - {{107, 55}, 3}, - {{107, 56}, 2}, - {{107, 57}, 2}, - {{107, 58}, 2}, - {{107, 59}, 2}, - {{107, 60}, 2}, - {{107, 61}, 2}, - {{107, 62}, 2}, - {{107, 63}, 2}, - {{107, 64}, 2}, - {{107, 65}, 3}, - {{107, 66}, 2}, - {{107, 67}, 2}, - {{107, 68}, 3}, - {{107, 69}, 2}, - {{107, 70}, 2}, - {{107, 71}, 2}, - {{107, 72}, 2}, - {{107, 73}, 2}, - {{107, 74}, 2}, - {{107, 75}, 2}, - {{107, 76}, 2}, - {{107, 77}, 2}, - {{107, 78}, 2}, - {{107, 79}, 1}, - {{107, 80}, 3}, - {{107, 81}, 1}, - {{107, 90}, 1}, - {{107, 91}, 1}, - {{107, 92}, 1}, - {{107, 93}, 1}, - {{107, 94}, 1}, - {{107, 95}, 1}, - {{107, 96}, 1}, - {{107, 97}, 1}, - {{107, 98}, 1}, - {{107, 99}, 1}, - {{107, 100}, 1}, - {{107, 101}, 1}, - {{107, 102}, 1}, - {{107, 103}, 1}, - {{107, 104}, 1}, - {{107, 105}, 1}, - {{107, 106}, 1}, - {{108, 8}, 3}, - {{108, 9}, 2}, - {{108, 10}, 2}, - {{108, 11}, 2}, - {{108, 12}, 2}, - {{108, 13}, 2}, - {{108, 14}, 3}, - {{108, 15}, 3}, - {{108, 16}, 3}, - {{108, 17}, 3}, - {{108, 18}, 3}, - {{108, 19}, 3}, - {{108, 20}, 3}, - {{108, 21}, 3}, - {{108, 22}, 3}, - {{108, 23}, 3}, - {{108, 24}, 3}, - {{108, 25}, 3}, - {{108, 26}, 3}, - {{108, 27}, 1}, - {{108, 28}, 3}, - {{108, 29}, 3}, - {{108, 30}, 3}, - {{108, 31}, 3}, - {{108, 32}, 3}, - {{108, 33}, 3}, - {{108, 34}, 3}, - {{108, 35}, 3}, - {{108, 36}, 3}, - {{108, 37}, 1}, - {{108, 38}, 3}, - {{108, 39}, 3}, - {{108, 40}, 1}, - {{108, 41}, 1}, - {{108, 42}, 1}, - {{108, 43}, 1}, - {{108, 44}, 1}, - {{108, 45}, 1}, - {{108, 46}, 1}, - {{108, 47}, 1}, - {{108, 48}, 1}, - {{108, 49}, 3}, - {{108, 50}, 1}, - {{108, 51}, 3}, - {{108, 52}, 1}, - {{108, 53}, 1}, - {{108, 54}, 1}, - {{108, 55}, 1}, - {{108, 56}, 1}, - {{108, 57}, 2}, - {{108, 58}, 2}, - {{108, 59}, 2}, - {{108, 60}, 2}, - {{108, 61}, 2}, - {{108, 62}, 2}, - {{108, 63}, 2}, - {{108, 64}, 2}, - {{108, 65}, 2}, - {{108, 66}, 2}, - {{108, 67}, 2}, - {{108, 68}, 2}, - {{108, 69}, 2}, - {{108, 70}, 2}, - {{108, 71}, 2}, - {{108, 72}, 2}, - {{108, 73}, 2}, - {{108, 74}, 2}, - {{108, 75}, 2}, - {{108, 76}, 2}, - {{108, 77}, 2}, - {{108, 78}, 3}, - {{108, 79}, 3}, - {{108, 80}, 1}, - {{108, 90}, 1}, - {{108, 91}, 1}, - {{108, 92}, 1}, - {{108, 93}, 1}, - {{108, 94}, 1}, - {{108, 95}, 1}, - {{108, 96}, 1}, - {{108, 97}, 1}, - {{108, 98}, 1}, - {{108, 99}, 1}, - {{108, 100}, 1}, - {{108, 101}, 1}, - {{108, 102}, 1}, - {{108, 103}, 1}, - {{108, 104}, 1}, - {{108, 105}, 1}, - {{108, 106}, 1}, - {{109, 9}, 2}, - {{109, 10}, 2}, - {{109, 11}, 2}, - {{109, 12}, 2}, - {{109, 13}, 3}, - {{109, 14}, 3}, - {{109, 15}, 3}, - {{109, 16}, 3}, - {{109, 17}, 3}, - {{109, 18}, 3}, - {{109, 19}, 3}, - {{109, 20}, 2}, - {{109, 21}, 3}, - {{109, 22}, 3}, - {{109, 23}, 3}, - {{109, 24}, 3}, - {{109, 25}, 1}, - {{109, 26}, 3}, - {{109, 27}, 3}, - {{109, 28}, 3}, - {{109, 29}, 3}, - {{109, 30}, 1}, - {{109, 31}, 1}, - {{109, 32}, 3}, - {{109, 33}, 3}, - {{109, 34}, 1}, - {{109, 35}, 3}, - {{109, 36}, 3}, - {{109, 37}, 3}, - {{109, 38}, 3}, - {{109, 39}, 1}, - {{109, 40}, 1}, - {{109, 41}, 3}, - {{109, 42}, 1}, - {{109, 43}, 1}, - {{109, 44}, 1}, - {{109, 45}, 1}, - {{109, 46}, 1}, - {{109, 47}, 1}, - {{109, 48}, 1}, - {{109, 49}, 1}, - {{109, 50}, 1}, - {{109, 51}, 1}, - {{109, 52}, 1}, - {{109, 53}, 1}, - {{109, 54}, 1}, - {{109, 55}, 1}, - {{109, 56}, 1}, - {{109, 59}, 2}, - {{109, 60}, 2}, - {{109, 61}, 2}, - {{109, 62}, 2}, - {{109, 63}, 2}, - {{109, 64}, 2}, - {{109, 65}, 2}, - {{109, 66}, 2}, - {{109, 67}, 2}, - {{109, 68}, 2}, - {{109, 69}, 2}, - {{109, 70}, 2}, - {{109, 71}, 2}, - {{109, 72}, 2}, - {{109, 73}, 2}, - {{109, 74}, 2}, - {{109, 75}, 2}, - {{109, 76}, 2}, - {{109, 77}, 3}, - {{109, 79}, 1}, - {{109, 90}, 1}, - {{109, 91}, 1}, - {{109, 92}, 1}, - {{109, 93}, 1}, - {{109, 94}, 1}, - {{109, 95}, 1}, - {{109, 96}, 1}, - {{109, 97}, 1}, - {{109, 98}, 1}, - {{109, 99}, 1}, - {{109, 100}, 1}, - {{109, 101}, 1}, - {{109, 102}, 1}, - {{109, 103}, 1}, - {{109, 104}, 1}, - {{109, 105}, 1}, - {{109, 106}, 1}, - {{110, 8}, 3}, - {{110, 9}, 2}, - {{110, 10}, 2}, - {{110, 11}, 2}, - {{110, 12}, 2}, - {{110, 13}, 2}, - {{110, 14}, 3}, - {{110, 15}, 3}, - {{110, 16}, 3}, - {{110, 17}, 3}, - {{110, 18}, 3}, - {{110, 19}, 3}, - {{110, 20}, 2}, - {{110, 21}, 3}, - {{110, 22}, 3}, - {{110, 23}, 3}, - {{110, 24}, 3}, - {{110, 25}, 3}, - {{110, 26}, 3}, - {{110, 27}, 1}, - {{110, 28}, 1}, - {{110, 29}, 1}, - {{110, 30}, 3}, - {{110, 31}, 3}, - {{110, 32}, 3}, - {{110, 33}, 3}, - {{110, 34}, 3}, - {{110, 35}, 1}, - {{110, 36}, 3}, - {{110, 37}, 3}, - {{110, 38}, 1}, - {{110, 39}, 3}, - {{110, 40}, 1}, - {{110, 41}, 1}, - {{110, 42}, 1}, - {{110, 43}, 1}, - {{110, 44}, 1}, - {{110, 45}, 1}, - {{110, 46}, 1}, - {{110, 47}, 1}, - {{110, 48}, 1}, - {{110, 49}, 1}, - {{110, 50}, 3}, - {{110, 51}, 1}, - {{110, 52}, 1}, - {{110, 53}, 1}, - {{110, 54}, 1}, - {{110, 55}, 1}, - {{110, 56}, 1}, - {{110, 60}, 2}, - {{110, 61}, 2}, - {{110, 62}, 2}, - {{110, 63}, 1}, - {{110, 64}, 2}, - {{110, 65}, 2}, - {{110, 66}, 2}, - {{110, 67}, 2}, - {{110, 68}, 2}, - {{110, 69}, 2}, - {{110, 70}, 2}, - {{110, 90}, 1}, - {{110, 91}, 1}, - {{110, 92}, 1}, - {{110, 93}, 1}, - {{110, 94}, 1}, - {{110, 95}, 1}, - {{110, 96}, 1}, - {{110, 97}, 1}, - {{110, 98}, 1}, - {{110, 99}, 1}, - {{110, 100}, 1}, - {{110, 101}, 1}, - {{110, 102}, 1}, - {{110, 103}, 1}, - {{110, 104}, 1}, - {{110, 105}, 1}, - {{110, 106}, 1}, - {{111, 9}, 2}, - {{111, 10}, 2}, - {{111, 11}, 2}, - {{111, 12}, 2}, - {{111, 13}, 3}, - {{111, 14}, 3}, - {{111, 15}, 3}, - {{111, 16}, 3}, - {{111, 17}, 3}, - {{111, 18}, 3}, - {{111, 19}, 3}, - {{111, 20}, 2}, - {{111, 21}, 3}, - {{111, 22}, 3}, - {{111, 23}, 3}, - {{111, 24}, 3}, - {{111, 25}, 3}, - {{111, 26}, 3}, - {{111, 27}, 3}, - {{111, 28}, 3}, - {{111, 29}, 3}, - {{111, 30}, 1}, - {{111, 31}, 3}, - {{111, 32}, 3}, - {{111, 33}, 3}, - {{111, 34}, 3}, - {{111, 35}, 3}, - {{111, 36}, 1}, - {{111, 37}, 1}, - {{111, 38}, 3}, - {{111, 39}, 1}, - {{111, 40}, 1}, - {{111, 41}, 1}, - {{111, 42}, 1}, - {{111, 43}, 1}, - {{111, 44}, 1}, - {{111, 45}, 1}, - {{111, 46}, 1}, - {{111, 47}, 1}, - {{111, 48}, 1}, - {{111, 49}, 1}, - {{111, 50}, 1}, - {{111, 51}, 3}, - {{111, 52}, 1}, - {{111, 53}, 1}, - {{111, 54}, 1}, - {{111, 55}, 1}, - {{111, 56}, 1}, - {{111, 57}, 1}, - {{111, 58}, 1}, - {{111, 59}, 1}, - {{111, 60}, 2}, - {{111, 61}, 2}, - {{111, 62}, 2}, - {{111, 63}, 1}, - {{111, 64}, 2}, - {{111, 65}, 2}, - {{111, 66}, 2}, - {{111, 67}, 3}, - {{111, 68}, 2}, - {{111, 69}, 3}, - {{112, 8}, 3}, - {{112, 9}, 2}, - {{112, 10}, 2}, - {{112, 11}, 2}, - {{112, 12}, 2}, - {{112, 13}, 2}, - {{112, 14}, 3}, - {{112, 15}, 3}, - {{112, 16}, 3}, - {{112, 17}, 3}, - {{112, 18}, 3}, - {{112, 19}, 3}, - {{112, 20}, 2}, - {{112, 21}, 3}, - {{112, 22}, 3}, - {{112, 23}, 3}, - {{112, 24}, 3}, - {{112, 25}, 3}, - {{112, 26}, 3}, - {{112, 27}, 3}, - {{112, 28}, 1}, - {{112, 29}, 3}, - {{112, 30}, 1}, - {{112, 31}, 1}, - {{112, 32}, 3}, - {{112, 33}, 3}, - {{112, 34}, 3}, - {{112, 35}, 3}, - {{112, 36}, 3}, - {{112, 37}, 3}, - {{112, 38}, 1}, - {{112, 39}, 1}, - {{112, 40}, 3}, - {{112, 41}, 1}, - {{112, 42}, 3}, - {{112, 43}, 1}, - {{112, 44}, 1}, - {{112, 45}, 1}, - {{112, 46}, 1}, - {{112, 47}, 1}, - {{112, 48}, 1}, - {{112, 49}, 1}, - {{112, 50}, 1}, - {{112, 51}, 1}, - {{112, 52}, 1}, - {{112, 53}, 1}, - {{112, 54}, 1}, - {{112, 55}, 1}, - {{112, 56}, 1}, - {{112, 57}, 1}, - {{112, 58}, 1}, - {{112, 59}, 1}, - {{112, 60}, 1}, - {{112, 61}, 2}, - {{112, 62}, 2}, - {{112, 63}, 3}, - {{112, 64}, 1}, - {{112, 65}, 1}, - {{112, 66}, 1}, - {{112, 68}, 1}, - {{113, 9}, 2}, - {{113, 10}, 2}, - {{113, 11}, 2}, - {{113, 12}, 2}, - {{113, 13}, 2}, - {{113, 14}, 3}, - {{113, 15}, 3}, - {{113, 16}, 3}, - {{113, 17}, 3}, - {{113, 18}, 2}, - {{113, 19}, 2}, - {{113, 20}, 2}, - {{113, 21}, 2}, - {{113, 22}, 2}, - {{113, 23}, 3}, - {{113, 24}, 3}, - {{113, 25}, 3}, - {{113, 26}, 3}, - {{113, 27}, 3}, - {{113, 28}, 3}, - {{113, 29}, 3}, - {{113, 30}, 3}, - {{113, 31}, 3}, - {{113, 32}, 3}, - {{113, 33}, 3}, - {{113, 34}, 3}, - {{113, 35}, 3}, - {{113, 36}, 3}, - {{113, 37}, 1}, - {{113, 38}, 3}, - {{113, 39}, 1}, - {{113, 40}, 1}, - {{113, 41}, 1}, - {{113, 42}, 1}, - {{113, 43}, 1}, - {{113, 44}, 1}, - {{113, 45}, 1}, - {{113, 46}, 1}, - {{113, 47}, 1}, - {{113, 48}, 1}, - {{113, 49}, 1}, - {{113, 50}, 1}, - {{113, 51}, 1}, - {{113, 52}, 3}, - {{113, 53}, 1}, - {{113, 54}, 1}, - {{113, 55}, 1}, - {{113, 56}, 1}, - {{113, 57}, 1}, - {{113, 58}, 1}, - {{113, 59}, 1}, - {{113, 60}, 1}, - {{113, 61}, 1}, - {{113, 62}, 1}, - {{113, 63}, 1}, - {{113, 64}, 1}, - {{113, 65}, 1}, - {{113, 66}, 1}, - {{113, 67}, 1}, - {{113, 68}, 1}, - {{113, 69}, 1}, - {{114, 9}, 2}, - {{114, 10}, 2}, - {{114, 11}, 2}, - {{114, 12}, 2}, - {{114, 13}, 2}, - {{114, 14}, 3}, - {{114, 15}, 3}, - {{114, 16}, 2}, - {{114, 17}, 3}, - {{114, 18}, 3}, - {{114, 19}, 3}, - {{114, 20}, 2}, - {{114, 21}, 2}, - {{114, 22}, 3}, - {{114, 23}, 3}, - {{114, 24}, 2}, - {{114, 25}, 3}, - {{114, 26}, 3}, - {{114, 27}, 3}, - {{114, 28}, 3}, - {{114, 29}, 3}, - {{114, 30}, 3}, - {{114, 31}, 1}, - {{114, 32}, 3}, - {{114, 33}, 3}, - {{114, 34}, 3}, - {{114, 35}, 3}, - {{114, 36}, 1}, - {{114, 37}, 1}, - {{114, 38}, 1}, - {{114, 39}, 1}, - {{114, 40}, 1}, - {{114, 41}, 1}, - {{114, 42}, 1}, - {{114, 43}, 1}, - {{114, 44}, 1}, - {{114, 45}, 1}, - {{114, 46}, 1}, - {{114, 47}, 3}, - {{114, 48}, 1}, - {{114, 49}, 1}, - {{114, 50}, 1}, - {{114, 51}, 1}, - {{114, 52}, 1}, - {{114, 53}, 1}, - {{114, 54}, 1}, - {{114, 55}, 1}, - {{114, 56}, 1}, - {{114, 57}, 1}, - {{114, 58}, 3}, - {{114, 59}, 1}, - {{114, 60}, 1}, - {{114, 61}, 1}, - {{114, 62}, 1}, - {{114, 63}, 1}, - {{114, 64}, 1}, - {{114, 65}, 1}, - {{114, 66}, 1}, - {{114, 67}, 1}, - {{114, 68}, 1}, - {{114, 69}, 1}, - {{114, 70}, 1}, - {{115, 9}, 2}, - {{115, 10}, 2}, - {{115, 11}, 2}, - {{115, 12}, 2}, - {{115, 13}, 2}, - {{115, 14}, 2}, - {{115, 15}, 3}, - {{115, 16}, 3}, - {{115, 17}, 2}, - {{115, 18}, 2}, - {{115, 19}, 2}, - {{115, 20}, 2}, - {{115, 21}, 2}, - {{115, 22}, 2}, - {{115, 23}, 2}, - {{115, 24}, 3}, - {{115, 25}, 3}, - {{115, 26}, 3}, - {{115, 27}, 3}, - {{115, 28}, 3}, - {{115, 29}, 3}, - {{115, 30}, 3}, - {{115, 31}, 3}, - {{115, 32}, 1}, - {{115, 33}, 3}, - {{115, 34}, 3}, - {{115, 35}, 1}, - {{115, 36}, 1}, - {{115, 37}, 1}, - {{115, 38}, 1}, - {{115, 39}, 1}, - {{115, 40}, 1}, - {{115, 41}, 3}, - {{115, 42}, 1}, - {{115, 43}, 3}, - {{115, 44}, 3}, - {{115, 45}, 3}, - {{115, 46}, 1}, - {{115, 47}, 1}, - {{115, 48}, 3}, - {{115, 49}, 1}, - {{115, 50}, 1}, - {{115, 51}, 3}, - {{115, 52}, 1}, - {{115, 53}, 1}, - {{115, 54}, 1}, - {{115, 55}, 1}, - {{115, 56}, 1}, - {{115, 57}, 1}, - {{115, 58}, 1}, - {{115, 59}, 1}, - {{115, 60}, 3}, - {{115, 61}, 1}, - {{115, 62}, 1}, - {{115, 63}, 1}, - {{115, 64}, 1}, - {{115, 65}, 1}, - {{115, 66}, 1}, - {{115, 67}, 1}, - {{115, 68}, 1}, - {{115, 69}, 1}, - {{115, 70}, 1}, - {{115, 71}, 1}, - {{115, 72}, 1}, - {{116, 10}, 2}, - {{116, 11}, 2}, - {{116, 12}, 2}, - {{116, 13}, 2}, - {{116, 14}, 2}, - {{116, 15}, 2}, - {{116, 16}, 2}, - {{116, 17}, 3}, - {{116, 18}, 2}, - {{116, 19}, 2}, - {{116, 20}, 2}, - {{116, 21}, 2}, - {{116, 22}, 2}, - {{116, 23}, 2}, - {{116, 24}, 3}, - {{116, 25}, 3}, - {{116, 26}, 2}, - {{116, 27}, 3}, - {{116, 28}, 3}, - {{116, 29}, 3}, - {{116, 30}, 3}, - {{116, 31}, 3}, - {{116, 32}, 3}, - {{116, 33}, 3}, - {{116, 34}, 1}, - {{116, 35}, 1}, - {{116, 36}, 3}, - {{116, 37}, 1}, - {{116, 38}, 3}, - {{116, 39}, 1}, - {{116, 40}, 3}, - {{116, 41}, 1}, - {{116, 42}, 1}, - {{116, 43}, 1}, - {{116, 44}, 1}, - {{116, 45}, 1}, - {{116, 46}, 3}, - {{116, 47}, 1}, - {{116, 48}, 1}, - {{116, 49}, 3}, - {{116, 50}, 1}, - {{116, 51}, 1}, - {{116, 52}, 1}, - {{116, 53}, 1}, - {{116, 54}, 1}, - {{116, 55}, 1}, - {{116, 56}, 1}, - {{116, 57}, 1}, - {{116, 58}, 3}, - {{116, 59}, 1}, - {{116, 60}, 1}, - {{116, 61}, 1}, - {{116, 62}, 3}, - {{116, 63}, 1}, - {{116, 64}, 1}, - {{116, 65}, 1}, - {{116, 66}, 1}, - {{116, 67}, 1}, - {{116, 68}, 1}, - {{116, 69}, 1}, - {{116, 70}, 1}, - {{116, 71}, 1}, - {{116, 72}, 3}, - {{116, 73}, 1}, - {{116, 74}, 1}, - {{117, 11}, 2}, - {{117, 12}, 2}, - {{117, 13}, 2}, - {{117, 14}, 2}, - {{117, 15}, 2}, - {{117, 16}, 3}, - {{117, 17}, 2}, - {{117, 18}, 2}, - {{117, 19}, 2}, - {{117, 20}, 2}, - {{117, 21}, 2}, - {{117, 22}, 2}, - {{117, 23}, 2}, - {{117, 24}, 2}, - {{117, 25}, 3}, - {{117, 26}, 3}, - {{117, 27}, 2}, - {{117, 28}, 3}, - {{117, 29}, 3}, - {{117, 30}, 3}, - {{117, 31}, 3}, - {{117, 32}, 1}, - {{117, 33}, 3}, - {{117, 34}, 1}, - {{117, 35}, 1}, - {{117, 36}, 3}, - {{117, 37}, 1}, - {{117, 38}, 1}, - {{117, 39}, 1}, - {{117, 40}, 1}, - {{117, 41}, 3}, - {{117, 42}, 3}, - {{117, 43}, 1}, - {{117, 44}, 1}, - {{117, 45}, 1}, - {{117, 46}, 1}, - {{117, 47}, 1}, - {{117, 48}, 3}, - {{117, 49}, 1}, - {{117, 50}, 1}, - {{117, 51}, 1}, - {{117, 52}, 1}, - {{117, 53}, 1}, - {{117, 54}, 1}, - {{117, 55}, 1}, - {{117, 56}, 1}, - {{117, 57}, 1}, - {{117, 58}, 1}, - {{117, 59}, 1}, - {{117, 60}, 3}, - {{117, 61}, 1}, - {{117, 62}, 3}, - {{117, 63}, 3}, - {{117, 64}, 3}, - {{117, 65}, 1}, - {{117, 66}, 3}, - {{117, 67}, 1}, - {{117, 68}, 1}, - {{117, 69}, 1}, - {{117, 70}, 1}, - {{117, 71}, 1}, - {{117, 72}, 1}, - {{117, 73}, 1}, - {{117, 74}, 3}, - {{117, 75}, 1}, - {{118, 11}, 2}, - {{118, 12}, 2}, - {{118, 13}, 2}, - {{118, 14}, 2}, - {{118, 15}, 2}, - {{118, 16}, 2}, - {{118, 17}, 3}, - {{118, 18}, 2}, - {{118, 19}, 2}, - {{118, 20}, 2}, - {{118, 21}, 2}, - {{118, 22}, 2}, - {{118, 23}, 2}, - {{118, 24}, 2}, - {{118, 25}, 2}, - {{118, 26}, 3}, - {{118, 27}, 3}, - {{118, 28}, 3}, - {{118, 29}, 3}, - {{118, 30}, 3}, - {{118, 31}, 3}, - {{118, 32}, 1}, - {{118, 33}, 1}, - {{118, 34}, 3}, - {{118, 35}, 1}, - {{118, 36}, 1}, - {{118, 37}, 3}, - {{118, 38}, 3}, - {{118, 39}, 3}, - {{118, 40}, 1}, - {{118, 41}, 1}, - {{118, 42}, 1}, - {{118, 43}, 1}, - {{118, 44}, 3}, - {{118, 45}, 1}, - {{118, 46}, 3}, - {{118, 47}, 1}, - {{118, 48}, 1}, - {{118, 49}, 3}, - {{118, 50}, 3}, - {{118, 51}, 1}, - {{118, 52}, 3}, - {{118, 53}, 1}, - {{118, 54}, 3}, - {{118, 55}, 1}, - {{118, 56}, 1}, - {{118, 57}, 1}, - {{118, 58}, 1}, - {{118, 59}, 1}, - {{118, 60}, 1}, - {{118, 61}, 1}, - {{118, 62}, 1}, - {{118, 63}, 1}, - {{118, 64}, 1}, - {{118, 65}, 3}, - {{118, 66}, 1}, - {{118, 67}, 3}, - {{118, 68}, 1}, - {{118, 69}, 1}, - {{118, 70}, 1}, - {{118, 71}, 1}, - {{118, 72}, 1}, - {{118, 73}, 3}, - {{118, 74}, 1}, - {{118, 75}, 1}, - {{118, 106}, 1}, - {{118, 107}, 1}, - {{119, 11}, 3}, - {{119, 12}, 2}, - {{119, 13}, 2}, - {{119, 14}, 2}, - {{119, 15}, 2}, - {{119, 16}, 2}, - {{119, 17}, 2}, - {{119, 18}, 2}, - {{119, 19}, 2}, - {{119, 20}, 2}, - {{119, 21}, 2}, - {{119, 22}, 2}, - {{119, 23}, 3}, - {{119, 24}, 3}, - {{119, 25}, 3}, - {{119, 26}, 3}, - {{119, 27}, 3}, - {{119, 28}, 3}, - {{119, 29}, 1}, - {{119, 30}, 1}, - {{119, 31}, 1}, - {{119, 32}, 1}, - {{119, 33}, 1}, - {{119, 34}, 1}, - {{119, 35}, 3}, - {{119, 36}, 1}, - {{119, 37}, 1}, - {{119, 38}, 1}, - {{119, 39}, 1}, - {{119, 40}, 1}, - {{119, 41}, 1}, - {{119, 42}, 3}, - {{119, 43}, 1}, - {{119, 44}, 1}, - {{119, 45}, 3}, - {{119, 46}, 1}, - {{119, 47}, 3}, - {{119, 48}, 1}, - {{119, 49}, 1}, - {{119, 50}, 1}, - {{119, 51}, 1}, - {{119, 52}, 1}, - {{119, 53}, 1}, - {{119, 54}, 1}, - {{119, 55}, 1}, - {{119, 56}, 1}, - {{119, 57}, 1}, - {{119, 58}, 1}, - {{119, 59}, 1}, - {{119, 60}, 1}, - {{119, 61}, 1}, - {{119, 65}, 1}, - {{119, 66}, 3}, - {{119, 67}, 1}, - {{119, 68}, 3}, - {{119, 69}, 1}, - {{119, 70}, 1}, - {{119, 71}, 1}, - {{119, 72}, 1}, - {{119, 73}, 1}, - {{119, 74}, 1}, - {{119, 75}, 1}, - {{119, 105}, 1}, - {{119, 106}, 1}, - {{119, 107}, 1}, - {{120, 12}, 2}, - {{120, 13}, 3}, - {{120, 14}, 3}, - {{120, 15}, 3}, - {{120, 16}, 3}, - {{120, 17}, 3}, - {{120, 18}, 3}, - {{120, 19}, 3}, - {{120, 20}, 2}, - {{120, 21}, 3}, - {{120, 22}, 3}, - {{120, 23}, 3}, - {{120, 24}, 3}, - {{120, 25}, 3}, - {{120, 26}, 1}, - {{120, 27}, 1}, - {{120, 28}, 1}, - {{120, 29}, 3}, - {{120, 30}, 1}, - {{120, 31}, 3}, - {{120, 32}, 3}, - {{120, 33}, 3}, - {{120, 34}, 1}, - {{120, 35}, 1}, - {{120, 36}, 3}, - {{120, 37}, 3}, - {{120, 38}, 3}, - {{120, 39}, 3}, - {{120, 40}, 3}, - {{120, 41}, 1}, - {{120, 42}, 1}, - {{120, 43}, 1}, - {{120, 44}, 3}, - {{120, 45}, 1}, - {{120, 46}, 3}, - {{120, 47}, 1}, - {{120, 48}, 3}, - {{120, 49}, 1}, - {{120, 50}, 3}, - {{120, 51}, 1}, - {{120, 52}, 1}, - {{120, 53}, 1}, - {{120, 54}, 1}, - {{120, 55}, 1}, - {{120, 56}, 1}, - {{120, 57}, 1}, - {{120, 58}, 1}, - {{120, 59}, 1}, - {{120, 60}, 1}, - {{120, 61}, 1}, - {{120, 62}, 1}, - {{120, 67}, 1}, - {{120, 68}, 1}, - {{120, 69}, 1}, - {{120, 70}, 3}, - {{120, 71}, 1}, - {{120, 72}, 1}, - {{120, 73}, 1}, - {{120, 74}, 1}, - {{120, 75}, 1}, - {{120, 104}, 1}, - {{120, 105}, 1}, - {{120, 106}, 1}, - {{121, 12}, 2}, - {{121, 13}, 2}, - {{121, 14}, 3}, - {{121, 15}, 1}, - {{121, 16}, 1}, - {{121, 17}, 1}, - {{121, 18}, 3}, - {{121, 19}, 3}, - {{121, 20}, 1}, - {{121, 21}, 3}, - {{121, 22}, 3}, - {{121, 23}, 3}, - {{121, 24}, 1}, - {{121, 25}, 1}, - {{121, 26}, 3}, - {{121, 27}, 1}, - {{121, 28}, 3}, - {{121, 29}, 1}, - {{121, 30}, 3}, - {{121, 31}, 1}, - {{121, 32}, 1}, - {{121, 33}, 1}, - {{121, 34}, 3}, - {{121, 35}, 1}, - {{121, 36}, 3}, - {{121, 37}, 3}, - {{121, 38}, 3}, - {{121, 39}, 1}, - {{121, 40}, 3}, - {{121, 41}, 1}, - {{121, 42}, 3}, - {{121, 43}, 3}, - {{121, 44}, 1}, - {{121, 45}, 3}, - {{121, 46}, 1}, - {{121, 47}, 3}, - {{121, 48}, 1}, - {{121, 49}, 3}, - {{121, 50}, 1}, - {{121, 51}, 1}, - {{121, 52}, 1}, - {{121, 53}, 1}, - {{121, 54}, 3}, - {{121, 55}, 1}, - {{121, 56}, 1}, - {{121, 57}, 1}, - {{121, 58}, 1}, - {{121, 59}, 1}, - {{121, 60}, 1}, - {{121, 61}, 1}, - {{121, 62}, 1}, - {{121, 63}, 1}, - {{121, 68}, 1}, - {{121, 69}, 1}, - {{121, 70}, 1}, - {{121, 71}, 3}, - {{121, 72}, 1}, - {{121, 73}, 1}, - {{121, 74}, 1}, - {{121, 75}, 1}, - {{121, 102}, 3}, - {{121, 103}, 1}, - {{121, 104}, 3}, - {{121, 105}, 1}, - {{121, 106}, 1}, - {{122, 12}, 3}, - {{122, 13}, 2}, - {{122, 14}, 2}, - {{122, 15}, 3}, - {{122, 16}, 3}, - {{122, 17}, 3}, - {{122, 18}, 1}, - {{122, 19}, 1}, - {{122, 20}, 3}, - {{122, 21}, 1}, - {{122, 22}, 1}, - {{122, 23}, 1}, - {{122, 24}, 3}, - {{122, 25}, 1}, - {{122, 26}, 3}, - {{122, 27}, 1}, - {{122, 28}, 1}, - {{122, 29}, 1}, - {{122, 30}, 1}, - {{122, 31}, 3}, - {{122, 32}, 3}, - {{122, 33}, 3}, - {{122, 34}, 1}, - {{122, 35}, 3}, - {{122, 36}, 1}, - {{122, 37}, 3}, - {{122, 38}, 3}, - {{122, 39}, 3}, - {{122, 40}, 3}, - {{122, 41}, 3}, - {{122, 42}, 3}, - {{122, 43}, 1}, - {{122, 44}, 3}, - {{122, 45}, 1}, - {{122, 46}, 3}, - {{122, 47}, 1}, - {{122, 48}, 1}, - {{122, 49}, 1}, - {{122, 50}, 1}, - {{122, 51}, 1}, - {{122, 52}, 1}, - {{122, 53}, 3}, - {{122, 54}, 1}, - {{122, 55}, 3}, - {{122, 56}, 1}, - {{122, 57}, 1}, - {{122, 58}, 1}, - {{122, 59}, 1}, - {{122, 60}, 1}, - {{122, 61}, 1}, - {{122, 62}, 1}, - {{122, 63}, 1}, - {{122, 68}, 3}, - {{122, 69}, 1}, - {{122, 70}, 3}, - {{122, 71}, 1}, - {{122, 72}, 3}, - {{122, 73}, 1}, - {{122, 74}, 1}, - {{122, 100}, 1}, - {{122, 101}, 1}, - {{122, 102}, 3}, - {{122, 103}, 3}, - {{122, 104}, 1}, - {{123, 12}, 2}, - {{123, 13}, 2}, - {{123, 14}, 2}, - {{123, 15}, 3}, - {{123, 16}, 3}, - {{123, 17}, 3}, - {{123, 18}, 3}, - {{123, 19}, 1}, - {{123, 20}, 3}, - {{123, 21}, 3}, - {{123, 22}, 3}, - {{123, 23}, 3}, - {{123, 24}, 3}, - {{123, 25}, 3}, - {{123, 26}, 3}, - {{123, 27}, 3}, - {{123, 28}, 3}, - {{123, 29}, 3}, - {{123, 30}, 1}, - {{123, 31}, 3}, - {{123, 32}, 1}, - {{123, 33}, 3}, - {{123, 34}, 3}, - {{123, 35}, 1}, - {{123, 36}, 3}, - {{123, 37}, 1}, - {{123, 38}, 3}, - {{123, 39}, 3}, - {{123, 40}, 3}, - {{123, 41}, 3}, - {{123, 42}, 3}, - {{123, 43}, 3}, - {{123, 44}, 1}, - {{123, 45}, 3}, - {{123, 46}, 1}, - {{123, 47}, 3}, - {{123, 48}, 1}, - {{123, 49}, 1}, - {{123, 50}, 1}, - {{123, 51}, 1}, - {{123, 52}, 1}, - {{123, 53}, 1}, - {{123, 54}, 1}, - {{123, 55}, 1}, - {{123, 56}, 1}, - {{123, 57}, 1}, - {{123, 58}, 1}, - {{123, 59}, 1}, - {{123, 60}, 1}, - {{123, 61}, 1}, - {{123, 62}, 1}, - {{123, 63}, 1}, - {{123, 69}, 1}, - {{123, 70}, 1}, - {{123, 71}, 3}, - {{123, 72}, 1}, - {{123, 73}, 1}, - {{123, 74}, 1}, - {{123, 99}, 3}, - {{123, 100}, 1}, - {{123, 101}, 3}, - {{123, 102}, 1}, - {{123, 103}, 1}, - {{124, 12}, 2}, - {{124, 13}, 2}, - {{124, 14}, 2}, - {{124, 15}, 2}, - {{124, 16}, 3}, - {{124, 17}, 3}, - {{124, 18}, 3}, - {{124, 19}, 3}, - {{124, 20}, 1}, - {{124, 21}, 3}, - {{124, 22}, 3}, - {{124, 23}, 3}, - {{124, 24}, 3}, - {{124, 25}, 3}, - {{124, 26}, 3}, - {{124, 27}, 3}, - {{124, 28}, 1}, - {{124, 29}, 3}, - {{124, 30}, 3}, - {{124, 31}, 1}, - {{124, 32}, 3}, - {{124, 33}, 1}, - {{124, 34}, 3}, - {{124, 35}, 3}, - {{124, 36}, 1}, - {{124, 37}, 3}, - {{124, 38}, 1}, - {{124, 39}, 3}, - {{124, 40}, 3}, - {{124, 41}, 3}, - {{124, 42}, 3}, - {{124, 43}, 3}, - {{124, 44}, 3}, - {{124, 45}, 1}, - {{124, 46}, 3}, - {{124, 47}, 1}, - {{124, 48}, 1}, - {{124, 49}, 1}, - {{124, 50}, 1}, - {{124, 51}, 1}, - {{124, 52}, 3}, - {{124, 53}, 1}, - {{124, 54}, 1}, - {{124, 55}, 3}, - {{124, 56}, 1}, - {{124, 57}, 1}, - {{124, 58}, 1}, - {{124, 59}, 1}, - {{124, 60}, 1}, - {{124, 61}, 1}, - {{124, 62}, 1}, - {{124, 63}, 1}, - {{124, 64}, 1}, - {{124, 69}, 1}, - {{124, 70}, 3}, - {{124, 71}, 1}, - {{124, 72}, 1}, - {{124, 73}, 1}, - {{124, 74}, 1}, - {{124, 98}, 1}, - {{124, 99}, 1}, - {{124, 100}, 3}, - {{124, 101}, 3}, - {{124, 102}, 3}, - {{125, 13}, 2}, - {{125, 14}, 2}, - {{125, 15}, 2}, - {{125, 16}, 2}, - {{125, 17}, 2}, - {{125, 18}, 3}, - {{125, 19}, 3}, - {{125, 20}, 3}, - {{125, 21}, 3}, - {{125, 22}, 3}, - {{125, 23}, 3}, - {{125, 24}, 2}, - {{125, 25}, 3}, - {{125, 26}, 3}, - {{125, 27}, 3}, - {{125, 28}, 3}, - {{125, 29}, 3}, - {{125, 30}, 3}, - {{125, 31}, 3}, - {{125, 32}, 3}, - {{125, 33}, 3}, - {{125, 34}, 3}, - {{125, 35}, 1}, - {{125, 36}, 3}, - {{125, 37}, 1}, - {{125, 38}, 3}, - {{125, 39}, 1}, - {{125, 40}, 3}, - {{125, 41}, 3}, - {{125, 42}, 3}, - {{125, 43}, 3}, - {{125, 44}, 3}, - {{125, 45}, 3}, - {{125, 46}, 1}, - {{125, 47}, 1}, - {{125, 48}, 1}, - {{125, 49}, 1}, - {{125, 50}, 1}, - {{125, 51}, 1}, - {{125, 52}, 1}, - {{125, 53}, 3}, - {{125, 54}, 1}, - {{125, 55}, 1}, - {{125, 56}, 1}, - {{125, 57}, 1}, - {{125, 58}, 1}, - {{125, 59}, 1}, - {{125, 60}, 1}, - {{125, 61}, 1}, - {{125, 62}, 1}, - {{125, 63}, 1}, - {{125, 69}, 3}, - {{125, 70}, 1}, - {{125, 71}, 3}, - {{125, 72}, 1}, - {{125, 73}, 1}, - {{125, 95}, 1}, - {{125, 96}, 1}, - {{125, 97}, 1}, - {{125, 98}, 3}, - {{125, 99}, 3}, - {{125, 100}, 1}, - {{125, 101}, 1}, - {{125, 102}, 1}, - {{126, 14}, 2}, - {{126, 15}, 2}, - {{126, 16}, 2}, - {{126, 17}, 2}, - {{126, 18}, 2}, - {{126, 19}, 3}, - {{126, 20}, 3}, - {{126, 21}, 3}, - {{126, 22}, 2}, - {{126, 23}, 3}, - {{126, 24}, 2}, - {{126, 25}, 3}, - {{126, 26}, 2}, - {{126, 27}, 2}, - {{126, 28}, 3}, - {{126, 29}, 3}, - {{126, 30}, 3}, - {{126, 31}, 3}, - {{126, 32}, 3}, - {{126, 33}, 3}, - {{126, 34}, 3}, - {{126, 35}, 3}, - {{126, 36}, 3}, - {{126, 37}, 1}, - {{126, 38}, 3}, - {{126, 39}, 3}, - {{126, 40}, 3}, - {{126, 41}, 3}, - {{126, 42}, 3}, - {{126, 43}, 3}, - {{126, 44}, 3}, - {{126, 45}, 1}, - {{126, 46}, 1}, - {{126, 47}, 1}, - {{126, 48}, 1}, - {{126, 49}, 1}, - {{126, 50}, 3}, - {{126, 51}, 3}, - {{126, 52}, 3}, - {{126, 53}, 1}, - {{126, 54}, 3}, - {{126, 55}, 1}, - {{126, 56}, 1}, - {{126, 57}, 1}, - {{126, 58}, 1}, - {{126, 59}, 1}, - {{126, 60}, 1}, - {{126, 61}, 1}, - {{126, 62}, 1}, - {{126, 63}, 1}, - {{126, 64}, 1}, - {{126, 69}, 1}, - {{126, 70}, 3}, - {{126, 71}, 3}, - {{126, 72}, 1}, - {{126, 73}, 1}, - {{126, 92}, 3}, - {{126, 93}, 3}, - {{126, 94}, 3}, - {{126, 95}, 3}, - {{126, 96}, 1}, - {{126, 97}, 3}, - {{126, 98}, 3}, - {{126, 99}, 1}, - {{126, 100}, 3}, - {{127, 15}, 2}, - {{127, 16}, 2}, - {{127, 17}, 2}, - {{127, 18}, 2}, - {{127, 19}, 2}, - {{127, 20}, 2}, - {{127, 21}, 3}, - {{127, 22}, 2}, - {{127, 23}, 2}, - {{127, 24}, 3}, - {{127, 25}, 2}, - {{127, 26}, 3}, - {{127, 27}, 3}, - {{127, 28}, 3}, - {{127, 29}, 3}, - {{127, 30}, 3}, - {{127, 31}, 3}, - {{127, 32}, 3}, - {{127, 33}, 3}, - {{127, 34}, 3}, - {{127, 35}, 3}, - {{127, 36}, 3}, - {{127, 37}, 3}, - {{127, 38}, 3}, - {{127, 39}, 1}, - {{127, 40}, 3}, - {{127, 41}, 3}, - {{127, 42}, 3}, - {{127, 43}, 3}, - {{127, 44}, 3}, - {{127, 45}, 1}, - {{127, 46}, 3}, - {{127, 47}, 1}, - {{127, 48}, 3}, - {{127, 49}, 3}, - {{127, 50}, 1}, - {{127, 51}, 3}, - {{127, 52}, 1}, - {{127, 53}, 3}, - {{127, 54}, 1}, - {{127, 55}, 1}, - {{127, 56}, 1}, - {{127, 57}, 1}, - {{127, 58}, 1}, - {{127, 59}, 1}, - {{127, 60}, 1}, - {{127, 61}, 3}, - {{127, 62}, 1}, - {{127, 63}, 1}, - {{127, 69}, 3}, - {{127, 70}, 1}, - {{127, 71}, 1}, - {{127, 72}, 1}, - {{127, 73}, 1}, - {{127, 77}, 1}, - {{127, 78}, 1}, - {{127, 79}, 1}, - {{127, 80}, 1}, - {{127, 81}, 1}, - {{127, 83}, 1}, - {{127, 87}, 1}, - {{127, 89}, 3}, - {{127, 90}, 3}, - {{127, 91}, 3}, - {{127, 92}, 3}, - {{127, 93}, 3}, - {{127, 94}, 3}, - {{127, 95}, 1}, - {{127, 96}, 1}, - {{127, 97}, 1}, - {{127, 98}, 3}, - {{127, 99}, 3}, - {{127, 100}, 1}, - {{128, 16}, 2}, - {{128, 17}, 2}, - {{128, 18}, 2}, - {{128, 19}, 2}, - {{128, 20}, 2}, - {{128, 21}, 3}, - {{128, 22}, 3}, - {{128, 23}, 3}, - {{128, 24}, 2}, - {{128, 25}, 3}, - {{128, 26}, 2}, - {{128, 27}, 2}, - {{128, 28}, 2}, - {{128, 29}, 2}, - {{128, 30}, 3}, - {{128, 31}, 3}, - {{128, 32}, 3}, - {{128, 33}, 2}, - {{128, 34}, 3}, - {{128, 35}, 3}, - {{128, 36}, 3}, - {{128, 37}, 3}, - {{128, 38}, 3}, - {{128, 39}, 3}, - {{128, 40}, 3}, - {{128, 41}, 3}, - {{128, 42}, 1}, - {{128, 43}, 3}, - {{128, 44}, 1}, - {{128, 45}, 1}, - {{128, 46}, 1}, - {{128, 47}, 3}, - {{128, 48}, 1}, - {{128, 49}, 1}, - {{128, 50}, 3}, - {{128, 51}, 3}, - {{128, 52}, 3}, - {{128, 53}, 1}, - {{128, 54}, 1}, - {{128, 55}, 1}, - {{128, 56}, 1}, - {{128, 57}, 1}, - {{128, 58}, 1}, - {{128, 59}, 1}, - {{128, 60}, 1}, - {{128, 61}, 1}, - {{128, 62}, 1}, - {{128, 68}, 1}, - {{128, 69}, 3}, - {{128, 70}, 3}, - {{128, 71}, 1}, - {{128, 72}, 3}, - {{128, 73}, 1}, - {{128, 74}, 3}, - {{128, 75}, 3}, - {{128, 76}, 3}, - {{128, 77}, 3}, - {{128, 78}, 3}, - {{128, 79}, 3}, - {{128, 80}, 3}, - {{128, 81}, 3}, - {{128, 82}, 3}, - {{128, 83}, 1}, - {{128, 84}, 3}, - {{128, 85}, 1}, - {{128, 86}, 3}, - {{128, 87}, 3}, - {{128, 88}, 3}, - {{128, 89}, 3}, - {{128, 90}, 3}, - {{128, 91}, 3}, - {{128, 92}, 3}, - {{128, 93}, 3}, - {{128, 94}, 3}, - {{128, 95}, 1}, - {{128, 96}, 1}, - {{128, 97}, 1}, - {{128, 98}, 1}, - {{128, 99}, 1}, - {{128, 100}, 1}, - {{129, 16}, 2}, - {{129, 17}, 2}, - {{129, 18}, 2}, - {{129, 19}, 2}, - {{129, 20}, 2}, - {{129, 21}, 2}, - {{129, 22}, 2}, - {{129, 23}, 3}, - {{129, 24}, 3}, - {{129, 25}, 3}, - {{129, 26}, 3}, - {{129, 27}, 3}, - {{129, 28}, 3}, - {{129, 29}, 3}, - {{129, 30}, 2}, - {{129, 31}, 2}, - {{129, 32}, 3}, - {{129, 33}, 3}, - {{129, 34}, 3}, - {{129, 35}, 3}, - {{129, 36}, 3}, - {{129, 37}, 3}, - {{129, 38}, 3}, - {{129, 39}, 3}, - {{129, 40}, 1}, - {{129, 41}, 1}, - {{129, 42}, 3}, - {{129, 43}, 1}, - {{129, 44}, 1}, - {{129, 45}, 3}, - {{129, 46}, 1}, - {{129, 47}, 1}, - {{129, 48}, 3}, - {{129, 49}, 3}, - {{129, 50}, 3}, - {{129, 51}, 3}, - {{129, 52}, 3}, - {{129, 53}, 3}, - {{129, 54}, 1}, - {{129, 55}, 1}, - {{129, 56}, 1}, - {{129, 57}, 1}, - {{129, 58}, 1}, - {{129, 59}, 1}, - {{129, 60}, 3}, - {{129, 61}, 1}, - {{129, 62}, 1}, - {{129, 63}, 1}, - {{129, 68}, 3}, - {{129, 69}, 3}, - {{129, 70}, 3}, - {{129, 71}, 3}, - {{129, 72}, 1}, - {{129, 73}, 3}, - {{129, 74}, 3}, - {{129, 75}, 3}, - {{129, 76}, 3}, - {{129, 77}, 3}, - {{129, 78}, 2}, - {{129, 79}, 3}, - {{129, 80}, 3}, - {{129, 81}, 3}, - {{129, 82}, 3}, - {{129, 83}, 2}, - {{129, 84}, 3}, - {{129, 85}, 3}, - {{129, 86}, 3}, - {{129, 87}, 1}, - {{129, 88}, 1}, - {{129, 89}, 1}, - {{129, 90}, 3}, - {{129, 93}, 1}, - {{129, 94}, 3}, - {{129, 95}, 1}, - {{129, 96}, 3}, - {{129, 97}, 1}, - {{130, 16}, 2}, - {{130, 17}, 2}, - {{130, 18}, 2}, - {{130, 19}, 2}, - {{130, 20}, 2}, - {{130, 21}, 2}, - {{130, 22}, 2}, - {{130, 23}, 2}, - {{130, 24}, 2}, - {{130, 25}, 2}, - {{130, 26}, 2}, - {{130, 27}, 3}, - {{130, 28}, 2}, - {{130, 29}, 2}, - {{130, 30}, 3}, - {{130, 31}, 3}, - {{130, 32}, 3}, - {{130, 33}, 3}, - {{130, 34}, 2}, - {{130, 35}, 3}, - {{130, 36}, 3}, - {{130, 37}, 3}, - {{130, 38}, 2}, - {{130, 39}, 3}, - {{130, 40}, 3}, - {{130, 41}, 3}, - {{130, 42}, 1}, - {{130, 43}, 3}, - {{130, 44}, 1}, - {{130, 45}, 1}, - {{130, 46}, 3}, - {{130, 47}, 3}, - {{130, 48}, 1}, - {{130, 49}, 3}, - {{130, 50}, 3}, - {{130, 51}, 3}, - {{130, 52}, 3}, - {{130, 53}, 3}, - {{130, 54}, 1}, - {{130, 55}, 1}, - {{130, 56}, 1}, - {{130, 57}, 1}, - {{130, 58}, 1}, - {{130, 59}, 1}, - {{130, 60}, 1}, - {{130, 61}, 1}, - {{130, 62}, 1}, - {{130, 63}, 1}, - {{130, 68}, 2}, - {{130, 69}, 2}, - {{130, 70}, 2}, - {{130, 71}, 2}, - {{130, 72}, 2}, - {{130, 73}, 2}, - {{130, 74}, 2}, - {{130, 75}, 2}, - {{130, 76}, 2}, - {{130, 77}, 2}, - {{130, 78}, 2}, - {{130, 79}, 3}, - {{130, 80}, 3}, - {{130, 81}, 3}, - {{130, 82}, 1}, - {{130, 83}, 1}, - {{130, 84}, 1}, - {{130, 86}, 1}, - {{131, 17}, 2}, - {{131, 18}, 2}, - {{131, 19}, 2}, - {{131, 20}, 2}, - {{131, 21}, 2}, - {{131, 22}, 2}, - {{131, 23}, 2}, - {{131, 24}, 2}, - {{131, 25}, 2}, - {{131, 26}, 2}, - {{131, 27}, 2}, - {{131, 28}, 3}, - {{131, 29}, 3}, - {{131, 30}, 2}, - {{131, 31}, 2}, - {{131, 32}, 2}, - {{131, 33}, 2}, - {{131, 34}, 3}, - {{131, 35}, 2}, - {{131, 36}, 3}, - {{131, 37}, 3}, - {{131, 38}, 3}, - {{131, 39}, 1}, - {{131, 40}, 3}, - {{131, 41}, 1}, - {{131, 42}, 1}, - {{131, 43}, 1}, - {{131, 44}, 3}, - {{131, 45}, 1}, - {{131, 46}, 1}, - {{131, 47}, 1}, - {{131, 48}, 3}, - {{131, 49}, 3}, - {{131, 50}, 3}, - {{131, 51}, 3}, - {{131, 52}, 3}, - {{131, 53}, 1}, - {{131, 54}, 1}, - {{131, 55}, 1}, - {{131, 56}, 1}, - {{131, 57}, 1}, - {{131, 58}, 1}, - {{131, 59}, 1}, - {{131, 60}, 3}, - {{131, 61}, 1}, - {{131, 62}, 1}, - {{131, 63}, 1}, - {{131, 67}, 3}, - {{131, 68}, 2}, - {{131, 69}, 2}, - {{131, 70}, 2}, - {{131, 71}, 2}, - {{131, 72}, 3}, - {{131, 73}, 2}, - {{131, 74}, 3}, - {{131, 75}, 2}, - {{131, 76}, 3}, - {{131, 77}, 3}, - {{131, 78}, 1}, - {{131, 79}, 3}, - {{131, 80}, 1}, - {{131, 81}, 1}, - {{132, 18}, 2}, - {{132, 19}, 2}, - {{132, 20}, 2}, - {{132, 21}, 2}, - {{132, 22}, 2}, - {{132, 23}, 2}, - {{132, 24}, 2}, - {{132, 25}, 2}, - {{132, 26}, 2}, - {{132, 27}, 2}, - {{132, 28}, 2}, - {{132, 29}, 2}, - {{132, 30}, 3}, - {{132, 31}, 3}, - {{132, 32}, 3}, - {{132, 33}, 3}, - {{132, 34}, 2}, - {{132, 35}, 3}, - {{132, 36}, 2}, - {{132, 37}, 3}, - {{132, 38}, 3}, - {{132, 39}, 3}, - {{132, 40}, 1}, - {{132, 41}, 3}, - {{132, 42}, 3}, - {{132, 43}, 1}, - {{132, 44}, 1}, - {{132, 45}, 3}, - {{132, 46}, 3}, - {{132, 47}, 3}, - {{132, 48}, 3}, - {{132, 49}, 3}, - {{132, 50}, 3}, - {{132, 51}, 3}, - {{132, 52}, 1}, - {{132, 53}, 1}, - {{132, 54}, 1}, - {{132, 55}, 1}, - {{132, 56}, 3}, - {{132, 57}, 1}, - {{132, 58}, 1}, - {{132, 59}, 3}, - {{132, 60}, 1}, - {{132, 61}, 1}, - {{132, 62}, 1}, - {{132, 68}, 2}, - {{132, 69}, 2}, - {{132, 70}, 2}, - {{132, 71}, 2}, - {{132, 72}, 3}, - {{132, 73}, 3}, - {{132, 74}, 3}, - {{132, 76}, 1}, - {{132, 77}, 1}, - {{132, 78}, 1}, - {{133, 19}, 2}, - {{133, 20}, 2}, - {{133, 21}, 2}, - {{133, 22}, 2}, - {{133, 23}, 2}, - {{133, 24}, 2}, - {{133, 25}, 2}, - {{133, 26}, 2}, - {{133, 27}, 2}, - {{133, 28}, 2}, - {{133, 29}, 2}, - {{133, 30}, 2}, - {{133, 31}, 2}, - {{133, 32}, 2}, - {{133, 33}, 2}, - {{133, 34}, 2}, - {{133, 35}, 2}, - {{133, 36}, 3}, - {{133, 37}, 3}, - {{133, 38}, 3}, - {{133, 39}, 1}, - {{133, 40}, 1}, - {{133, 41}, 1}, - {{133, 42}, 1}, - {{133, 43}, 3}, - {{133, 44}, 3}, - {{133, 45}, 1}, - {{133, 46}, 1}, - {{133, 47}, 3}, - {{133, 48}, 3}, - {{133, 49}, 2}, - {{133, 50}, 3}, - {{133, 51}, 1}, - {{133, 52}, 1}, - {{133, 53}, 1}, - {{133, 54}, 1}, - {{133, 55}, 1}, - {{133, 56}, 1}, - {{133, 57}, 1}, - {{133, 58}, 1}, - {{133, 59}, 1}, - {{133, 60}, 1}, - {{133, 61}, 1}, - {{133, 62}, 1}, - {{133, 63}, 1}, - {{133, 68}, 2}, - {{133, 69}, 2}, - {{133, 70}, 3}, - {{133, 71}, 3}, - {{133, 72}, 1}, - {{134, 20}, 2}, - {{134, 21}, 2}, - {{134, 22}, 2}, - {{134, 23}, 2}, - {{134, 24}, 2}, - {{134, 25}, 2}, - {{134, 26}, 2}, - {{134, 27}, 2}, - {{134, 28}, 2}, - {{134, 29}, 2}, - {{134, 30}, 2}, - {{134, 31}, 2}, - {{134, 32}, 2}, - {{134, 33}, 2}, - {{134, 34}, 3}, - {{134, 35}, 3}, - {{134, 36}, 3}, - {{134, 37}, 3}, - {{134, 38}, 1}, - {{134, 39}, 3}, - {{134, 40}, 1}, - {{134, 41}, 3}, - {{134, 42}, 1}, - {{134, 43}, 1}, - {{134, 44}, 3}, - {{134, 45}, 3}, - {{134, 46}, 3}, - {{134, 47}, 3}, - {{134, 48}, 3}, - {{134, 49}, 3}, - {{134, 50}, 1}, - {{134, 51}, 1}, - {{134, 52}, 1}, - {{134, 53}, 3}, - {{134, 54}, 1}, - {{134, 55}, 1}, - {{134, 56}, 1}, - {{134, 57}, 1}, - {{134, 58}, 1}, - {{134, 59}, 1}, - {{134, 60}, 1}, - {{134, 61}, 1}, - {{134, 62}, 1}, - {{134, 63}, 1}, - {{135, 21}, 2}, - {{135, 22}, 2}, - {{135, 23}, 2}, - {{135, 24}, 2}, - {{135, 25}, 2}, - {{135, 26}, 2}, - {{135, 27}, 2}, - {{135, 28}, 2}, - {{135, 29}, 2}, - {{135, 30}, 2}, - {{135, 31}, 2}, - {{135, 32}, 2}, - {{135, 33}, 2}, - {{135, 34}, 3}, - {{135, 35}, 3}, - {{135, 36}, 1}, - {{135, 37}, 1}, - {{135, 38}, 1}, - {{135, 39}, 1}, - {{135, 40}, 3}, - {{135, 41}, 1}, - {{135, 42}, 3}, - {{135, 43}, 3}, - {{135, 44}, 1}, - {{135, 45}, 3}, - {{135, 46}, 1}, - {{135, 47}, 3}, - {{135, 48}, 3}, - {{135, 49}, 1}, - {{135, 50}, 3}, - {{135, 51}, 3}, - {{135, 52}, 1}, - {{135, 53}, 1}, - {{135, 54}, 3}, - {{135, 55}, 1}, - {{135, 56}, 3}, - {{135, 57}, 3}, - {{135, 58}, 1}, - {{135, 59}, 1}, - {{135, 60}, 1}, - {{135, 61}, 1}, - {{135, 62}, 1}, - {{135, 63}, 1}, - {{136, 22}, 2}, - {{136, 23}, 2}, - {{136, 24}, 2}, - {{136, 25}, 2}, - {{136, 26}, 2}, - {{136, 27}, 2}, - {{136, 28}, 2}, - {{136, 29}, 2}, - {{136, 30}, 2}, - {{136, 31}, 2}, - {{136, 32}, 2}, - {{136, 33}, 3}, - {{136, 34}, 3}, - {{136, 35}, 3}, - {{136, 36}, 1}, - {{136, 37}, 3}, - {{136, 38}, 3}, - {{136, 39}, 1}, - {{136, 40}, 1}, - {{136, 41}, 3}, - {{136, 42}, 1}, - {{136, 43}, 1}, - {{136, 44}, 3}, - {{136, 45}, 1}, - {{136, 46}, 3}, - {{136, 47}, 1}, - {{136, 48}, 1}, - {{136, 49}, 3}, - {{136, 50}, 1}, - {{136, 51}, 1}, - {{136, 52}, 1}, - {{136, 53}, 1}, - {{136, 54}, 1}, - {{136, 55}, 1}, - {{136, 56}, 1}, - {{136, 57}, 1}, - {{136, 58}, 1}, - {{136, 59}, 1}, - {{136, 60}, 1}, - {{136, 61}, 1}, - {{136, 62}, 1}, - {{136, 63}, 1}, - {{136, 64}, 1}, - {{137, 24}, 2}, - {{137, 25}, 2}, - {{137, 26}, 2}, - {{137, 27}, 2}, - {{137, 28}, 2}, - {{137, 29}, 2}, - {{137, 30}, 2}, - {{137, 31}, 3}, - {{137, 32}, 3}, - {{137, 33}, 3}, - {{137, 34}, 3}, - {{137, 35}, 1}, - {{137, 36}, 3}, - {{137, 37}, 1}, - {{137, 38}, 3}, - {{137, 39}, 3}, - {{137, 40}, 3}, - {{137, 41}, 3}, - {{137, 42}, 3}, - {{137, 43}, 3}, - {{137, 44}, 3}, - {{137, 45}, 3}, - {{137, 46}, 1}, - {{137, 47}, 3}, - {{137, 48}, 1}, - {{137, 49}, 1}, - {{137, 50}, 1}, - {{137, 51}, 1}, - {{137, 52}, 3}, - {{137, 53}, 3}, - {{137, 54}, 1}, - {{137, 55}, 3}, - {{137, 56}, 1}, - {{137, 57}, 1}, - {{137, 58}, 1}, - {{137, 59}, 1}, - {{137, 60}, 1}, - {{137, 61}, 1}, - {{137, 62}, 1}, - {{137, 63}, 1}, - {{137, 64}, 1}, - {{137, 65}, 1}, - {{138, 26}, 2}, - {{138, 27}, 2}, - {{138, 28}, 2}, - {{138, 34}, 1}, - {{138, 35}, 3}, - {{138, 36}, 3}, - {{138, 37}, 3}, - {{138, 38}, 3}, - {{138, 39}, 3}, - {{138, 40}, 3}, - {{138, 41}, 3}, - {{138, 42}, 3}, - {{138, 43}, 3}, - {{138, 44}, 1}, - {{138, 45}, 3}, - {{138, 46}, 1}, - {{138, 47}, 1}, - {{138, 48}, 3}, - {{138, 49}, 1}, - {{138, 50}, 3}, - {{138, 51}, 3}, - {{138, 52}, 1}, - {{138, 53}, 1}, - {{138, 54}, 3}, - {{138, 55}, 1}, - {{138, 56}, 1}, - {{138, 57}, 1}, - {{138, 58}, 1}, - {{138, 59}, 1}, - {{138, 60}, 1}, - {{138, 61}, 1}, - {{138, 62}, 1}, - {{138, 63}, 1}, - {{138, 64}, 1}, - {{138, 65}, 1}, - {{138, 66}, 1}, - {{139, 36}, 1}, - {{139, 37}, 3}, - {{139, 38}, 3}, - {{139, 39}, 2}, - {{139, 40}, 2}, - {{139, 41}, 3}, - {{139, 42}, 3}, - {{139, 43}, 3}, - {{139, 44}, 1}, - {{139, 45}, 1}, - {{139, 46}, 3}, - {{139, 47}, 1}, - {{139, 48}, 3}, - {{139, 49}, 3}, - {{139, 50}, 1}, - {{139, 51}, 1}, - {{139, 52}, 3}, - {{139, 53}, 3}, - {{139, 54}, 1}, - {{139, 55}, 3}, - {{139, 56}, 1}, - {{139, 57}, 1}, - {{139, 58}, 1}, - {{139, 59}, 1}, - {{139, 60}, 1}, - {{139, 61}, 3}, - {{139, 62}, 1}, - {{139, 63}, 1}, - {{139, 64}, 1}, - {{139, 65}, 1}, - {{139, 66}, 1}, - {{139, 67}, 1}, - {{140, 38}, 1}, - {{140, 39}, 3}, - {{140, 40}, 3}, - {{140, 41}, 3}, - {{140, 42}, 3}, - {{140, 43}, 3}, - {{140, 44}, 3}, - {{140, 45}, 3}, - {{140, 46}, 1}, - {{140, 47}, 3}, - {{140, 48}, 1}, - {{140, 49}, 3}, - {{140, 50}, 3}, - {{140, 51}, 3}, - {{140, 52}, 1}, - {{140, 53}, 1}, - {{140, 54}, 1}, - {{140, 55}, 1}, - {{140, 56}, 1}, - {{140, 57}, 1}, - {{140, 58}, 1}, - {{140, 60}, 1}, - {{140, 61}, 1}, - {{140, 62}, 1}, - {{140, 63}, 1}, - {{140, 64}, 1}, - {{140, 65}, 1}, - {{140, 66}, 1}, - {{140, 67}, 1}, - {{140, 68}, 1}, - {{141, 41}, 3}, - {{141, 42}, 3}, - {{141, 43}, 3}, - {{141, 44}, 3}, - {{141, 45}, 3}, - {{141, 46}, 3}, - {{141, 47}, 1}, - {{141, 48}, 3}, - {{141, 49}, 1}, - {{141, 50}, 1}, - {{141, 51}, 3}, - {{141, 52}, 1}, - {{141, 53}, 3}, - {{141, 54}, 1}, - {{141, 55}, 1}, - {{141, 56}, 1}, - {{141, 57}, 3}, - {{141, 58}, 1}, - {{141, 61}, 1}, - {{141, 62}, 3}, - {{141, 63}, 1}, - {{141, 64}, 3}, - {{141, 65}, 1}, - {{141, 66}, 1}, - {{141, 67}, 1}, - {{141, 68}, 1}, - {{141, 69}, 1}, - {{142, 42}, 3}, - {{142, 43}, 3}, - {{142, 44}, 3}, - {{142, 45}, 3}, - {{142, 46}, 3}, - {{142, 47}, 3}, - {{142, 48}, 1}, - {{142, 49}, 3}, - {{142, 50}, 1}, - {{142, 51}, 1}, - {{142, 52}, 3}, - {{142, 53}, 1}, - {{142, 54}, 3}, - {{142, 55}, 1}, - {{142, 56}, 1}, - {{142, 57}, 1}, - {{142, 58}, 1}, - {{142, 62}, 3}, - {{142, 63}, 3}, - {{142, 64}, 3}, - {{142, 65}, 1}, - {{142, 66}, 3}, - {{142, 67}, 1}, - {{142, 68}, 1}, - {{142, 69}, 1}, - {{142, 70}, 1}, - {{143, 43}, 3}, - {{143, 44}, 3}, - {{143, 45}, 3}, - {{143, 46}, 3}, - {{143, 47}, 3}, - {{143, 48}, 3}, - {{143, 49}, 1}, - {{143, 50}, 3}, - {{143, 51}, 1}, - {{143, 52}, 1}, - {{143, 53}, 1}, - {{143, 54}, 1}, - {{143, 55}, 3}, - {{143, 56}, 1}, - {{143, 57}, 3}, - {{143, 58}, 1}, - {{143, 63}, 3}, - {{143, 64}, 3}, - {{143, 65}, 3}, - {{143, 66}, 1}, - {{143, 67}, 1}, - {{143, 68}, 1}, - {{143, 69}, 1}, - {{143, 70}, 1}, - {{143, 71}, 1}, - {{144, 44}, 1}, - {{144, 45}, 3}, - {{144, 46}, 1}, - {{144, 47}, 3}, - {{144, 48}, 1}, - {{144, 49}, 1}, - {{144, 50}, 1}, - {{144, 51}, 1}, - {{144, 52}, 3}, - {{144, 53}, 1}, - {{144, 54}, 3}, - {{144, 55}, 1}, - {{144, 56}, 1}, - {{144, 57}, 1}, - {{144, 58}, 1}, - {{144, 64}, 3}, - {{144, 65}, 3}, - {{144, 66}, 2}, - {{144, 67}, 3}, - {{144, 68}, 1}, - {{144, 69}, 1}, - {{144, 70}, 1}, - {{144, 71}, 1}, - {{144, 72}, 1}, - {{145, 46}, 3}, - {{145, 47}, 1}, - {{145, 48}, 3}, - {{145, 49}, 1}, - {{145, 50}, 3}, - {{145, 51}, 1}, - {{145, 52}, 3}, - {{145, 53}, 1}, - {{145, 54}, 1}, - {{145, 55}, 3}, - {{145, 56}, 1}, - {{145, 57}, 1}, - {{145, 58}, 3}, - {{145, 59}, 1}, - {{145, 60}, 1}, - {{145, 65}, 2}, - {{145, 66}, 3}, - {{145, 67}, 2}, - {{145, 68}, 3}, - {{145, 69}, 1}, - {{145, 70}, 1}, - {{145, 71}, 1}, - {{145, 72}, 1}, - {{145, 73}, 1}, - {{146, 46}, 1}, - {{146, 47}, 3}, - {{146, 48}, 3}, - {{146, 49}, 3}, - {{146, 50}, 3}, - {{146, 51}, 1}, - {{146, 52}, 3}, - {{146, 53}, 3}, - {{146, 54}, 3}, - {{146, 55}, 1}, - {{146, 56}, 3}, - {{146, 57}, 1}, - {{146, 58}, 1}, - {{146, 59}, 3}, - {{146, 60}, 1}, - {{146, 66}, 2}, - {{146, 67}, 3}, - {{146, 68}, 3}, - {{146, 69}, 1}, - {{146, 70}, 1}, - {{146, 71}, 1}, - {{146, 72}, 1}, - {{146, 73}, 1}, - {{146, 74}, 1}, - {{147, 47}, 3}, - {{147, 48}, 3}, - {{147, 49}, 3}, - {{147, 50}, 3}, - {{147, 51}, 3}, - {{147, 52}, 1}, - {{147, 53}, 1}, - {{147, 54}, 1}, - {{147, 55}, 1}, - {{147, 56}, 1}, - {{147, 57}, 1}, - {{147, 58}, 1}, - {{147, 59}, 1}, - {{147, 66}, 1}, - {{147, 67}, 3}, - {{147, 68}, 3}, - {{147, 69}, 3}, - {{147, 70}, 1}, - {{147, 71}, 1}, - {{147, 72}, 1}, - {{147, 73}, 1}, - {{147, 74}, 1}, - {{148, 48}, 1}, - {{148, 50}, 3}, - {{148, 52}, 3}, - {{148, 53}, 1}, - {{148, 54}, 3}, - {{148, 55}, 3}, - {{148, 56}, 3}, - {{148, 57}, 3}, - {{148, 58}, 1}, - {{148, 68}, 1}, - {{148, 69}, 1}, - {{148, 70}, 1}, - {{148, 71}, 1}, - {{148, 72}, 1}, - {{148, 73}, 1}, - {{148, 74}, 1}, - {{149, 53}, 3}, - {{149, 54}, 1}, - {{149, 55}, 1}, - {{149, 56}, 1}, - {{149, 57}, 1}, - {{149, 67}, 3}, - {{149, 68}, 1}, - {{149, 69}, 1}, - {{149, 70}, 1}, - {{149, 71}, 1}, - {{149, 72}, 1}, - {{149, 73}, 1}, - {{149, 74}, 1}, - {{149, 75}, 1}, - {{149, 76}, 1}, - {{149, 77}, 1}, - {{149, 78}, 1}, - {{150, 65}, 2}, - {{150, 66}, 2}, - {{150, 67}, 3}, - {{150, 68}, 2}, - {{150, 69}, 3}, - {{150, 70}, 3}, - {{150, 71}, 3}, - {{150, 72}, 3}, - {{150, 73}, 1}, - {{150, 74}, 3}, - {{150, 75}, 1}, - {{150, 76}, 3}, - {{150, 77}, 1}, - {{150, 78}, 3}, - {{150, 79}, 1}, - {{150, 80}, 1}, - {{150, 81}, 1}, - {{150, 82}, 1}, - {{150, 84}, 1}, - {{150, 92}, 1}, - {{150, 94}, 1}, - {{150, 95}, 1}, - {{150, 96}, 1}, - {{151, 65}, 2}, - {{151, 66}, 2}, - {{151, 67}, 2}, - {{151, 68}, 3}, - {{151, 69}, 3}, - {{151, 70}, 3}, - {{151, 71}, 3}, - {{151, 72}, 3}, - {{151, 73}, 2}, - {{151, 74}, 3}, - {{151, 75}, 3}, - {{151, 76}, 3}, - {{151, 77}, 1}, - {{151, 78}, 3}, - {{151, 79}, 1}, - {{151, 80}, 3}, - {{151, 81}, 3}, - {{151, 82}, 3}, - {{151, 83}, 3}, - {{151, 84}, 1}, - {{151, 85}, 1}, - {{151, 86}, 1}, - {{151, 87}, 1}, - {{151, 88}, 3}, - {{151, 89}, 1}, - {{151, 90}, 3}, - {{151, 91}, 3}, - {{151, 92}, 1}, - {{151, 93}, 1}, - {{151, 94}, 3}, - {{151, 95}, 3}, - {{151, 96}, 3}, - {{151, 97}, 3}, - {{151, 98}, 1}, - {{151, 99}, 1}, - {{152, 65}, 2}, - {{152, 66}, 2}, - {{152, 67}, 3}, - {{152, 68}, 1}, - {{152, 69}, 2}, - {{152, 70}, 3}, - {{152, 71}, 3}, - {{152, 72}, 3}, - {{152, 73}, 3}, - {{152, 74}, 3}, - {{152, 75}, 2}, - {{152, 76}, 3}, - {{152, 77}, 3}, - {{152, 78}, 3}, - {{152, 79}, 3}, - {{152, 80}, 3}, - {{152, 81}, 1}, - {{152, 82}, 1}, - {{152, 83}, 1}, - {{152, 84}, 3}, - {{152, 85}, 3}, - {{152, 86}, 3}, - {{152, 87}, 3}, - {{152, 88}, 3}, - {{152, 89}, 3}, - {{152, 90}, 3}, - {{152, 91}, 1}, - {{152, 92}, 1}, - {{152, 93}, 1}, - {{152, 94}, 1}, - {{152, 95}, 1}, - {{152, 96}, 1}, - {{152, 97}, 1}, - {{152, 98}, 3}, - {{152, 99}, 3}, - {{152, 100}, 1}, - {{152, 101}, 1}, - {{152, 102}, 1}, - {{152, 104}, 1}, - {{153, 66}, 1}, - {{153, 67}, 3}, - {{153, 68}, 1}, - {{153, 69}, 1}, - {{153, 70}, 3}, - {{153, 71}, 1}, - {{153, 72}, 1}, - {{153, 73}, 3}, - {{153, 74}, 1}, - {{153, 75}, 1}, - {{153, 76}, 3}, - {{153, 77}, 3}, - {{153, 78}, 1}, - {{153, 79}, 3}, - {{153, 80}, 1}, - {{153, 81}, 3}, - {{153, 82}, 3}, - {{153, 83}, 3}, - {{153, 84}, 1}, - {{153, 85}, 3}, - {{153, 86}, 3}, - {{153, 87}, 3}, - {{153, 88}, 3}, - {{153, 89}, 3}, - {{153, 90}, 3}, - {{153, 91}, 3}, - {{153, 92}, 3}, - {{153, 93}, 1}, - {{153, 94}, 1}, - {{153, 95}, 1}, - {{153, 96}, 3}, - {{153, 97}, 1}, - {{153, 98}, 1}, - {{153, 99}, 1}, - {{153, 100}, 3}, - {{153, 101}, 1}, - {{153, 102}, 3}, - {{153, 103}, 1}, - {{153, 104}, 1}, - {{153, 105}, 1}, - {{154, 72}, 1}, - {{154, 74}, 1}, - {{154, 90}, 1}, - {{154, 91}, 1}, - {{154, 92}, 1}, - {{154, 96}, 1}, - {{154, 97}, 1}, - {{154, 98}, 1}, - {{154, 99}, 1}, - {{154, 100}, 1}, - {{154, 101}, 1}, - {{154, 102}, 1}, - {{154, 103}, 1}, - {{154, 104}, 3}, - {{154, 105}, 1}, - {{154, 106}, 1}, - {{155, 101}, 1}, - {{155, 102}, 1}, - {{155, 103}, 1}, - {{155, 104}, 1}, - {{155, 105}, 1}, - {{155, 106}, 1}, - {{155, 107}, 1} -} - -return tiles diff --git a/maps/wave_of_death/spectate.lua b/maps/wave_of_death/spectate.lua deleted file mode 100644 index 651872d04..000000000 --- a/maps/wave_of_death/spectate.lua +++ /dev/null @@ -1,8 +0,0 @@ ---luacheck: ignore -local function spectate_button() -end - -local function on_gui_click() -end - -event.add(defines.events.on_gui_click, on_gui_click) diff --git a/maps/wave_of_death/terrain.lua b/maps/wave_of_death/terrain.lua deleted file mode 100644 index 361b7f01a..000000000 --- a/maps/wave_of_death/terrain.lua +++ /dev/null @@ -1,250 +0,0 @@ ---luacheck: ignore -local simplex_noise = require 'utils.math.simplex_noise'.d2 -local math_random = math.random -local wod_logo_tiles = require 'maps.wave_of_death.logo' -local noises = { - ['biter_territory_decoratives'] = { { modifier = 0.03, weight = 1 }, { modifier = 0.05, weight = 0.3 }, { modifier = 0.1, weight = 0.05 } }, - ['biter_territory_beach'] = { { modifier = 0.07, weight = 1 }, { modifier = 0.03, weight = 0.3 }, { modifier = 0.1, weight = 0.1 } }, - ['rocks'] = { { modifier = 0.01, weight = 1 }, { modifier = 0.04, weight = 0.3 }, { modifier = 0.1, weight = 0.05 } }, - ['trees'] = { { modifier = 0.01, weight = 1 }, { modifier = 0.04, weight = 0.3 }, { modifier = 0.1, weight = 0.05 } }, - ['ore'] = { { modifier = 0.008, weight = 1 }, { modifier = 0.025, weight = 0.25 }, { modifier = 0.1, weight = 0.1 } }, - ['ponds'] = { { modifier = 0.012, weight = 1 }, { modifier = 0.035, weight = 0.25 }, { modifier = 0.1, weight = 0.1 } }, - ['grass'] = { { modifier = 0.005, weight = 1 }, { modifier = 0.01, weight = 0.25 }, { modifier = 0.1, weight = 0.03 } }, - ['decoratives'] = { { modifier = 0.03, weight = 1 }, { modifier = 0.015, weight = 0.25 }, { modifier = 0.1, weight = 0.1 } }, - ['random_things'] = { { modifier = 3, weight = 1 } } -} -local decorative_whitelist = { - 'garballo', - 'garballo-mini-dry', - 'green-asterisk', - 'green-bush-mini', - 'green-carpet-grass', - 'green-hairy-grass', - 'green-pita', - 'green-pita-mini', - 'green-small-grass' -} - -local function get_noise(name, pos, seed) - local noise = 0 - for _, n in pairs(noises[name]) do - noise = noise + simplex_noise(pos.x * n.modifier, pos.y * n.modifier, seed) * n.weight - seed = seed + 10000 - end - return noise -end - -local function wod_logo(surface, left_top) - if left_top.y ~= -320 then - return - end - if left_top.x ~= -256 then - return - end - for _, tile in pairs(wod_logo_tiles.data) do - surface.set_tiles({ { name = wod_logo_tiles.index[tile[2]], position = { tile[1][1] - 50, tile[1][2] - 436 } } }) - end -end - -local function init(surface, left_top) - if left_top.x ~= 256 then - return - end - if left_top.y ~= 256 then - return - end - - storage.loaders = {} - for i = 1, 4, 1 do - local position = { x = -208 + 160 * (i - 1), y = 32 } - - for x = -12, 12, 1 do - for y = -12, 12, 1 do - local pos = { x = position.x + x, y = position.y + y } - local distance_to_center = math.sqrt(x ^ 2 + y ^ 2) - if distance_to_center < 3.5 then - surface.set_tiles({ { name = 'stone-path', position = pos } }) - else - if distance_to_center < 9 then - if surface.get_tile(pos).name == 'water' then - surface.set_tiles({ { name = 'grass-2', position = pos } }) - end - end - end - end - end - - for _, e in pairs(surface.find_entities_filtered({ area = { { position.x - 2, position.y - 2 }, { position.x + 3, position.y + 3 } }, force = 'neutral' })) do - e.destroy() - end - - storage.loaders[i] = surface.create_entity({ name = 'loader', position = position, force = tostring(i) }) - storage.loaders[i].minable = false - - game.forces[i].set_spawn_position({ x = position.x, y = position.y + 8 }, surface) - - --rendering.draw_sprite({sprite = "file/maps/wave_of_death/WoD.png", target = {x = -140 + 160*(i - 1), y = 0}, surface = surface, orientation = 0, x_scale = 2, y_scale = 2, render_layer = "ground_tile"}) - end - - local center_position = { x = 32, y = 0 } - for x = -6, 6, 1 do - for y = -6, 6, 1 do - if math.sqrt(x ^ 2 + y ^ 2) < 6 then - local pos = { x = center_position.x + x, y = center_position.y + y } - surface.set_tiles({ { name = 'water-shallow', position = pos } }) - end - end - end -end - -local function place_entities(surface, position, noise_position, seed) - local noise = get_noise('ponds', noise_position, seed + 50000) - local noise_2 = get_noise('decoratives', noise_position, seed + 60000) - if noise > -0.1 and noise < 0.1 and noise_2 > 0.3 then - surface.set_tiles({ { name = 'water', position = position } }) - if get_noise('random_things', noise_position, seed) > 0.82 then - surface.create_entity({ name = 'fish', position = position }) - end - return - end - local noise = get_noise('ore', noise_position, seed + 5000) - if noise > 0.75 then - surface.create_entity({ name = 'iron-ore', position = position, amount = 1000 + math.abs(noise * 1000) }) - return - end - local noise = get_noise('ore', noise_position, seed + 10000) - if noise > 0.75 then - surface.create_entity({ name = 'copper-ore', position = position, amount = 1000 + math.abs(noise * 1000) }) - return - end - local noise = get_noise('ore', noise_position, seed + 15000) - if noise > 0.82 then - surface.create_entity({ name = 'coal', position = position, amount = 1000 + math.abs(noise * 1000) }) - return - end - local noise = get_noise('ore', noise_position, seed + 20000) - if noise > 0.82 then - surface.create_entity({ name = 'stone', position = position, amount = 1000 + math.abs(noise * 1000) }) - return - end - local noise = get_noise('ore', noise_position, seed + 25000) - if noise > 0.93 then - surface.create_entity({ name = 'uranium-ore', position = position, amount = 1000 + math.abs(noise * 1000) }) - return - end - if noise < -0.93 then - if surface.can_place_entity({ name = 'crude-oil', position = position, amount = 1000 }) and get_noise('random_things', noise_position, seed) > 0.5 then - surface.create_entity({ name = 'crude-oil', position = position, amount = 200000 + math.abs(noise * 1000) }) - end - return - end - - if get_noise('rocks', noise_position, seed + 30000) > 0.82 then - local random_noise = get_noise('random_things', noise_position, seed) - if random_noise > 0.5 then - if random_noise > 0.75 then - surface.create_entity({ name = 'big-rock', position = position }) - else - surface.create_entity({ name = 'huge-rock', position = position }) - end - end - return - end - - local noise = get_noise('trees', noise_position, seed + 35000) - if noise > 0.65 then - if get_noise('random_things', noise_position, seed) > 0.35 then - surface.create_entity({ name = 'tree-04', position = position }) - end - return - end - if noise < -0.85 then - if get_noise('random_things', noise_position, seed) > 0.45 then - surface.create_entity({ name = 'dry-hairy-tree', position = position }) - end - return - end - - local noise = get_noise('decoratives', noise_position, seed + 50000) - if noise > 0.4 then - if get_noise('random_things', noise_position, seed) > 0 then - surface.create_decoratives({ check_collision = false, decoratives = { { name = 'green-asterisk', position = position, amount = 1 } } }) - end - return - end - if noise < -0.4 then - if get_noise('random_things', noise_position, seed) > 0 then - surface.create_decoratives({ check_collision = false, decoratives = { { name = 'green-pita', position = position, amount = 1 } } }) - end - return - end -end - -local function draw_lanes(surface, left_top) - local seed = game.surfaces[1].map_gen_settings.seed + 4096 - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local position = { x = left_top.x + x, y = left_top.y + y } - local noise_position = { x = left_top.x % 160 + x, y = left_top.y + y } - local noise = get_noise('biter_territory_beach', noise_position, seed) - if position.y < -160 - math.abs(noise * 12) then - surface.set_tiles({ { name = 'water-shallow', position = position } }, true) - local noise = get_noise('biter_territory_decoratives', noise_position, seed) - if noise > -0.3 and noise < 0.3 then - if math_random(1, 1) == 1 then - surface.create_decoratives({ check_collision = false, decoratives = { { name = 'green-hairy-grass', position = position, amount = 1 } } }) - end - else - if noise > 0.75 then - if math_random(1, 2) == 1 then - surface.create_decoratives({ check_collision = false, decoratives = { { name = 'green-carpet-grass', position = position, amount = 1 } } }) - end - end - end - else - local position = { x = left_top.x + x, y = left_top.y + y } - local noise_position = { x = left_top.x % 160 + x, y = left_top.y + y } - local i = (math.floor(get_noise('grass', noise_position, seed + 5000) * 5) % 4) + 1 - surface.set_tiles({ { name = 'grass-' .. i, position = position } }) - place_entities(surface, position, noise_position, seed) - end - end - end -end - -local function draw_void(surface, left_top) - for x = 0, 31, 1 do - for y = 0, 31, 1 do - local position = { x = left_top.x + x, y = left_top.y + y } - surface.set_tiles({ { name = 'out-of-map', position = position } }) - end - end -end - -local function clear_chunk(surface, area) - surface.destroy_decoratives { area = area, name = decorative_whitelist, invert = true } - for _, e in pairs(surface.find_entities_filtered({ area = area })) do - if e.name ~= 'character' then - e.destroy() - end - end -end - -local function on_chunk_generated(event) - local surface = event.surface - if surface.index == 1 then - return - end - - local left_top = event.area.left_top - if left_top.x % 160 < 64 or left_top.x > 288 or left_top.x < -256 or left_top.y < -320 then - draw_void(surface, left_top) - else - clear_chunk(surface, event.area) - draw_lanes(surface, left_top) - end - init(surface, left_top) - wod_logo(surface, left_top) -end - -return on_chunk_generated diff --git a/modules/immersive_cargo_wagons/functions.lua b/modules/immersive_cargo_wagons/functions.lua index bcd408a1d..3021d10f6 100644 --- a/modules/immersive_cargo_wagons/functions.lua +++ b/modules/immersive_cargo_wagons/functions.lua @@ -5,7 +5,6 @@ local Constants = require 'modules.immersive_cargo_wagons.constants' local table_insert = table.insert local table_remove = table.remove -local math_round = math.round local math_random = math.random function Public.request_reconstruction(icw) @@ -35,7 +34,8 @@ end local function connect_power_pole(entity, wagon_area_left_top_y) local surface = entity.surface local max_wire_distance = entity.prototype.max_wire_distance - local area = { + local area = + { { entity.position.x - max_wire_distance, entity.position.y - max_wire_distance }, { entity.position.x + max_wire_distance, entity.position.y - 1 } } @@ -176,10 +176,11 @@ local function output_cargo(wagon, passive_chest) end end -local transfer_functions = { +local transfer_functions = +{ ['storage-tank'] = divide_fluid, - ['logistic-chest-requester'] = input_cargo, - ['logistic-chest-passive-provider'] = output_cargo + ['requester-chest'] = input_cargo, + ['passive-provider-chest'] = output_cargo } local function get_wagon_for_entity(icw, entity) @@ -188,7 +189,7 @@ local function get_wagon_for_entity(icw, entity) return end local position = entity.position - for k, unit_number in pairs(train.wagons) do + for _, unit_number in pairs(train.wagons) do local wagon = icw.wagons[unit_number] if wagon then local left_top = wagon.area.left_top @@ -238,7 +239,8 @@ local function get_player_data(icw, player) return player_data end - icw.players[player.index] = { + icw.players[player.index] = + { surface = 1, fallback_surface = 1, zoom = 0.30, @@ -287,14 +289,16 @@ function Public.create_room_surface(icw, unit_number) if game.surfaces[tostring(unit_number)] then return game.surfaces[tostring(unit_number)] end - local map_gen_settings = { + local map_gen_settings = + { ['width'] = 2, ['height'] = 2, ['water'] = 0, ['starting_area'] = 1, ['cliff_settings'] = { cliff_elevation_interval = 0, cliff_elevation_0 = 0 }, ['default_enable_all_autoplace_controls'] = true, - ['autoplace_settings'] = { + ['autoplace_settings'] = + { ['entity'] = { treat_missing_as_default = false }, ['tile'] = { treat_missing_as_default = true }, ['decorative'] = { treat_missing_as_default = false } @@ -362,7 +366,8 @@ function Public.create_wagon_room(icw, wagon) if wagon.entity.type == 'fluid-wagon' then local height = area.right_bottom.y - area.left_top.y - local positions = { + local positions = + { { area.right_bottom.x, area.left_top.y + height * 0.25 }, { area.right_bottom.x, area.left_top.y + height * 0.75 }, { area.left_top.x - 1, area.left_top.y + height * 0.25 }, @@ -392,7 +397,7 @@ function Public.create_wagon_room(icw, wagon) local e = surface.create_entity( { - name = 'logistic-chest-requester', + name = 'requester-chest', position = position, force = 'neutral', create_build_effect_smoke = false @@ -404,7 +409,7 @@ function Public.create_wagon_room(icw, wagon) e2 = surface.create_entity( { - name = 'logistic-chest-passive-provider', + name = 'passive-provider-chest', position = { position[1] + v[1], position[2] + v[2] }, force = 'neutral', create_build_effect_smoke = false @@ -430,7 +435,8 @@ function Public.create_wagon(icw, created_entity, delay_surface) end local wagon_area = Constants.wagon_areas[created_entity.type] - icw.wagons[created_entity.unit_number] = { + icw.wagons[created_entity.unit_number] = + { entity = created_entity, area = { left_top = { x = wagon_area.left_top.x, y = wagon_area.left_top.y }, right_bottom = { x = wagon_area.right_bottom.x, y = wagon_area.right_bottom.y } }, doors = {}, @@ -505,7 +511,7 @@ function Public.use_cargo_wagon_door(icw, player, door) local surface = wagon.entity.surface local x_vector = (door.position.x / math.abs(door.position.x)) * 2 local position = { wagon.entity.position.x + x_vector, wagon.entity.position.y } - local position = surface.find_non_colliding_position('character', position, 128, 0.5) + position = surface.find_non_colliding_position('character', position, 128, 0.5) if not position then return end @@ -541,7 +547,8 @@ local function move_room_to_train(icw, train, wagon) table_insert(train.wagons, wagon.entity.unit_number) - local destination_area = { + local destination_area = + { left_top = { x = wagon.area.left_top.x, y = train.top_y }, right_bottom = { x = wagon.area.right_bottom.x, y = train.top_y + (wagon.area.right_bottom.y - wagon.area.left_top.y) } } @@ -615,7 +622,7 @@ function Public.construct_train(icw, carriages) local train = { surface = Public.create_room_surface(icw, unit_number), wagons = {}, top_y = 0 } icw.trains[unit_number] = train - for k, carriage in pairs(carriages) do + for _, carriage in pairs(carriages) do move_room_to_train(icw, train, icw.wagons[carriage.unit_number]) end end @@ -643,7 +650,7 @@ end function Public.item_transfer(icw) for _, wagon in pairs(icw.wagons) do if wagon.transfer_entities then - for k, e in pairs(wagon.transfer_entities) do + for _, e in pairs(wagon.transfer_entities) do transfer_functions[e.name](wagon, e) end end @@ -674,7 +681,7 @@ function Public.draw_minimap(icw, player, surface, position) end function Public.update_minimap(icw) - for k, player in pairs(game.connected_players) do + for _, player in pairs(game.connected_players) do if player.character and player.character.valid then local wagon = get_wagon_for_entity(icw, player.character) if wagon then diff --git a/modules/mobs_drop_loot.lua b/modules/mobs_drop_loot.lua index e06a04977..8869dd5ad 100644 --- a/modules/mobs_drop_loot.lua +++ b/modules/mobs_drop_loot.lua @@ -4,7 +4,8 @@ local shuffle = table.shuffle_table local insert = table.insert local random = math.random -local item_worths = { +local item_worths = +{ ['wooden-chest'] = 2, ['iron-chest'] = 8, ['steel-chest'] = 32, @@ -45,11 +46,11 @@ local item_worths = { ['tank'] = 4096, ['logistic-robot'] = 256, ['construction-robot'] = 256, - ['logistic-chest-active-provider'] = 256, - ['logistic-chest-passive-provider'] = 256, - ['logistic-chest-storage'] = 256, - ['logistic-chest-buffer'] = 512, - ['logistic-chest-requester'] = 512, + ['active-provider-chest'] = 256, + ['passive-provider-chest'] = 256, + ['storage-chest'] = 256, + ['buffer-chest'] = 512, + ['requester-chest'] = 512, ['roboport'] = 2048, ['small-lamp'] = 4, ['arithmetic-combinator'] = 16, diff --git a/modules/portable_chest.lua b/modules/portable_chest.lua index b4e41f657..689344759 100644 --- a/modules/portable_chest.lua +++ b/modules/portable_chest.lua @@ -69,7 +69,7 @@ local function create_button(player) mod(player).add( { type = 'sprite-button', - sprite = 'item/logistic-chest-requester', + sprite = 'item/requester-chest', name = main_button_name, tooltip = 'Portable inventory stash!', style = m_gui.button_style diff --git a/modules/rocks_yield_ore.lua b/modules/rocks_yield_ore.lua index 35edb316b..7e0d7ebd1 100644 --- a/modules/rocks_yield_ore.lua +++ b/modules/rocks_yield_ore.lua @@ -1,16 +1,19 @@ --destroying and mining rocks yields ore -- load as last module +local Event = require 'utils.event' local max_spill = 60 local math_random = math.random local math_floor = math.floor local math_sqrt = math.sqrt -local rock_yield = { +local rock_yield = +{ ['big-rock'] = 1, ['huge-rock'] = 2, ['big-sand-rock'] = 1 } -local particles = { +local particles = +{ ['iron-ore'] = 'iron-ore-particle', ['copper-ore'] = 'copper-ore-particle', ['uranium-ore'] = 'coal-particle', @@ -73,7 +76,8 @@ local function create_particles(surface, name, position, amount, cause_position) frame_speed = 1, vertical_speed = 0.130, height = 0, - movement = { + movement = + { (m2 - (math_random(0, m) * 0.01)) + direction_mod, (m2 - (math_random(0, m) * 0.01)) + direction_mod_2 } @@ -125,33 +129,33 @@ local function on_player_mined_entity(event) local ore_amount = math_floor(count * 0.85) + 1 local stone_amount = math_floor(count * 0.15) + 1 - player.surface.create_entity({ name = 'flying-text', position = position, text = '+' .. ore_amount .. ' [img=item/' .. ore .. ']', color = { r = 200, g = 160, b = 30 } }) + player.create_local_flying_text({ text = '+' .. ore_amount .. ' [img=item/' .. ore .. ']', position = position, color = { r = 200, g = 160, b = 30 } }) create_particles(player.surface, particles[ore], position, 64, { x = player.position.x, y = player.position.y }) entity.destroy() if ore_amount > max_spill then - player.surface.spill_item_stack(position, { name = ore, count = max_spill }, true) + player.surface.spill_item_stack({ position = position, stack = { name = ore, count = max_spill }, enable_looted = true }) ore_amount = ore_amount - max_spill local inserted_count = player.insert({ name = ore, count = ore_amount }) ore_amount = ore_amount - inserted_count if ore_amount > 0 then - player.surface.spill_item_stack(position, { name = ore, count = ore_amount }, true) + player.surface.spill_item_stack({ position = position, stack = { name = ore, count = ore_amount }, enable_looted = true }) end else - player.surface.spill_item_stack(position, { name = ore, count = ore_amount }, true) + player.surface.spill_item_stack({ position = position, stack = { name = ore, count = ore_amount }, enable_looted = true }) end if stone_amount > max_spill then - player.surface.spill_item_stack(position, { name = 'stone', count = max_spill }, true) + player.surface.spill_item_stack({ position = position, stack = { name = 'stone', count = max_spill }, enable_looted = true }) stone_amount = stone_amount - max_spill local inserted_count = player.insert({ name = 'stone', count = stone_amount }) stone_amount = stone_amount - inserted_count if stone_amount > 0 then - player.surface.spill_item_stack(position, { name = 'stone', count = stone_amount }, true) + player.surface.spill_item_stack({ position = position, stack = { name = 'stone', count = stone_amount }, enable_looted = true }) end else - player.surface.spill_item_stack(position, { name = 'stone', count = stone_amount }, true) + player.surface.spill_item_stack({ position = position, stack = { name = 'stone', count = stone_amount }, enable_looted = true }) end end @@ -182,11 +186,11 @@ local function on_entity_died(event) local count = math_random(6, 9) storage.rocks_yield_ore['ores_mined'] = storage.rocks_yield_ore['ores_mined'] + count - surface.spill_item_stack(pos, { name = ore, count = count }, true) + surface.spill_item_stack({ position = pos, stack = { name = ore, count = count }, enable_looted = true }) count = math_random(1, 3) storage.rocks_yield_ore['ores_mined'] = storage.rocks_yield_ore['ores_mined'] + count - surface.spill_item_stack(pos, { name = 'stone', count = math_random(1, 3) }, true) + surface.spill_item_stack({ position = pos, stack = { name = 'stone', count = math_random(1, 3) }, enable_looted = true }) storage.rocks_yield_ore['rocks_broken'] = storage.rocks_yield_ore['rocks_broken'] + 1 end @@ -208,7 +212,6 @@ local function on_init() end end -local Event = require 'utils.event' Event.on_init(on_init) Event.add(defines.events.on_entity_died, on_entity_died) Event.add(defines.events.on_player_mined_entity, on_player_mined_entity) diff --git a/modules/shopping_chests.lua b/modules/shopping_chests.lua index ec728e2db..3f0dd0fc0 100644 --- a/modules/shopping_chests.lua +++ b/modules/shopping_chests.lua @@ -1,6 +1,7 @@ local Public = {} -local shop_list = { +local shop_list = +{ ['coal'] = 1, ['copper-ore'] = 1, ['crude-oil-barrel'] = 7.5, @@ -14,7 +15,7 @@ local shop_list = { } function Public.create_shopping_chest(surface, position, destructible) - local entity = surface.create_entity({ name = 'logistic-chest-requester', position = position, force = 'shopping_chests' }) + local entity = surface.create_entity({ name = 'requester-chest', position = position, force = 'shopping_chests' }) entity.minable = false if not destructible then entity.destructible = false @@ -22,7 +23,7 @@ function Public.create_shopping_chest(surface, position, destructible) end function Public.create_dump_chest(surface, position, destructible) - local entity = surface.create_entity({ name = 'logistic-chest-passive-provider', position = position, force = 'shopping_chests' }) + local entity = surface.create_entity({ name = 'passive-provider-chest', position = position, force = 'shopping_chests' }) entity.minable = false if not destructible then entity.destructible = false @@ -141,13 +142,13 @@ local function on_gui_opened(event) return end - if event.entity.name == 'logistic-chest-passive-provider' then + if event.entity.name == 'passive-provider-chest' then storage.dump_chests[#storage.dump_chests + 1] = event.entity storage.registerd_shopping_chests[index] = true event.entity.surface.create_entity({ name = 'flying-text', position = event.entity.position, text = 'Chest registered, shop active!', color = { r = 200, g = 160, b = 30 } }) return end - if event.entity.name == 'logistic-chest-requester' then + if event.entity.name == 'requester-chest' then storage.shopping_chests[#storage.shopping_chests + 1] = event.entity storage.registerd_shopping_chests[index] = true event.entity.surface.create_entity({ name = 'flying-text', position = event.entity.position, text = 'Chest registered, shop active!', color = { r = 200, g = 160, b = 30 } }) diff --git a/modules/turret_filler.lua b/modules/turret_filler.lua index 46b676ef5..e0e5abc2a 100644 --- a/modules/turret_filler.lua +++ b/modules/turret_filler.lua @@ -1,8 +1,10 @@ local Event = require 'utils.event' local Global = require 'utils.global' local FT = require 'utils.functions.flying_texts' +local Gui = require 'utils.gui' -local turrettable = { +local turrettable = +{ players = {}, enabled = true } @@ -10,7 +12,7 @@ local Public = {} Global.register( turrettable, - function(tbl) + function (tbl) turrettable = tbl end ) @@ -19,14 +21,45 @@ function Public.get_table() return turrettable end +local function get_turret_button(player) + if Gui.get_mod_gui_top_frame() then + return Gui.get_button_flow(player).turret_filler_button + end + return player.gui.top.turret_filler_button +end + + local function draw_turret_button() for _, player in pairs(game.connected_players) do - if not player.gui.top.turret_filler_button then - local b = player.gui.top.add({type = 'sprite-button', name = 'turret_filler_button', sprite = 'entity/gun-turret', tooltip = {'modules.turret_filler_tooltip'}}) + local b + if Gui.get_mod_gui_top_frame() then + b = + Gui.add_mod_button( + player, + { + type = 'sprite-button', + name = 'turret_filler_button', + sprite = 'entity/gun-turret', + tooltip = { 'modules.turret_filler_tooltip' }, + style = Gui.button_style + } + ) + if b then + b.style.minimal_height = 36 + b.style.maximal_height = 36 + b.style.minimal_width = 40 + b.style.padding = -2 + end + else + b = player.gui.top.turret_filler_button or + player.gui.top.add({ type = 'sprite-button', name = 'turret_filler_button', sprite = 'entity/gun-turret', tooltip = { 'modules.turret_filler_tooltip' } }) b.style.minimal_height = 38 b.style.maximal_height = 38 end - player.gui.top.turret_filler_button.visible = turrettable.enabled + b = b or get_turret_button(player) + if b and b.valid then + b.visible = turrettable.enabled + end end end @@ -36,49 +69,52 @@ local function turret_gui(player) return end if turrettable.enabled == false then - player.gui.top.turret_filler_button.visible = false + local button = get_turret_button(player) + if button and button.valid then + button.visible = false + end return end local playerdata = turrettable.players[player.index] - local frame = player.gui.screen.add({type = 'frame', name = 'turret_filler', caption = {'modules.turret_filler'}, direction = 'vertical'}) - frame.location = {x = 150, y = 45} + local frame = player.gui.screen.add({ type = 'frame', name = 'turret_filler', caption = { 'modules.turret_filler' }, direction = 'vertical' }) + frame.location = { x = 0, y = 70 } frame.style.minimal_height = 200 frame.style.maximal_height = 500 frame.style.minimal_width = 200 frame.style.maximal_width = 400 - frame.add({type = 'label', caption = {'modules.turret_filler_tooltip'}}) + frame.add({ type = 'label', caption = { 'modules.turret_filler_tooltip' } }) local switch_state = 'left' if playerdata.enabled then switch_state = 'right' end - local t = frame.add({type = 'table', column_count = 4, name = 'turret_filler_enabled_table'}) - t.add({type = 'label', caption = {'modules.turret_filler_label_enabled'}}) - local label = t.add({type = 'label', caption = 'OFF'}) + local t = frame.add({ type = 'table', column_count = 4, name = 'turret_filler_enabled_table' }) + t.add({ type = 'label', caption = { 'modules.turret_filler_label_enabled' } }) + local label = t.add({ type = 'label', caption = 'OFF' }) label.style.padding = 0 label.style.left_padding = 10 - label.style.font_color = {0.77, 0.77, 0.77} - local switch = t.add({type = 'switch', name = 'turret_filler_enabled'}) + label.style.font_color = { 0.77, 0.77, 0.77 } + local switch = t.add({ type = 'switch', name = 'turret_filler_enabled' }) switch.switch_state = switch_state switch.style.padding = 0 switch.style.margin = 0 - local label2 = t.add({type = 'label', caption = 'ON'}) + local label2 = t.add({ type = 'label', caption = 'ON' }) label2.style.padding = 0 - label2.style.font_color = {0.70, 0.70, 0.70} + label2.style.font_color = { 0.70, 0.70, 0.70 } local amount = playerdata.amount - local t2 = frame.add({type = 'table', column_count = 3, name = 'turret_filler_amount_table'}) - t2.add({type = 'label', caption = {'modules.turret_filler_label_amount'}}) - t2.add({type = 'slider', name = 'turret_filler_amount', minimum_value = 1, maximum_value = 100, value = amount or 5}) - local textfield = t2.add({type = 'textfield', name = 'turret_filler_amount2', numeric = true, text = amount or 5}) + local t2 = frame.add({ type = 'table', column_count = 3, name = 'turret_filler_amount_table' }) + t2.add({ type = 'label', caption = { 'modules.turret_filler_label_amount' } }) + t2.add({ type = 'slider', name = 'turret_filler_amount', minimum_value = 1, maximum_value = 100, value = amount or 5 }) + local textfield = t2.add({ type = 'textfield', name = 'turret_filler_amount2', numeric = true, text = amount or 5 }) textfield.style.width = 40 - local t3 = frame.add({type = 'table', column_count = 4, name = 'turret_filler_ammo_table'}) - t3.add({type = 'label', caption = {'modules.turret_filler_ammo_type'}}) - local filter = {{filter = 'name', name = {'firearm-magazine', 'piercing-rounds-magazine', 'uranium-rounds-magazine'}}} - t3.add({type = 'choose-elem-button', name = 'turret_filler_ammo', elem_type = 'item', item = playerdata.ammo_type or 'firearm-magazine', elem_filters = filter}) - t3.add({type = 'label', caption = {'modules.turret_filler_ammo_lower'}}) - t3.add({type = 'checkbox', name = 'turret_filler_lower', state = playerdata.lower_allowed}) - frame.add({type = 'line'}) - local close = frame.add({type = 'button', name = 'close_turret_filler', caption = 'Save & Close'}) + local t3 = frame.add({ type = 'table', column_count = 4, name = 'turret_filler_ammo_table' }) + t3.add({ type = 'label', caption = { 'modules.turret_filler_ammo_type' } }) + local filter = { { filter = 'name', name = { 'firearm-magazine', 'piercing-rounds-magazine', 'uranium-rounds-magazine' } } } + t3.add({ type = 'choose-elem-button', name = 'turret_filler_ammo', elem_type = 'item', item = playerdata.ammo_type or 'firearm-magazine', elem_filters = filter }) + t3.add({ type = 'label', caption = { 'modules.turret_filler_ammo_lower' } }) + t3.add({ type = 'checkbox', name = 'turret_filler_lower', state = playerdata.lower_allowed }) + frame.add({ type = 'line' }) + local close = frame.add({ type = 'button', name = 'close_turret_filler', caption = 'Save & Close' }) close.style.horizontally_stretchable = true end @@ -97,7 +133,8 @@ end local function on_player_joined_game(event) draw_turret_button() if not turrettable.players[event.player_index] then - turrettable.players[event.player_index] = { + turrettable.players[event.player_index] = + { enabled = true, amount = 5, ammo_type = 'firearm-magazine', @@ -171,10 +208,10 @@ local function transfer_ammo(player, turret) end end if count > 0 then - local inserted = turret.insert({name = item, count = math.min(count, turrettable.players[player.index].amount)}) - player.remove_item({name = item, count = inserted}) + local inserted = turret.insert({ name = item, count = math.min(count, turrettable.players[player.index].amount) }) + player.remove_item({ name = item, count = inserted }) local text = '-' .. inserted .. ' [item=' .. item .. ']' - FT.flying_text(player, turret.surface, turret.position, text, {r = 0.8, g = 0.2, b = 0.2}) + FT.flying_text(player, turret.surface, turret.position, text, { r = 0.8, g = 0.2, b = 0.2 }) end end diff --git a/utils/functions/loot_raffle.lua b/utils/functions/loot_raffle.lua index 59d158e12..19861f545 100644 --- a/utils/functions/loot_raffle.lua +++ b/utils/functions/loot_raffle.lua @@ -324,13 +324,8 @@ local tech_tier_list = { 'substation', 'flying-robot-frame', 'roboport', - 'logistic-chest-passive-provider', - 'logistic-chest-storage', 'construction-robot', 'roboport', - 'logistic-chest-passive-provider', - 'logistic-chest-storage', - 'logistic-robot', 'personal-roboport-equipment', 'flamethrower', 'flamethrower-ammo', @@ -370,9 +365,11 @@ local tech_tier_list = { 'express-splitter', 'express-loader', 'laser-turret', - 'logistic-chest-active-provider', - 'logistic-chest-requester', - 'logistic-chest-buffer', + 'active-provider-chest', + 'passive-provider-chest', + 'storage-chest', + 'buffer-chest', + 'requester-chest', 'personal-roboport-mk2-equipment', 'nuclear-fuel', 'energy-shield-mk2-equipment', diff --git a/utils/undo_actions.lua b/utils/undo_actions.lua index 3942cfd84..fec049af7 100644 --- a/utils/undo_actions.lua +++ b/utils/undo_actions.lua @@ -8,14 +8,17 @@ local Discord = require 'utils.discord_handler' local module_name = '[Undo actions] ' local undo_polls = {} +local undo_inventories = {} local Public = {} Global.register( { - undo_polls = undo_polls + undo_polls = undo_polls, + undo_inventories = undo_inventories }, function (tbl) undo_polls = tbl.undo_polls + undo_inventories = tbl.undo_inventories end ) @@ -94,6 +97,39 @@ local converted_entities = ['curved-rail'] = 'rail', } +local function on_pre_player_mined_item(event) + local entity = event.entity + if not entity or not entity.valid then + return + end + local player_index = event.player_index + undo_inventories[player_index] = undo_inventories[player_index] or {} + if not entity.get_output_inventory() then return end + + local max_inv = entity.get_max_inventory_index() or 0 + for inv_id = 1, max_inv do + local inv = entity.get_inventory(inv_id) + if inv and inv.valid then + local stacks = {} + for slot = 1, #inv do + local stack = inv[slot] + if stack.valid_for_read then + stacks[#stacks + 1] = stack.export_stack() + end + end + if #stacks > 0 then + table.insert(undo_inventories[player_index], { + entity_name = entity.name, + position = { x = entity.position.x, y = entity.position.y }, + surface_index = entity.surface.index, + inventory_index = inv_id, + stacks = stacks, + }) + end + end + end +end + local function check_undo_redo_stack(player) if not type(player) == 'userdata' then error('Player is not userdata.') @@ -183,8 +219,52 @@ local function check_undo_redo_stack(player) player.undo_redo_stack.remove_undo_item(player.undo_redo_stack.get_undo_item_count()) end end + + + local player_index = player.index + local saved_inventories = undo_inventories[player_index] + if saved_inventories and #saved_inventories > 0 then + for j = 1, #saved_inventories do + local entry = saved_inventories[j] + local surface = game.get_surface(entry.surface_index) + if surface and surface.valid then + local entity = surface.find_entity(entry.entity_name, entry.position) + if entity and entity.valid then + local inv = entity.get_inventory(entry.inventory_index) + if inv and inv.valid and entry.stacks and #entry.stacks > 0 then + for k = 1, #entry.stacks do + local stack_data = entry.stacks[k] + local player_has = player.get_item_count(stack_data.name) + if player_has > 0 then + local to_restore = math.min(stack_data.count or 0, player_has) + if to_restore > 0 then + local insert_spec = {} + for key, val in pairs(stack_data) do + insert_spec[key] = val + end + insert_spec.count = to_restore + local inserted = inv.insert(insert_spec) + if inserted > 0 then + local remove_spec = {} + for key, val in pairs(stack_data) do + remove_spec[key] = val + end + remove_spec.count = inserted + player.remove_item(remove_spec) + end + end + end + end + end + end + end + end + undo_inventories[player_index] = nil + end end +Event.add(defines.events.on_pre_player_mined_item, on_pre_player_mined_item) + Event.add(CustomEvents.events.on_poll_complete, function (event) if not event.winning_answer or not event.winning_answer.text then return From 6b5cbbd256911610b4600b3c45b88b55ea8194e8 Mon Sep 17 00:00:00 2001 From: Gerkiz Date: Thu, 26 Feb 2026 18:57:34 +0100 Subject: [PATCH 2/2] Fix luacheck --- maps/biter_battles_v2/difficulty_vote.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maps/biter_battles_v2/difficulty_vote.lua b/maps/biter_battles_v2/difficulty_vote.lua index bc2f03bc0..0d572cc23 100644 --- a/maps/biter_battles_v2/difficulty_vote.lua +++ b/maps/biter_battles_v2/difficulty_vote.lua @@ -69,12 +69,12 @@ local function poll_difficulty(player) frame.add({ type = 'label', caption = '- - - - - - - - - - - - - - - - - - - -' }) local b = frame.add({ type = 'button', name = 'close', caption = 'Close (' .. math.floor((timeout - tick) / 3600) .. ' minutes left)' }) + b.style.type = 'dialog_button' local b_style = b.style b_style.font_color = { r = 0.66, g = 0.0, b = 0.66 } b_style.font = 'default-semibold' b_style.horizontal_align = 'center' b_style.minimal_width = 96 - b_style = 'dialog_button' end local function set_difficulty()