mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-01-01 04:31:40 +09:00
.
This commit is contained in:
@@ -261,16 +261,11 @@ if settings.startup['PHI-CT'].value then
|
|||||||
local new_pos = gui.get_button_pos(e.element)
|
local new_pos = gui.get_button_pos(e.element)
|
||||||
|
|
||||||
if e.button == defines.mouse_button_type.left and (not e.control or e.shift) then
|
if e.button == defines.mouse_button_type.left and (not e.control or e.shift) then
|
||||||
local new_positions = {drop = new_pos}
|
|
||||||
|
|
||||||
if e.element.sprite == 'virtual-signal/down-arrow' then
|
if e.element.sprite == 'virtual-signal/down-arrow' then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if e.element.sprite == 'virtual-signal/up-arrow' then
|
local new_positions = {drop = new_pos, pickup = (e.element.sprite == 'virtual-signal/up-arrow' and inserter_utils.get_arm_positions(player.opened).drop) or nil}
|
||||||
new_positions.pickup = inserter_utils.get_arm_positions(player.opened).drop
|
|
||||||
end
|
|
||||||
|
|
||||||
local old_positions = inserter_utils.get_arm_positions(player.opened)
|
local old_positions = inserter_utils.get_arm_positions(player.opened)
|
||||||
local vec = math2d.position.ensure_xy(new_positions.drop)
|
local vec = math2d.position.ensure_xy(new_positions.drop)
|
||||||
local new_drop_dir = math.floor(math.atan2(vec.x, -vec.y) * (4 / math.pi) + 0.5) % 8
|
local new_drop_dir = math.floor(math.atan2(vec.x, -vec.y) * (4 / math.pi) + 0.5) % 8
|
||||||
|
|||||||
Reference in New Issue
Block a user