diff options
| author | Giuseppe Gadola <67549788+giusgad@users.noreply.github.com> | 2023-02-16 16:56:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-16 16:56:38 +0100 |
| commit | 14957d3912d9adba6fca8fd8354ecc2f9ee94cf9 (patch) | |
| tree | c76fdbbe6e52abea63cf3d0c18ef9a53100488e7 /lua/pets/pet.lua | |
| parent | docs(help): auto generate docs (diff) | |
| parent | docs(readme): added PetsSleepToggle command (diff) | |
chore: merge pull request #7 from Kyle-Mendes/sleeping
Adding the ability to sleep pets, stopping their movement but keeping the animation going
Diffstat (limited to 'lua/pets/pet.lua')
| -rw-r--r-- | lua/pets/pet.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/pets/pet.lua b/lua/pets/pet.lua index 5f5dbc4..411efa6 100644 --- a/lua/pets/pet.lua +++ b/lua/pets/pet.lua @@ -72,4 +72,8 @@ function M.Pet:toggle_hide() end end +function M.Pet:toggle_sleep() + self.animation.sleeping = not self.animation.sleeping +end + return M |