1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-02-03 13:11:21 +02:00

Fix rendering

This commit is contained in:
RedRafe 2024-11-09 17:19:13 +01:00
parent dd50499119
commit 115318bcbf
2 changed files with 3 additions and 9 deletions

View File

@ -500,7 +500,7 @@ handler = function(event)
tick = tick
}
debug_print('Waypoint_index ' .. waypoint_index .. ' (waypoint #' .. waypoint_index + 1 .. ') callback in ' .. ticks .. ' ticks')
debug_print('Waypoint_index ' .. waypoint_index .. ' (waypoint #' .. (waypoint_index + 1) .. ') callback in ' .. ticks .. ' ticks')
set_timeout_in_ticks(ticks, callback_function, {func = running_cutscene.func, player_index = player_index, waypoint_index = waypoint_index - 1, params = params})
end
@ -590,7 +590,7 @@ Gui.on_click(
forward_btn_name,
function(event)
local player_index = event.player_index
if Public.goTo(event.player_index, running_cutscenes[player_index].current_index + 1) == false then
if Public.goTo(player_index, running_cutscenes[player_index].current_index + 1) == false then
game.get_player(player_index).print("Cutscene: You're already at the end")
end
end

View File

@ -10,13 +10,7 @@ local rendering = rendering
local draw_polygon = rendering.draw_polygon
function Public.draw_polygon(positions, options)
local vertices = {}
for i = 1, #positions do
vertices[i] = {target = positions[i]}
end
local args = {vertices = vertices}
local args = { vertices = positions }
for k, v in pairs(options) do
args[k] = v
end