mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
return {
|
return {
|
||||||
-- type of machine to handle together
|
-- type of machine to handle together
|
||||||
module_row = 4,
|
default_module_row = 4,
|
||||||
module_slot_max = 4,
|
module_slot_max = 4,
|
||||||
machine_prod_disallow = {
|
machine_prod_disallow = {
|
||||||
['beacon'] = true
|
['beacon'] = true
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ Selection.on_selection(SelectionModuleArea, function(event)
|
|||||||
|
|
||||||
local frame = Gui.get_left_element(player, module_container)
|
local frame = Gui.get_left_element(player, module_container)
|
||||||
|
|
||||||
for i=1, config.module_row do
|
for i=1, config.default_module_row do
|
||||||
local m_machine = frame.container.scroll.table['module_mm_' .. i .. '_0'].elem_value
|
local m_machine = frame.container.scroll.table['module_mm_' .. i .. '_0'].elem_value
|
||||||
|
|
||||||
if m_machine ~= nil then
|
if m_machine ~= nil then
|
||||||
@@ -211,10 +211,6 @@ local function row_set(player, element)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Event.add(defines.events.on_gui_elem_changed, function(event)
|
|
||||||
row_set(game.players[event.player_index], event.element)
|
|
||||||
end)
|
|
||||||
|
|
||||||
local button_apply =
|
local button_apply =
|
||||||
Gui.element{
|
Gui.element{
|
||||||
name = 'module_b',
|
name = 'module_b',
|
||||||
@@ -236,7 +232,7 @@ Gui.element(function(event_trigger, parent)
|
|||||||
|
|
||||||
local scroll_table = Gui.scroll_table(container, (config.module_slot_max + 2) * 36, config.module_slot_max + 1)
|
local scroll_table = Gui.scroll_table(container, (config.module_slot_max + 2) * 36, config.module_slot_max + 1)
|
||||||
|
|
||||||
for i=1, config.module_row do
|
for i=1, config.default_module_row do
|
||||||
scroll_table.add{
|
scroll_table.add{
|
||||||
name = 'module_mm_' .. i .. '_0',
|
name = 'module_mm_' .. i .. '_0',
|
||||||
type = 'choose-elem-button',
|
type = 'choose-elem-button',
|
||||||
@@ -244,7 +240,10 @@ Gui.element(function(event_trigger, parent)
|
|||||||
elem_filters = elem_filter.name,
|
elem_filters = elem_filter.name,
|
||||||
style = 'slot_button'
|
style = 'slot_button'
|
||||||
}
|
}
|
||||||
|
--[[:on_elem_changed(function(player, element)
|
||||||
|
row_set(player, element)
|
||||||
|
end)
|
||||||
|
]]
|
||||||
for j=1, config.module_slot_max do
|
for j=1, config.module_slot_max do
|
||||||
scroll_table.add{
|
scroll_table.add{
|
||||||
name = 'module_mm_' .. i .. '_' .. j,
|
name = 'module_mm_' .. i .. '_' .. j,
|
||||||
|
|||||||
Reference in New Issue
Block a user