mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 3.0.89
|
||||||
|
Date: 2025-04-13
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
- [CT] Fixed events affect inserter direction gui display.
|
||||||
|
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 3.0.88
|
Version: 3.0.88
|
||||||
Date: 2025-04-13
|
Date: 2025-04-13
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ if settings.startup['PHI-CT'].value or settings.startup['PHI-MI'].value or (sett
|
|||||||
end
|
end
|
||||||
|
|
||||||
local frame = player.gui.relative.add({type = 'frame', name = 'inserter_config', anchor = {gui = defines.relative_gui_type.inserter_gui, position = defines.relative_gui_position.right}})
|
local frame = player.gui.relative.add({type = 'frame', name = 'inserter_config', anchor = {gui = defines.relative_gui_type.inserter_gui, position = defines.relative_gui_position.right}})
|
||||||
frame.add({type = 'drop-down', name = 'i_direction', items = {'[virtual-signal=down-arrow]', '[virtual-signal=left-arrow]', '[virtual-signal=up-arrow]', '[virtual-signal=right-arrow]'}, selected_index = 1})
|
|
||||||
frame.add({type = 'drop-down', name = 'i_sub_direction', items = {'[virtual-signal=signal-0]', '[virtual-signal=signal-1]', '[virtual-signal=signal-2]', '[virtual-signal=signal-3]'}, selected_index = 1})
|
frame.add({type = 'drop-down', name = 'i_sub_direction', items = {'[virtual-signal=signal-0]', '[virtual-signal=signal-1]', '[virtual-signal=signal-2]', '[virtual-signal=signal-3]'}, selected_index = 1})
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -99,8 +98,7 @@ if settings.startup['PHI-CT'].value or settings.startup['PHI-MI'].value or (sett
|
|||||||
end
|
end
|
||||||
|
|
||||||
local gui = player.gui.relative.inserter_config
|
local gui = player.gui.relative.inserter_config
|
||||||
local d, ds = math.fmod(inserter_direction_reversed[inserter.direction], 4)
|
local _, ds = math.fmod(inserter_direction_reversed[inserter.direction], 4)
|
||||||
gui['i_direction'].selected_index = d or 1
|
|
||||||
gui['i_sub_direction'].selected_index = ((ds or 0) + ((inserter.mirroring and 2) or 0)) % 4 + 1
|
gui['i_sub_direction'].selected_index = ((ds or 0) + ((inserter.mirroring and 2) or 0)) % 4 + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -135,7 +133,7 @@ if settings.startup['PHI-CT'].value or settings.startup['PHI-MI'].value or (sett
|
|||||||
local gui = player.gui.relative.inserter_config
|
local gui = player.gui.relative.inserter_config
|
||||||
|
|
||||||
if player.opened and player.opened.object_name == 'LuaEntity' and (player.opened.type == 'inserter' or (player.opened.type == 'entity-ghost' and player.opened.ghost_type == 'inserter')) and gui[e.element.name] then
|
if player.opened and player.opened.object_name == 'LuaEntity' and (player.opened.type == 'inserter' or (player.opened.type == 'entity-ghost' and player.opened.ghost_type == 'inserter')) and gui[e.element.name] then
|
||||||
player.opened.direction = inserter_direction[(e.element.parent['i_direction'].selected_index - 1) * 4 + (e.element.parent['i_sub_direction'].selected_index - 1) + 1]
|
player.opened.direction = (inserter_direction_reversed[player.opened.direction] + (e.element.parent['i_sub_direction'].selected_index - 1)) % 16 + 1
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "PHI-CL",
|
"name": "PHI-CL",
|
||||||
"version": "3.0.88",
|
"version": "3.0.89",
|
||||||
"factorio_version": "2.0",
|
"factorio_version": "2.0",
|
||||||
"date": "2025-04-13",
|
"date": "2025-04-13",
|
||||||
"title": "Phidias Collection",
|
"title": "Phidias Collection",
|
||||||
|
|||||||
Reference in New Issue
Block a user