A research requirement to space platform vlayer power (#367)

* Update vlayer.lua

* Update vlayer.lua

* Update gui.cfg

* Update gui.cfg

* Update gui.cfg
This commit is contained in:
2025-02-03 07:45:17 +09:00
committed by GitHub
parent 420e3cdfca
commit a5114af8d4
5 changed files with 13 additions and 1 deletions

View File

@@ -87,7 +87,12 @@ Selection.on_selection(SelectionConvertArea, function(event)
local entities
if config.power_on_space and event.surface and event.surface.platform and target == "energy" then
entities = event.surface.find_entities_filtered{ area = area, name = "constant-combinator", force = player.force }
if player.force.technologies[config.power_on_space_research.name].level >= config.power_on_space_research.level then
entities = event.surface.find_entities_filtered{ area = area, name = "constant-combinator", force = player.force }
else
player.print{ "vlayer.power-on-space-research", config.power_on_space_research.name, config.power_on_space_research.level }
return nil
end
else
entities = event.surface.find_entities_filtered{ area = area, name = "steel-chest", force = player.force }
end