diff --git a/.luacheckrc b/.luacheckrc index 5e91f771d..7b5353faa 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -213,6 +213,7 @@ stds.factorio_control = { 'active_mods', 'feature_flags', 'get_event_handler', + 'get_event_id', 'get_event_order', 'level', 'mod_name', @@ -1110,6 +1111,7 @@ stds.factorio_defines = { 'on_built_entity', 'on_cancelled_deconstruction', 'on_cancelled_upgrade', + 'on_cargo_pod_finished_ascending', 'on_character_corpse_expired', 'on_chart_tag_added', 'on_chart_tag_modified', diff --git a/features/lazy_bastard.lua b/features/lazy_bastard.lua index ed44ef60c..10abe8304 100644 --- a/features/lazy_bastard.lua +++ b/features/lazy_bastard.lua @@ -127,7 +127,7 @@ Command.add('lazy-bastard-bootstrap', { for i = 1, #templates do local entity = create_entity(templates[i]) - entity.minable = false + entity.minable_flag = false entity.destructible = false end @@ -139,7 +139,7 @@ Command.add('lazy-bastard-bootstrap', { power_source.electric_buffer_size = 30000 power_source.power_production = 30000 power_source.destructible = false - power_source.minable = false + power_source.minable_flag = false -- in 7 minutes, remove the power source Task.set_timeout(420, clean_energy_interface, {entity = power_source}) diff --git a/features/redmew_qol.lua b/features/redmew_qol.lua index 006765174..2fc1c65c5 100644 --- a/features/redmew_qol.lua +++ b/features/redmew_qol.lua @@ -137,7 +137,7 @@ local function preserve_bot(event) if logistic_network == nil or not logistic_network.valid then -- prevents an orphan bot from being unremovable - entity.minable = true + entity.minable_flag = true return end @@ -147,17 +147,17 @@ local function preserve_bot(event) -- checks if construction-robot is part of a mobile logistic network if owner.name ~= 'character' then - entity.minable = true + entity.minable_flag = true return end -- checks if construction-robot is owned by the player that has selected it if owner.player.name == player.name then - entity.minable = true + entity.minable_flag = true return end - entity.minable = false + entity.minable_flag = false end -- Event registers diff --git a/map_gen/maps/april_fools/modules/permanent_factory.lua b/map_gen/maps/april_fools/modules/permanent_factory.lua index c3b94d180..0b9bbdefc 100644 --- a/map_gen/maps/april_fools/modules/permanent_factory.lua +++ b/map_gen/maps/april_fools/modules/permanent_factory.lua @@ -35,7 +35,7 @@ local function on_built_entity(event) return else entity.destructible = true - entity.minable = false + entity.minable_flag = false end end diff --git a/map_gen/maps/april_fools/scenario/restart_command.lua b/map_gen/maps/april_fools/scenario/restart_command.lua index ff74e2f0b..6fb597ab7 100644 --- a/map_gen/maps/april_fools/scenario/restart_command.lua +++ b/map_gen/maps/april_fools/scenario/restart_command.lua @@ -134,7 +134,7 @@ return function(config) local ore_products = {} for _, ore_prototype in pairs(resource_prototypes) do local mineable_properties = ore_prototype.mineable_properties - if mineable_properties.minable and ore_prototype.resource_category == 'basic-solid' then + if mineable_properties.minable_flag and ore_prototype.resource_category == 'basic-solid' then for _, product in pairs(mineable_properties.products) do ore_products[product.name] = true end diff --git a/map_gen/maps/crash_site/events.lua b/map_gen/maps/crash_site/events.lua index 4d351f934..6c316cd8d 100644 --- a/map_gen/maps/crash_site/events.lua +++ b/map_gen/maps/crash_site/events.lua @@ -335,7 +335,7 @@ artillery_cooldown_callback = return end - entity.minable = true + entity.minable_flag = true end ) @@ -386,7 +386,7 @@ local function do_bot_spawn(entity_name, entity, event) end for i = 1, repeat_cycle do if (cause.name == 'artillery-turret') then - cause.minable = false + cause.minable_flag = false set_timeout_in_ticks(300, artillery_cooldown_callback, cause) spawn_entity.name = 'defender' create_entity(spawn_entity) @@ -397,7 +397,7 @@ local function do_bot_spawn(entity_name, entity, event) create_entity(spawn_entity) elseif (cause.name == 'artillery-wagon') then - cause.minable = false + cause.minable_flag = false set_timeout_in_ticks(300, artillery_cooldown_callback, cause) spawn_entity.name = 'defender' create_entity(spawn_entity) diff --git a/map_gen/maps/crash_site/outpost_builder.lua b/map_gen/maps/crash_site/outpost_builder.lua index 1109026b0..cb0a16ef5 100644 --- a/map_gen/maps/crash_site/outpost_builder.lua +++ b/map_gen/maps/crash_site/outpost_builder.lua @@ -1502,7 +1502,7 @@ Public.magic_item_crafting_callback = local outpost_id = data.outpost_id local callback_data = data.callback_data - entity.minable = false + entity.minable_flag = false entity.destructible = false entity.operable = false @@ -1551,7 +1551,7 @@ Public.magic_item_crafting_callback_weighted = local outpost_id = data.outpost_id local callback_data = data.callback_data - entity.minable = false + entity.minable_flag = false entity.destructible = false entity.operable = false @@ -1658,7 +1658,7 @@ Public.scenario_chest_callback = Token.register(function(chest) end chest.destructible = false - chest.minable = false + chest.minable_flag = false end) local function turret_died(event) diff --git a/map_gen/maps/danger_ores/modules/expanse.lua b/map_gen/maps/danger_ores/modules/expanse.lua index 4b3493668..a66b99af5 100644 --- a/map_gen/maps/danger_ores/modules/expanse.lua +++ b/map_gen/maps/danger_ores/modules/expanse.lua @@ -365,7 +365,7 @@ return function(config) if is_container_position_valid(position) then local e = surface.create_entity({ name = 'requester-chest', position = position, force = 'neutral' }) e.destructible = false - e.minable = false + e.minable_flag = false table.insert(chests, e) end end diff --git a/map_gen/maps/danger_ores/modules/restart_command.lua b/map_gen/maps/danger_ores/modules/restart_command.lua index 32ddec4c1..d45be12ff 100644 --- a/map_gen/maps/danger_ores/modules/restart_command.lua +++ b/map_gen/maps/danger_ores/modules/restart_command.lua @@ -136,7 +136,7 @@ return function(config) local ore_products = {} for _, ore_prototype in pairs(resource_prototypes) do local mineable_properties = ore_prototype.mineable_properties - if mineable_properties.minable and ore_prototype.resource_category == 'basic-solid' then + if mineable_properties.minable_flag and ore_prototype.resource_category == 'basic-solid' then for _, product in pairs(mineable_properties.products) do ore_products[product.name] = true end diff --git a/map_gen/maps/dimensions.lua b/map_gen/maps/dimensions.lua index fe2e341fe..eebb3aafb 100644 --- a/map_gen/maps/dimensions.lua +++ b/map_gen/maps/dimensions.lua @@ -127,7 +127,7 @@ storage.chest_selected = false local function linkchests() if game.player and game.player.admin and game.player.selected and (game.player.selected.type == 'logistic-container' or game.player.selected.type == 'container') then game.player.selected.destructible = false - game.player.selected.minable = false + game.player.selected.minable_flag = false if storage.chest_selected then storage.magic_chests[#storage.magic_chests].target = game.player.selected game.print('Link established.') diff --git a/map_gen/maps/frontier/modules/market.lua b/map_gen/maps/frontier/modules/market.lua index cd9b7587b..e4fa89727 100644 --- a/map_gen/maps/frontier/modules/market.lua +++ b/map_gen/maps/frontier/modules/market.lua @@ -54,7 +54,7 @@ function Market.spawn_exchange_market(position) create_build_effect_smoke = true, move_stuck_players = true, } - market.minable = false + market.minable_flag = false market.destructible = false local offers_count = 10 + math_random(10) diff --git a/map_gen/maps/frontier/modules/restart.lua b/map_gen/maps/frontier/modules/restart.lua index 3abd1e639..cf79ea1c8 100644 --- a/map_gen/maps/frontier/modules/restart.lua +++ b/map_gen/maps/frontier/modules/restart.lua @@ -543,7 +543,7 @@ function Restart.print_endgame_statistics() local ore_products = {} for _, ore_prototype in pairs(resource_prototypes) do local mineable_properties = ore_prototype.mineable_properties - if mineable_properties.minable and ore_prototype.resource_category == 'basic-solid' then + if mineable_properties.minable_flag and ore_prototype.resource_category == 'basic-solid' then for _, product in pairs(mineable_properties.products) do ore_products[product.name] = true end diff --git a/map_gen/maps/frontier/modules/rocket_silo.lua b/map_gen/maps/frontier/modules/rocket_silo.lua index 28df5f7f0..fed2839e1 100644 --- a/map_gen/maps/frontier/modules/rocket_silo.lua +++ b/map_gen/maps/frontier/modules/rocket_silo.lua @@ -176,7 +176,7 @@ function RocketSilo.move_silo(position) if new_silo and new_silo.valid then new_silo.destructible = false - new_silo.minable = false + new_silo.minable_flag = false new_silo.active = true new_silo.get_output_inventory().clear() this.rocket_silo = new_silo diff --git a/map_gen/maps/frontier/modules/spawn_shop.lua b/map_gen/maps/frontier/modules/spawn_shop.lua index 55a959472..174a9641b 100644 --- a/map_gen/maps/frontier/modules/spawn_shop.lua +++ b/map_gen/maps/frontier/modules/spawn_shop.lua @@ -94,7 +94,7 @@ function SpawnShop.on_game_started() move_stuck_players = true, raise_built = false, } - shop.minable = false + shop.minable_flag = false Public.get().spawn_shop = shop Task.set_timeout(1, SpawnShop.add_render_token) SpawnShop.refresh_all_prices(false) diff --git a/map_gen/maps/mobius_strip.lua b/map_gen/maps/mobius_strip.lua index 665a88161..a9de6daa8 100644 --- a/map_gen/maps/mobius_strip.lua +++ b/map_gen/maps/mobius_strip.lua @@ -49,7 +49,7 @@ local function effect(_, _, world, tile) local e = world.surface.create_entity({name = 'rocket-silo', position = {0, 0}, force = 'player'}) e.destructible = false - e.minable = false + e.minable_flag = false end --[[ diff --git a/map_gen/maps/quadrants/item_to_chest.lua b/map_gen/maps/quadrants/item_to_chest.lua index 10180a380..9f2544cb7 100644 --- a/map_gen/maps/quadrants/item_to_chest.lua +++ b/map_gen/maps/quadrants/item_to_chest.lua @@ -16,7 +16,7 @@ local function create_chest(player, position, radius, bounding_box) if pos ~= nil then local chest = surface.create_entity {name = 'steel-chest', position = pos, force = player.force} - chest.minable = false + chest.minable_flag = false return chest end @@ -61,7 +61,7 @@ local function on_gui_closed(event) if entity == nil or not entity.valid then return end - if entity.name == 'steel-chest' and entity.minable == false and not entity.has_items_inside() then + if entity.name == 'steel-chest' and entity.minable_flag == false and not entity.has_items_inside() then entity.destroy() end end @@ -71,7 +71,7 @@ local function ctrl_empty(event) if entity == nil or not entity.valid then return end - if entity.name == 'steel-chest' and not entity.minable then + if entity.name == 'steel-chest' and not entity.minable_flag then event.entity = entity on_gui_closed(event) end diff --git a/map_gen/maps/quadrants/scenario.lua b/map_gen/maps/quadrants/scenario.lua index 607a59f10..56abdfe8f 100644 --- a/map_gen/maps/quadrants/scenario.lua +++ b/map_gen/maps/quadrants/scenario.lua @@ -307,7 +307,7 @@ local function rail_create(data) direction = direction } if rail and rail.valid then - rail.minable = false + rail.minable_flag = false rail.destructible = false end end diff --git a/map_gen/maps/space_race/map_gen/uranium_island.lua b/map_gen/maps/space_race/map_gen/uranium_island.lua index 6c9bfbacd..82bd64380 100644 --- a/map_gen/maps/space_race/map_gen/uranium_island.lua +++ b/map_gen/maps/space_race/map_gen/uranium_island.lua @@ -80,7 +80,7 @@ if Game_mode_config.king_of_the_hill then local function lock_entity(e) e.destructible = false - e.minable = false + e.minable_flag = false e.operable = false e.rotatable = false end diff --git a/map_gen/maps/space_race/scenario.lua b/map_gen/maps/space_race/scenario.lua index 7b2e2322a..9e38fe66e 100644 --- a/map_gen/maps/space_race/scenario.lua +++ b/map_gen/maps/space_race/scenario.lua @@ -248,27 +248,27 @@ local function generate_structures() local silo silo = surface.create_entity {name = 'rocket-silo', position = {x = 388.5, y = -0.5}, force = force_USSR} - silo.minable = false + silo.minable_flag = false silo = surface.create_entity {name = 'rocket-silo', position = {x = -388.5, y = 0.5}, force = force_USA} - silo.minable = false + silo.minable_flag = false local wall wall = surface.create_entity {name = 'stone-wall', position = {x = 384.5, y = 18.5}, always_place = true, force = 'neutral'} wall.destructible = false - wall.minable = false + wall.minable_flag = false wall = surface.create_entity {name = 'stone-wall', position = {x = 384.5, y = -17.5}, always_place = true, force = 'neutral'} wall.destructible = false - wall.minable = false + wall.minable_flag = false wall = surface.create_entity {name = 'stone-wall', position = {x = -384.5, y = 18.5}, always_place = true, force = 'neutral'} wall.destructible = false - wall.minable = false + wall.minable_flag = false wall = surface.create_entity {name = 'stone-wall', position = {x = -384.5, y = -17.5}, always_place = true, force = 'neutral'} wall.destructible = false - wall.minable = false + wall.minable_flag = false local gun_turret gun_turret = surface.create_entity {name = 'gun-turret', position = {x = 383, y = 0}, force = force_USSR} diff --git a/map_gen/maps/tetris/scenario.lua b/map_gen/maps/tetris/scenario.lua index 416f407cb..de91f45fe 100644 --- a/map_gen/maps/tetris/scenario.lua +++ b/map_gen/maps/tetris/scenario.lua @@ -215,7 +215,7 @@ local function collect_full_row_resources(tetri) local x = position.x + active_qchunks[1].x * 16 - 9 local y = tetri_y + active_qchunks[1].y * 16 - 9 local chest = InfinityChest.create_chest(tetri.surface, {x, y}, storage) - chest.minable = false + chest.minable_flag = false chest.destructible = false primitives.points = primitives.points + points * 100