mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-19 15:23:12 +09:00
.
This commit is contained in:
1 parent
3afe02f0a2
commit
5b663eeee7
1 file changed
+6
-4
@@ -257,10 +257,12 @@ local function surface_index_from_element(controls)
|
|||||||
local surface = 0
|
local surface = 0
|
||||||
if element then
|
if element then
|
||||||
local surface_name = element.items[element.selected_index]
|
local surface_name = element.items[element.selected_index]
|
||||||
---@diagnostic disable-next-line: undefined-field
|
if surface_name then
|
||||||
local s = game.surfaces[surface_name]
|
---@diagnostic disable-next-line: undefined-field
|
||||||
if surface_name and s then
|
local s = game.surfaces[surface_name]
|
||||||
surface = s.index
|
if s then
|
||||||
|
surface = s.index
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return surface
|
return surface
|
||||||
|
|||||||
Reference in new issue
Block a user