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

@@ -10,6 +10,10 @@ return {
unlimited_surface_area = false, --- @setting unlimited_surface_area When true the vlayer has an unlimited surface area, landfill is not required unlimited_surface_area = false, --- @setting unlimited_surface_area When true the vlayer has an unlimited surface area, landfill is not required
modded_auto_downgrade = false, --- @setting modded_auto_downgrade When true modded items will be converted into their base game equivalent, original items can not be recovered modded_auto_downgrade = false, --- @setting modded_auto_downgrade When true modded items will be converted into their base game equivalent, original items can not be recovered
power_on_space = false, --- @setting power_on_space When true allow on spaceship power_on_space = false, --- @setting power_on_space When true allow on spaceship
power_on_space_research = { --- @setting power_on_space_research the research level needed to use power_on_space
name = "research-productivity",
level = 10
},
mimic_surface = "nauvis", --- @setting mimic_surface Surface name/index the vlayer will copy its settings from, use nil to use the settings below mimic_surface = "nauvis", --- @setting mimic_surface Surface name/index the vlayer will copy its settings from, use nil to use the settings below
surface = { --- @setting surface When mimic_surface is nil these settings will be used instead, see LuaSurface for details surface = { --- @setting surface When mimic_surface is nil these settings will be used instead, see LuaSurface for details

View File

@@ -294,6 +294,7 @@ control-type-energy=Energy
control-type-circuit=Circuit control-type-circuit=Circuit
control-type-storage-input=Storage Input control-type-storage-input=Storage Input
control-type-storage-output=Storage Output control-type-storage-output=Storage Output
power-on-space-research=You need to research [technology=__1__] at __2__ level for the space platform vlayer feature.
enter=Entered vlayer selection mode. enter=Entered vlayer selection mode.
exit=Exited vlayer selection mode. exit=Exited vlayer selection mode.

View File

@@ -294,6 +294,7 @@ control-type-energy=電力
control-type-circuit=回路 control-type-circuit=回路
control-type-storage-input=放入箱 control-type-storage-input=放入箱
control-type-storage-output=提取箱 control-type-storage-output=提取箱
power-on-space-research=你要研究 [technology=__1__] 在 __2__ 級 才可使用太空平台 vlayer 功能。
enter=現在進入 vlayer 區域選擇 enter=現在進入 vlayer 區域選擇
exit=已進入 vlayer 區域選擇 exit=已進入 vlayer 區域選擇

View File

@@ -294,6 +294,7 @@ control-type-energy=電力
control-type-circuit=回路 control-type-circuit=回路
control-type-storage-input=放入箱 control-type-storage-input=放入箱
control-type-storage-output=提取箱 control-type-storage-output=提取箱
power-on-space-research=你要研究 [technology=__1__] 在 __2__ 級 才可使用太空平台 vlayer 功能。
enter=現在進入 vlayer 區域選擇 enter=現在進入 vlayer 區域選擇
exit=已進入 vlayer 區域選擇 exit=已進入 vlayer 區域選擇

View File

@@ -87,7 +87,12 @@ Selection.on_selection(SelectionConvertArea, function(event)
local entities local entities
if config.power_on_space and event.surface and event.surface.platform and target == "energy" then if config.power_on_space and event.surface and event.surface.platform and target == "energy" then
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 } 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 else
entities = event.surface.find_entities_filtered{ area = area, name = "steel-chest", force = player.force } entities = event.surface.find_entities_filtered{ area = area, name = "steel-chest", force = player.force }
end end