diff --git a/comfy_panel/config.lua b/comfy_panel/config.lua index 0e5de5b4..28ad30ec 100644 --- a/comfy_panel/config.lua +++ b/comfy_panel/config.lua @@ -71,13 +71,11 @@ local functions = { end, ["comfy_panel_blueprint_toggle"] = function(event) if event.element.switch_state == "left" then - game.permissions.get_group("Default").set_allows_action(defines.input_action.grab_blueprint_record, true) - game.permissions.get_group("Default").set_allows_action(defines.input_action.import_blueprint_string, true) - game.permissions.get_group("Default").set_allows_action(defines.input_action.import_blueprint, true) + game.permissions.get_group("Default").set_allows_action(defines.input_action.open_blueprint_library_gui, true) + game.permissions.get_group("Default").set_allows_action(defines.input_action.import_blueprint_string, true) else - 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.permissions.get_group("Default").set_allows_action(defines.input_action.open_blueprint_library_gui, false) + game.permissions.get_group("Default").set_allows_action(defines.input_action.import_blueprint_string, false) end end, ["comfy_panel_spaghett_toggle"] = function(event) @@ -189,7 +187,7 @@ local build_config_gui = (function (player, frame) frame.add({type = "line"}) local switch_state = "right" - if game.permissions.get_group("Default").allows_action(defines.input_action.import_blueprint) then switch_state = "left" end + if game.permissions.get_group("Default").allows_action(defines.input_action.open_blueprint_library_gui) then switch_state = "left" end local switch = add_switch(frame, switch_state, "comfy_panel_blueprint_toggle", "Blueprint Library", "Toggles the usage of blueprint strings and the library.") if not admin then switch.ignored_by_interaction = true end diff --git a/maps/biter_battles_v2/ai.lua b/maps/biter_battles_v2/ai.lua index f7b9c251..5379b375 100644 --- a/maps/biter_battles_v2/ai.lua +++ b/maps/biter_battles_v2/ai.lua @@ -421,7 +421,7 @@ Public.raise_evo = function() if global.freeze_players then return end if not global.training_mode and (#game.forces.north.connected_players == 0 or #game.forces.south.connected_players == 0) then return end if not global.total_passive_feed_redpotion then global.total_passive_feed_redpotion = 0 end - local amount = math.ceil(global.difficulty_vote_value * global.evo_raise_counter) + local amount = math.ceil(global.difficulty_vote_value * global.evo_raise_counter * 0.75) global.total_passive_feed_redpotion = global.total_passive_feed_redpotion + amount local biter_teams = {["north_biters"] = "north", ["south_biters"] = "south"} local a_team_has_players = false diff --git a/maps/biter_battles_v2/game_over.lua b/maps/biter_battles_v2/game_over.lua index 35948e58..dfd4517c 100644 --- a/maps/biter_battles_v2/game_over.lua +++ b/maps/biter_battles_v2/game_over.lua @@ -288,10 +288,13 @@ function Public.server_restart() 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('Biter_Battles') + --Server.start_scenario('Biter_Battles') + + game.remove_offline_players() + Init.tables() Init.forces() - Init.load_spawn() + Init.load_spawn() for _, player in pairs(game.players) do Functions.init_player(player) for _, e in pairs(player.gui.left.children) do e.destroy() end diff --git a/maps/biter_battles_v2/init.lua b/maps/biter_battles_v2/init.lua index e06edfc2..60eff2fc 100644 --- a/maps/biter_battles_v2/init.lua +++ b/maps/biter_battles_v2/init.lua @@ -17,9 +17,8 @@ function Public.initial_setup() game.create_force("south_biters") game.create_force("spectator") - 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.permissions.get_group("Default").set_allows_action(defines.input_action.open_blueprint_library_gui, false) + game.permissions.get_group("Default").set_allows_action(defines.input_action.import_blueprint_string, false) local p = game.permissions.create_group("spectator") for action_name, _ in pairs(defines.input_action) do @@ -121,7 +120,7 @@ function Public.source_surface() Terrain.generate_additional_spawn_ore(surface) Terrain.generate_silo(surface) Terrain.draw_spawn_circle(surface) - Terrain.generate_spawn_goodies(surface) + --Terrain.generate_spawn_goodies(surface) end function Public.tables() diff --git a/maps/biter_battles_v2/terrain.lua b/maps/biter_battles_v2/terrain.lua index d85027f0..52f00897 100644 --- a/maps/biter_battles_v2/terrain.lua +++ b/maps/biter_battles_v2/terrain.lua @@ -1,5 +1,5 @@ local Public = {} -local LootRaffle = require "functions.loot_raffle" +--local LootRaffle = require "functions.loot_raffle" local BiterRaffle = require "functions.biter_raffle" local bb_config = require "maps.biter_battles_v2.config" @@ -552,7 +552,7 @@ function Public.generate_silo(surface) end end end - +--[[ function Public.generate_spawn_goodies(surface) local tiles = surface.find_tiles_filtered({name = "stone-path"}) table.shuffle_table(tiles) @@ -583,7 +583,7 @@ function Public.generate_spawn_goodies(surface) end end end - +]] --Landfill Restriction function Public.restrict_landfill(surface, inventory, tiles) for _, t in pairs(tiles) do