diff options
| author | Giuseppe Gadola <giusgadola@gmail.com> | 2023-03-05 17:12:05 +0100 |
|---|---|---|
| committer | Giuseppe Gadola <giusgadola@gmail.com> | 2023-03-06 13:48:27 +0100 |
| commit | 4ca775944cf48f5fb9e01d40828572e5546c4b73 (patch) | |
| tree | d8791fb2539f523f19d315efdc6d5af46ddf51ab /lua | |
| parent | feat(animations): added left movements (diff) | |
feat(pets): spawn pets at random columns instead of left
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/pets/animations.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/pets/animations.lua b/lua/pets/animations.lua index effa001..eeba79f 100644 --- a/lua/pets/animations.lua +++ b/lua/pets/animations.lua @@ -29,13 +29,13 @@ function M.Animation.new(sourcedir, type, style, popup, user_opts, state) end -- user options - instance.row, instance.col = user_opts.row, user_opts.col instance.speed_multiplier = user_opts.speed_multiplier if user_opts.col > popup.win_config.width - 8 then M.base_col = popup.win_config.width - 8 else M.base_col = user_opts.col end + instance.row, instance.col = user_opts.row, math.random(M.base_col, popup.win_config.width - 8) -- setup frames for _, action in pairs(instance.actions) do |