Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/gonengazit/Celia
Browse files Browse the repository at this point in the history
  • Loading branch information
ZatFinn committed Sep 25, 2023
2 parents 427d8fa + b065048 commit ac99535
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions cctas.lua
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ function cctas:get_input_str(i,j, include_seeds)
if i ~= nil and not include_seeds then
return self.super.get_input_str(self,i,j)
end
return ("[%s]%s"):format(table.concat(self:get_rng_seeds(),","),self.super.get_input_str(self))
return ("[%s]%s"):format(table.concat(self:get_rng_seeds(),","),self.super.get_input_str(self,i,j))
end

function cctas:load_input_str(str, i)
Expand Down Expand Up @@ -651,7 +651,8 @@ function cctas:save_cleaned_input_file(last_frame)
return
end
if f:open("w") then
f:write(self:get_input_str(1, last_frame, true))
-- +1 because the input array is 1 indexed
f:write(self:get_input_str(1, last_frame+1, true))
print(("saved %df cleaned file to %s"):format(last_frame, love.filesystem.getRealDirectory(f:getFilename()).."/"..f:getFilename()))
else
print("error saving cleaned input file")
Expand Down
7 changes: 4 additions & 3 deletions tas.lua
Original file line number Diff line number Diff line change
Expand Up @@ -473,16 +473,17 @@ function tas:draw_gif_overlay()
end

function tas:keypressed(key, isrepeat)
if ke.playback then
self.realtime_playback = not self.realtime_playback
elseif self.realtime_playback then
if self.realtime_playback then
-- pressing any key during realtime playback stops it
self.realtime_playback = false
elseif self.seek then
-- pressing any key during seek interrupts it
if self.seek.finish_on_interrupt then
self.seek.on_finish()
end
self.seek=nil
elseif ke.playback then
self.realtime_playback = not self.realtime_playback
--TODO: block keypresses even when overloading this func
elseif self.last_selected_frame ~= -1 then
self:selection_keypress(key, isrepeat)
Expand Down

0 comments on commit ac99535

Please sign in to comment.