mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-31 12:11:40 +09:00
.
This commit is contained in:
@@ -212,9 +212,9 @@ if settings.startup['PHI-CT'].value then
|
|||||||
|
|
||||||
if gui_instance.table_position.children[idx].type == 'sprite-button' then
|
if gui_instance.table_position.children[idx].type == 'sprite-button' then
|
||||||
if math2d.position.equal(arm_positions.drop, {x, y}) then
|
if math2d.position.equal(arm_positions.drop, {x, y}) then
|
||||||
gui_instance.table_position.children[idx].sprite = '__base__/graphics/icons/arrows/down-arrow.png'
|
gui_instance.table_position.children[idx].sprite = '[virtual-signal=down-arrow]'
|
||||||
elseif math2d.position.equal(arm_positions.pickup, {x, y}) then
|
elseif math2d.position.equal(arm_positions.pickup, {x, y}) then
|
||||||
gui_instance.table_position.children[idx].sprite = '__base__/graphics/icons/arrows/up-arrow.png'
|
gui_instance.table_position.children[idx].sprite = '[virtual-signal=up-arrow]'
|
||||||
elseif x ~= 0 or y ~= 0 then
|
elseif x ~= 0 or y ~= 0 then
|
||||||
gui_instance.table_position.children[idx].sprite = nil
|
gui_instance.table_position.children[idx].sprite = nil
|
||||||
end
|
end
|
||||||
@@ -237,7 +237,7 @@ if settings.startup['PHI-CT'].value then
|
|||||||
for y = -1, 1, 1 do
|
for y = -1, 1, 1 do
|
||||||
for x = -1, 1, 1 do
|
for x = -1, 1, 1 do
|
||||||
idx = idx + 1
|
idx = idx + 1
|
||||||
gui_instance.table_offset.children[idx].sprite = (math2d.position.equal(arm_positions.drop_offset, {x, y}) and '__base__/graphics/icons/arrows/down-arrow.png') or nil
|
gui_instance.table_offset.children[idx].sprite = (math2d.position.equal(arm_positions.drop_offset, {x, y}) and '[virtual-signal=down-arrow]') or nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -256,11 +256,11 @@ if settings.startup['PHI-CT'].value then
|
|||||||
if event.button == defines.mouse_button_type.left and (not event.control) and (not event.shift) then
|
if event.button == defines.mouse_button_type.left and (not event.control) and (not event.shift) then
|
||||||
local new_positions = {drop = new_pos}
|
local new_positions = {drop = new_pos}
|
||||||
|
|
||||||
if event.element.sprite == '__base__/graphics/icons/arrows/down-arrow.png' then
|
if event.element.sprite == '[virtual-signal=down-arrow]' then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if event.element.sprite == '__base__/graphics/icons/arrows/up-arrow.png' then
|
if event.element.sprite == '[virtual-signal=up-arrow]' then
|
||||||
new_positions.pickup = inserter_utils.get_arm_positions(inserter).drop
|
new_positions.pickup = inserter_utils.get_arm_positions(inserter).drop
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -270,11 +270,11 @@ if settings.startup['PHI-CT'].value then
|
|||||||
elseif event.button == defines.mouse_button_type.right or (event.button == defines.mouse_button_type.left and (event.control or event.shift)) then
|
elseif event.button == defines.mouse_button_type.right or (event.button == defines.mouse_button_type.left and (event.control or event.shift)) then
|
||||||
local new_positions = {pickup = new_pos}
|
local new_positions = {pickup = new_pos}
|
||||||
|
|
||||||
if event.element.sprite == '__base__/graphics/icons/arrows/up-arrow.png' then
|
if event.element.sprite == '[virtual-signal=up-arrow]' then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if event.element.sprite == '__base__/graphics/icons/arrows/down-arrow.png' then
|
if event.element.sprite == '[virtual-signal=down-arrow]' then
|
||||||
new_positions.drop = inserter_utils.get_arm_positions(inserter).pickup
|
new_positions.drop = inserter_utils.get_arm_positions(inserter).pickup
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user